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
4fea70ea
Commit
4fea70ea
authored
5 years ago
by
Loic Hausammann
Browse files
Options
Downloads
Patches
Plain Diff
GEAR: add error for hydro scheme not supported
parent
1ea0323d
No related branches found
No related tags found
1 merge request
!1052
Gear cosmological simulations
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/pressure_floor/GEAR/pressure_floor.h
+7
-2
7 additions, 2 deletions
src/pressure_floor/GEAR/pressure_floor.h
src/star_formation/GEAR/star_formation.h
+6
-1
6 additions, 1 deletion
src/star_formation/GEAR/star_formation.h
with
13 additions
and
3 deletions
src/pressure_floor/GEAR/pressure_floor.h
+
7
−
2
View file @
4fea70ea
...
...
@@ -70,7 +70,7 @@ __attribute__((always_inline)) static INLINE float
pressure_floor_get_physical_pressure
(
const
struct
part
*
p
,
const
float
pressure_physical
,
const
struct
cosmology
*
cosmo
)
{
error
(
"Not
implement
ed"
);
error
(
"Not
us
ed
.
"
);
return
0
;
}
...
...
@@ -96,7 +96,12 @@ pressure_floor_get_comoving_pressure(const struct part* p,
/* Compute the pressure floor */
float
floor
=
kernel_gamma
*
kernel_gamma
*
p
->
h
*
p
->
h
*
rho
*
pressure_floor_props
.
constants
*
cosmo
->
a_inv
;
floor
-=
p
->
pressure_floor_data
.
sigma2
*
cosmo
->
a2_inv
;
/* Add the velocity dispersion */
const
float
sigma2
=
p
->
pressure_floor_data
.
sigma2
*
cosmo
->
a2_inv
;
if
(
sigma2
<
floor
)
{
floor
-=
sigma2
;
}
floor
*=
a_coef
*
rho
*
hydro_one_over_gamma
;
return
fmaxf
(
pressure_comoving
,
floor
);
...
...
This diff is collapsed.
Click to expand it.
src/star_formation/GEAR/star_formation.h
+
6
−
1
View file @
4fea70ea
...
...
@@ -303,9 +303,14 @@ __attribute__((always_inline)) INLINE static void star_formation_end_density(
#ifdef SPHENIX_SPH
/* Copy the velocity divergence */
xp
->
sf_data
.
div_v
=
p
->
viscosity
.
div_v
;
#else
/* SPHENIX is already including the Hubble flow */
#elif GADGET_SPH
/* Copy the velocity divergence */
xp
->
sf_data
.
div_v
=
p
->
density
.
div_v
;
xp
->
sf_data
.
div_v
+=
hydro_dimension
*
cosmo
->
H
;
#else
#error This scheme is not implemented. Different scheme apply the Hubble flow \
at different place. Be careful about it.
#endif
}
...
...
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