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
dcaace6c
Commit
dcaace6c
authored
Feb 01, 2017
by
Matthieu Schaller
Browse files
Same rule for the other hydro schemes.
parent
0d73ea36
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/hydro/Minimal/hydro.h
View file @
dcaace6c
...
...
@@ -360,7 +360,7 @@ __attribute__((always_inline)) INLINE static void hydro_kick_extra(
struct
part
*
restrict
p
,
struct
xpart
*
restrict
xp
,
float
dt
)
{
/* Do not decrease the energy by more than a factor of 2*/
if
(
p
->
u_
dt
<
-
0
.
5
f
*
xp
->
u_full
/
dt
)
{
if
(
dt
>
0
.
&&
p
->
u_dt
*
dt
<
-
0
.
5
f
*
xp
->
u_full
)
{
p
->
u_dt
=
-
0
.
5
f
*
xp
->
u_full
/
dt
;
}
xp
->
u_full
+=
p
->
u_dt
*
dt
;
...
...
src/hydro/PressureEntropy/hydro.h
View file @
dcaace6c
...
...
@@ -394,7 +394,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 (temperature) 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
)
{
p
->
entropy_dt
=
-
0
.
5
f
*
xp
->
entropy_full
/
dt
;
}
xp
->
entropy_full
+=
p
->
entropy_dt
*
dt
;
...
...
src/runner_doiact.h
View file @
dcaace6c
...
...
@@ -2080,7 +2080,8 @@ void DOSUB_SELF1(struct runner *r, struct cell *ci, int gettimer) {
/* Otherwise, compute self-interaction. */
else
{
#if (DOSELF1 == runner_doself1_density) && defined(WITH_VECTORIZATION) && defined(GADGET2_SPH)
#if (DOSELF1 == runner_doself1_density) && defined(WITH_VECTORIZATION) && \
defined(GADGET2_SPH)
runner_doself1_density_vec
(
r
,
ci
);
#else
DOSELF1
(
r
,
ci
);
...
...
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