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
45bfc03c
Commit
45bfc03c
authored
6 years ago
by
Josh Borrow
Browse files
Options
Downloads
Patches
Plain Diff
Added minimal internal energy limit to kick_extra for PU scheme
parent
070e45aa
No related branches found
No related tags found
1 merge request
!611
Cosmology pressure energy
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/hydro/PressureEnergy/hydro.h
+8
-0
8 additions, 0 deletions
src/hydro/PressureEnergy/hydro.h
with
8 additions
and
0 deletions
src/hydro/PressureEnergy/hydro.h
+
8
−
0
View file @
45bfc03c
...
...
@@ -593,6 +593,14 @@ __attribute__((always_inline)) INLINE static void hydro_kick_extra(
}
xp
->
u_full
+=
p
->
u_dt
*
dt_therm
;
/* Apply the minimal energy limit */
const
float
min_energy
=
hydro_props
->
minimal_internal_energy
/
cosmo
->
a_factor_internal_energy
;
if
(
xp
->
u_full
<
min_energy
)
{
xp
->
u_full
=
min_energy
;
p
->
u_dt
=
0
.
f
;
}
/* Compute the sound speed */
const
float
soundspeed
=
hydro_get_comoving_soundspeed
(
p
);
...
...
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