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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
deb3f8e2
Commit
deb3f8e2
authored
Feb 10, 2016
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Better definition of CFL condition. Now able to cope with changes of kernel.
parent
d1dfe28b
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!136
Master
,
!90
Improved multi-timestep SPH
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/const.h
+1
-1
1 addition, 1 deletion
src/const.h
src/hydro/Gadget2/hydro.h
+1
-1
1 addition, 1 deletion
src/hydro/Gadget2/hydro.h
with
2 additions
and
2 deletions
src/const.h
+
1
−
1
View file @
deb3f8e2
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
1.f
/* Value taken from (Price,2008), not used in legacy gadget mode */
1.f
/* Value taken from (Price,2008), not used in legacy gadget mode */
/* Time integration constants. */
/* Time integration constants. */
#define const_cfl 0.
2
f
#define const_cfl 0.
1
f
#define const_ln_max_h_change \
#define const_ln_max_h_change \
0.231111721f
/* Particle can't change volume by more than a factor of \
0.231111721f
/* Particle can't change volume by more than a factor of \
2=1.26^3 over one time step */
2=1.26^3 over one time step */
...
...
This diff is collapsed.
Click to expand it.
src/hydro/Gadget2/hydro.h
+
1
−
1
View file @
deb3f8e2
...
@@ -34,7 +34,7 @@ __attribute__((always_inline)) INLINE static float hydro_compute_timestep(
...
@@ -34,7 +34,7 @@ __attribute__((always_inline)) INLINE static float hydro_compute_timestep(
const
float
dt_accel
=
sqrtf
(
2
.
f
);
// MATTHIEU
const
float
dt_accel
=
sqrtf
(
2
.
f
);
// MATTHIEU
/* CFL condition */
/* CFL condition */
const
float
dt_cfl
=
2
.
f
*
const_cfl
*
p
->
h
/
p
->
v_sig
;
const
float
dt_cfl
=
2
.
f
*
const_cfl
*
kernel_gamma
*
p
->
h
/
p
->
v_sig
;
return
fminf
(
dt_cfl
,
dt_accel
);
return
fminf
(
dt_cfl
,
dt_accel
);
}
}
...
...
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
sign in
to comment