Skip to content
Snippets Groups Projects
Commit e4af484f authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Add a workaround for the cosmological RMS time-step size in the case where gravity is not computed.

parent d62e6f36
Branches
Tags
No related merge requests found
...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment