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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
e4af484f
Commit
e4af484f
authored
7 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Add a workaround for the cosmological RMS time-step size in the case where gravity is not computed.
parent
d62e6f36
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/engine.c
+5
-2
5 additions, 2 deletions
src/engine.c
with
5 additions
and
2 deletions
src/engine.c
+
5
−
2
View file @
e4af484f
...
@@ -6229,8 +6229,11 @@ void engine_recompute_displacement_constraint(struct engine *e) {
...
@@ -6229,8 +6229,11 @@ void engine_recompute_displacement_constraint(struct engine *e) {
const
float
vel_norm_b
=
vel_norm
[
0
]
+
vel_norm
[
4
];
const
float
vel_norm_b
=
vel_norm
[
0
]
+
vel_norm
[
4
];
/* Mesh forces smoothing scale */
/* Mesh forces smoothing scale */
const
float
a_smooth
=
float
a_smooth
;
e
->
gravity_properties
->
a_smooth
*
e
->
s
->
dim
[
0
]
/
e
->
s
->
cdim
[
0
];
if
((
e
->
policy
&
engine_policy_self_gravity
)
&&
e
->
s
->
periodic
==
1
)
a_smooth
=
e
->
gravity_properties
->
a_smooth
*
e
->
s
->
dim
[
0
]
/
e
->
s
->
cdim
[
0
];
else
a_smooth
=
FLT_MAX
;
float
dt_dm
=
FLT_MAX
,
dt_b
=
FLT_MAX
;
float
dt_dm
=
FLT_MAX
,
dt_b
=
FLT_MAX
;
...
...
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
register
or
sign in
to comment