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
cf032f6f
Commit
cf032f6f
authored
6 years ago
by
Folkert Nobels
Browse files
Options
Downloads
Patches
Plain Diff
Code formatting
parent
6472796b
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!803
Star formation sub grid update
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/runner.c
+6
-6
6 additions, 6 deletions
src/runner.c
src/star_formation/EAGLE/star_formation.h
+4
-5
4 additions, 5 deletions
src/star_formation/EAGLE/star_formation.h
src/stars/EAGLE/stars_io.h
+3
-2
3 additions, 2 deletions
src/stars/EAGLE/stars_io.h
with
13 additions
and
13 deletions
src/runner.c
+
6
−
6
View file @
cf032f6f
...
...
@@ -735,8 +735,8 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) {
/* Copy the properties of the gas particle to the star particle */
star_formation_copy_properties
(
p
,
xp
,
sp
,
e
,
sf_props
,
cosmo
,
with_cosmology
,
phys_const
,
hydro_props
,
us
,
cooling
);
with_cosmology
,
phys_const
,
hydro_props
,
us
,
cooling
);
/* Update the Star formation history */
star_formation_logger_log_new_spart
(
sp
,
&
c
->
stars
.
sfh
);
...
...
@@ -1655,10 +1655,10 @@ void runner_do_ghost(struct runner *r, struct cell *c, int timer) {
if
(((
p
->
h
>=
hydro_h_max
)
&&
(
f
<
0
.
f
))
||
((
p
->
h
<=
hydro_h_min
)
&&
(
f
>
0
.
f
)))
{
/* We have a particle whose smoothing length is already set (wants
* to be larger but has already hit the maximum OR wants to be
* smaller but has already reached the minimum). So, just tidy up as
* if the smoothing length had converged correctly */
/* We have a particle whose smoothing length is already set (wants
* to be larger but has already hit the maximum OR wants to be
* smaller but has already reached the minimum). So, just tidy up as
* if the smoothing length had converged correctly */
#ifdef EXTRA_HYDRO_LOOP
...
...
This diff is collapsed.
Click to expand it.
src/star_formation/EAGLE/star_formation.h
+
4
−
5
View file @
cf032f6f
...
...
@@ -244,10 +244,9 @@ INLINE static int star_formation_is_star_forming(
/* Calculate the entropy of the particle */
const
double
entropy
=
hydro_get_physical_entropy
(
p
,
xp
,
cosmo
);
/* Calculate the entropy EOS of the particle */
const
double
entropy_eos
=
entropy_floor
(
p
,
cosmo
,
entropy_floor_props
);
const
double
entropy_eos
=
entropy_floor
(
p
,
cosmo
,
entropy_floor_props
);
/* Check the Scahye & Dalla Vecchia 2012 EOS-based temperature critrion */
return
(
entropy
<
...
...
@@ -410,8 +409,8 @@ INLINE static void star_formation_copy_properties(
sp
->
birth_density
=
hydro_get_physical_density
(
p
,
cosmo
);
/* Store the birth temperature in the star particle */
sp
->
birth_temperature
=
cooling_get_temperature
(
phys_const
,
hydro_props
,
us
,
cosmo
,
cooling
,
p
,
xp
);
sp
->
birth_temperature
=
cooling_get_temperature
(
phys_const
,
hydro_props
,
us
,
cosmo
,
cooling
,
p
,
xp
);
/* Flag that this particle has not done feedback yet */
sp
->
f_E
=
-
1
.
f
;
...
...
This diff is collapsed.
Click to expand it.
src/stars/EAGLE/stars_io.h
+
3
−
2
View file @
cf032f6f
...
...
@@ -85,8 +85,9 @@ INLINE static void stars_write_particles(const struct spart *sparts,
birth_time
);
list
[
8
]
=
io_make_output_field
(
"FeedbackEnergyFraction"
,
FLOAT
,
1
,
UNIT_CONV_NO_UNITS
,
sparts
,
f_E
);
list
[
9
]
=
io_make_output_field
(
"BirthTemperature"
,
FLOAT
,
1
,
UNIT_CONV_TEMPERATURE
,
sparts
,
birth_temperature
);
list
[
9
]
=
io_make_output_field
(
"BirthTemperature"
,
FLOAT
,
1
,
UNIT_CONV_TEMPERATURE
,
sparts
,
birth_temperature
);
}
/**
...
...
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