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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
438b8856
Commit
438b8856
authored
May 24, 2019
by
Folkert Nobels
Browse files
Options
Downloads
Patches
Plain Diff
Add the mean density to the cosmology
parent
3fd4bc2f
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!825
EAGLE star formation: Change the over density criteria
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cosmology.c
+4
-0
4 additions, 0 deletions
src/cosmology.c
src/cosmology.h
+3
-0
3 additions, 0 deletions
src/cosmology.h
with
7 additions
and
0 deletions
src/cosmology.c
+
4
−
0
View file @
438b8856
...
@@ -190,6 +190,9 @@ void cosmology_update(struct cosmology *c, const struct phys_const *phys_const,
...
@@ -190,6 +190,9 @@ void cosmology_update(struct cosmology *c, const struct phys_const *phys_const,
c
->
critical_density
=
c
->
critical_density
=
3
.
*
c
->
H
*
c
->
H
/
(
8
.
*
M_PI
*
phys_const
->
const_newton_G
);
3
.
*
c
->
H
*
c
->
H
/
(
8
.
*
M_PI
*
phys_const
->
const_newton_G
);
/* Mean density */
c
->
mean_density
=
c
->
critical_density_0
*
a3_inv
;
/* Time-step conversion factor */
/* Time-step conversion factor */
c
->
time_step_factor
=
c
->
H
;
c
->
time_step_factor
=
c
->
H
;
...
@@ -583,6 +586,7 @@ void cosmology_init_no_cosmo(struct cosmology *c) {
...
@@ -583,6 +586,7 @@ void cosmology_init_no_cosmo(struct cosmology *c) {
c
->
critical_density
=
0
.;
c
->
critical_density
=
0
.;
c
->
critical_density_0
=
0
.;
c
->
critical_density_0
=
0
.;
c
->
mean_density
=
0
.;
c
->
time_step_factor
=
1
.;
c
->
time_step_factor
=
1
.;
...
...
...
...
This diff is collapsed.
Click to expand it.
src/cosmology.h
+
3
−
0
View file @
438b8856
...
@@ -78,6 +78,9 @@ struct cosmology {
...
@@ -78,6 +78,9 @@ struct cosmology {
/*! The critical density at redshift 0 (in internal physical units) */
/*! The critical density at redshift 0 (in internal physical units) */
double
critical_density_0
;
double
critical_density_0
;
/*! The mean density at the current redshift (in internal physical units) */
double
mean_density
;
/*! Conversion factor from internal time-step size to cosmological step */
/*! Conversion factor from internal time-step size to cosmological step */
double
time_step_factor
;
double
time_step_factor
;
...
...
...
...
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
sign in
to comment