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
9b957b58
Commit
9b957b58
authored
Dec 11, 2016
by
Matthieu Schaller
Browse files
Correction to hydro_get_pressure() in the minimal-SPH case.
parent
290e85f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
9b957b58
...
...
@@ -330,8 +330,8 @@ void engine_redistribute(struct engine *e) {
r
++
;
}
}
message
(
"%ld of %ld (%.2f%%) of particles moved"
,
total
-
unmoved
,
total
,
100
.
0
*
(
double
)(
total
-
unmoved
)
/
(
double
)
total
);
message
(
"%ld of %ld (%.2f%%) of particles moved"
,
total
-
unmoved
,
total
,
100
.
0
*
(
double
)(
total
-
unmoved
)
/
(
double
)
total
);
}
}
...
...
src/hydro/Minimal/hydro.h
View file @
9b957b58
...
...
@@ -66,7 +66,9 @@ __attribute__((always_inline)) INLINE static float hydro_get_internal_energy(
__attribute__
((
always_inline
))
INLINE
static
float
hydro_get_pressure
(
const
struct
part
*
restrict
p
,
float
dt
)
{
return
p
->
force
.
pressure
;
const
float
u
=
p
->
u
+
p
->
u_dt
*
dt
;
return
gas_pressure_from_internal_energy
(
p
->
rho
,
u
);
}
/**
...
...
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