Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
SWIFTsim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
69
Issues
69
List
Boards
Labels
Milestones
Merge Requests
11
Merge Requests
11
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
SWIFT
SWIFTsim
Commits
415f21ce
Commit
415f21ce
authored
Aug 04, 2020
by
Matthieu Schaller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document the logic in runner_do_star_formation() a bit better
parent
f3793a0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/runner_others.c
src/runner_others.c
+7
-1
No files found.
src/runner_others.c
View file @
415f21ce
...
...
@@ -339,7 +339,9 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) {
const
int
spawn_spart
=
star_formation_should_spawn_spart
(
p
,
xp
,
sf_props
);
/* Are we using a model that actually generates star particles? */
if
(
swift_star_formation_model_creates_stars
)
{
/* Check if we should create a new particle or transform one */
if
(
spawn_spart
)
{
/* Spawn a new spart (+ gpart) */
...
...
@@ -348,7 +350,11 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) {
/* Convert the gas particle to a star particle */
sp
=
cell_convert_part_to_spart
(
e
,
c
,
p
,
xp
);
}
}
else
{
/* We are in a model where spart don't exist
* --> convert the part to a DM gpart */
cell_convert_part_to_gpart
(
e
,
c
,
p
,
xp
);
}
...
...
@@ -393,7 +399,7 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) {
/* log_all */
1
,
/* special flags */
0
);
#endif
}
else
{
}
else
if
(
swift_star_formation_model_creates_stars
)
{
/* Do something about the fact no star could be formed.
Note that in such cases a tree rebuild to create more free
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment