Skip to content
GitLab
Menu
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
af09993e
Commit
af09993e
authored
Feb 13, 2016
by
Matthieu Schaller
Browse files
More const-correctness
parent
80022c94
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hydro/Default/hydro.h
View file @
af09993e
...
...
@@ -28,10 +28,10 @@ __attribute__((always_inline)) INLINE static float hydro_compute_timestep(
struct
part
*
p
,
struct
xpart
*
xp
)
{
/* CFL condition */
float
dt_cfl
=
2
.
f
*
const_cfl
*
kernel_gamma
*
p
->
h
/
p
->
force
.
v_sig
;
const
float
dt_cfl
=
2
.
f
*
const_cfl
*
kernel_gamma
*
p
->
h
/
p
->
force
.
v_sig
;
/* Limit change in u */
float
dt_u_change
=
(
p
->
force
.
u_dt
!=
0
.
0
f
)
const
float
dt_u_change
=
(
p
->
force
.
u_dt
!=
0
.
0
f
)
?
fabsf
(
const_max_u_change
*
p
->
u
/
p
->
force
.
u_dt
)
:
FLT_MAX
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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