Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
0d73ea36
Commit
0d73ea36
authored
Feb 01, 2017
by
Matthieu Schaller
Browse files
Don't divide by time-step if time-step is zero in the hydro_kick
parent
79c9a0f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hydro/Gadget2/hydro.h
View file @
0d73ea36
...
...
@@ -377,7 +377,7 @@ __attribute__((always_inline)) INLINE static void hydro_kick_extra(
struct
part
*
restrict
p
,
struct
xpart
*
restrict
xp
,
float
dt
)
{
/* Do not decrease the entropy by more than a factor of 2 */
if
(
p
->
entropy_dt
<
-
0
.
5
f
*
xp
->
entropy_full
/
dt
)
{
if
(
dt
>
0
.
&&
p
->
entropy_dt
*
dt
<
-
0
.
5
f
*
xp
->
entropy_full
)
{
/* message("Warning! Limiting entropy_dt. Possible cooling error.\n
* entropy_full = %g \n entropy_dt * dt =%g \n", */
/* xp->entropy_full,p->entropy_dt * dt); */
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment