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
4eee46dc
"doc/RTD/git@gitlab.cosma.dur.ac.uk:swift/swiftsim.git" did not exist on "39af47c9035f39d11e6d14836f0e5a1e27653a4c"
Commit
4eee46dc
authored
5 years ago
by
fonotec
Browse files
Options
Downloads
Patches
Plain Diff
Update fof code to work for stars + black holes
parent
4e5ebe2f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/fof.c
+9
-3
9 additions, 3 deletions
src/fof.c
with
9 additions
and
3 deletions
src/fof.c
+
9
−
3
View file @
4eee46dc
...
...
@@ -154,8 +154,8 @@ void fof_init(struct fof_props *props, struct swift_params *params,
int
with_gas_fof
=
0
;
int
with_dm_fof
=
1
;
int
with_dm_background_fof
=
0
;
int
with_stars_fof
=
0
;
int
with_black_hole_fof
=
0
;
int
with_stars_fof
=
1
;
int
with_black_hole_fof
=
1
;
/* Initialize the fof mode */
current_fof_policy
=
0
;
...
...
@@ -849,6 +849,9 @@ void fof_search_self_cell(const struct fof_props *props, const double l_x2,
/* Ignore inhibited particles */
if
(
pj
->
time_bin
>=
time_bin_inhibited
)
continue
;
/* Check if the particle if the particle is in the fof policy */
if
(
!
(
current_fof_policy
&
(
1
<<
pj
->
type
)))
continue
;
#ifdef SWIFT_DEBUG_CHECKS
if
(
pj
->
ti_drift
!=
ti_current
)
error
(
"Running FOF on an un-drifted particle!"
);
...
...
@@ -941,7 +944,7 @@ void fof_search_pair_cells(const struct fof_props *props, const double dim[3],
/* Ignore inhibited particles */
if
(
pi
->
time_bin
>=
time_bin_inhibited
)
continue
;
/* Ignore particles
not being a star
*/
/* Ignore particles
of the incorrect particle type
*/
if
(
!
(
current_fof_policy
&
(
1
<<
pi
->
type
)))
continue
;
#ifdef SWIFT_DEBUG_CHECKS
...
...
@@ -963,6 +966,9 @@ void fof_search_pair_cells(const struct fof_props *props, const double dim[3],
/* Ignore inhibited particles */
if
(
pj
->
time_bin
>=
time_bin_inhibited
)
continue
;
/* Ignore particles of the incorrect particle type */
if
(
!
(
current_fof_policy
&
(
1
<<
pj
->
type
)))
continue
;
#ifdef SWIFT_DEBUG_CHECKS
if
(
pj
->
ti_drift
!=
ti_current
)
error
(
"Running FOF on an un-drifted particle!"
);
...
...
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