Commit 24a05c3d authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

With fixdt policy, place the timestep on the timeline.

parent c58eb6e4
......@@ -2167,8 +2167,14 @@ void engine_init(struct engine *e, struct space *s, float dt, int nr_threads,
engine_policy(e);
/* Deal with timestep */
if(e->policy & engine_policy_fixdt)
if(e->policy & engine_policy_fixdt) {
e->dt_min = e->dt_max;
/* Put this timestep on the time line */
float dt_timeline = e->timeEnd - e->timeBegin;
while (e->dt_min < dt_timeline) dt_timeline /= 2.;
e->dt_min = e->dt_max = dt_timeline;
}
/* Construct types for MPI communications */
#ifdef WITH_MPI
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment