Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
dfa8d99c
Commit
dfa8d99c
authored
5 years ago
by
Yannick Bahé
Committed by
Matthieu Schaller
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
New BH merger scheme
parent
cb75314c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/black_holes/EAGLE/black_holes_iact.h
+7
-8
7 additions, 8 deletions
src/black_holes/EAGLE/black_holes_iact.h
with
7 additions
and
8 deletions
src/black_holes/EAGLE/black_holes_iact.h
+
7
−
8
View file @
dfa8d99c
...
@@ -262,7 +262,7 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
...
@@ -262,7 +262,7 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
const_max_repositioning_distance_ratio
*
grav_props
->
epsilon_baryon_cur
*
const_max_repositioning_distance_ratio
*
grav_props
->
epsilon_baryon_cur
*
grav_props
->
epsilon_baryon_cur
;
grav_props
->
epsilon_baryon_cur
;
/* This
gas
neighbour is close enough that we can consider it's potential
/* This
BH
neighbour is close enough that we can consider it's potential
for repositioning */
for repositioning */
if
(
r2
<
max_dist_repos2
)
{
if
(
r2
<
max_dist_repos2
)
{
...
@@ -285,13 +285,11 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
...
@@ -285,13 +285,11 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
/* Find the most massive of the two BHs */
/* Find the most massive of the two BHs */
float
M
=
bi
->
subgrid_mass
;
float
M
=
bi
->
subgrid_mass
;
float
h
=
hi
;
if
(
bj
->
subgrid_mass
>
M
)
{
if
(
bj
->
subgrid_mass
>
M
)
{
M
=
bj
->
subgrid_mass
;
M
=
bj
->
subgrid_mass
;
h
=
hj
;
}
}
/* (Square of)
M
ax swallowing distance allowed based on the softening */
/* (Square of)
m
ax swallowing distance allowed based on the softening */
const
float
max_dist_merge2
=
const
float
max_dist_merge2
=
kernel_gravity_softening_plummer_equivalent_inv
*
kernel_gravity_softening_plummer_equivalent_inv
*
kernel_gravity_softening_plummer_equivalent_inv
*
kernel_gravity_softening_plummer_equivalent_inv
*
...
@@ -307,10 +305,11 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
...
@@ -307,10 +305,11 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
if
((
bj
->
subgrid_mass
<
bi
->
subgrid_mass
)
||
if
((
bj
->
subgrid_mass
<
bi
->
subgrid_mass
)
||
(
bj
->
subgrid_mass
==
bi
->
subgrid_mass
&&
bj
->
id
<
bi
->
id
))
{
(
bj
->
subgrid_mass
==
bi
->
subgrid_mass
&&
bj
->
id
<
bi
->
id
))
{
/* Merge if gravitationally bound AND if within max distance
/* Maximum velocity difference between BHs allowed to merge */
* Note that we use the kernel support here as the size and not just the
const
float
v2_threshold
=
2
.
f
*
G_Newton
*
M
/
sqrt
(
r2
);
* smoothing length */
if
(
v2_pec
<
G_Newton
*
M
/
(
kernel_gamma
*
h
)
&&
(
r2
<
max_dist_merge2
))
{
/* Merge if gravitationally bound AND if within max distance */
if
((
v2_pec
<
v2_threshold
)
&&
(
r2
<
max_dist_merge2
))
{
/* This particle is swallowed by the BH with the largest ID of all the
/* This particle is swallowed by the BH with the largest ID of all the
* candidates wanting to swallow it */
* candidates wanting to swallow it */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment