Commit 42ffbf1d authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Version that works but needs to call engine_marktasks instead of engine_unskip()

parent de21792d
......@@ -9,9 +9,9 @@ InternalUnitSystem:
# Parameters governing the time integration
TimeIntegration:
time_begin: 0. # The starting time of the simulation (in internal units).
time_end: 1. # The end time of the simulation (in internal units).
time_end: 100. # The end time of the simulation (in internal units).
dt_min: 1e-6 # The minimal time-step size of the simulation (in internal units).
dt_max: 1e-3 # The maximal time-step size of the simulation (in internal units).
dt_max: 1. # The maximal time-step size of the simulation (in internal units).
Scheduler:
max_top_level_cells: 8
......@@ -26,8 +26,8 @@ Snapshots:
# Parameters for the self-gravity scheme
Gravity:
eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion)
epsilon: 0.00001 # Softening length (in internal units).
theta: 0.8 # Opening angle (Multipole acceptance criterion)
epsilon: 0.01 # Softening length (in internal units).
# Parameters governing the conserved quantities statistics
Statistics:
......@@ -35,4 +35,4 @@ Statistics:
# Parameters related to the initial conditions
InitialConditions:
file_name: ./uniformDMBox_50.hdf5 # The file to read
file_name: ./uniformDMBox_16.hdf5 # The file to read
......@@ -3564,9 +3564,14 @@ void engine_prepare(struct engine *e) {
/* Do we need rebuilding ? */
if (e->forcerebuild) engine_rebuild(e, 0);
/* Unskip active tasks and check for rebuild */
engine_unskip(e);
message("Rebuild done");
space_print_cells(e->s);
/* Unskip active tasks and check for rebuild */
//engine_unskip(e);
engine_marktasks(e);
/* Re-rank the tasks every now and then. */
if (e->tasks_age % engine_tasksreweight == 1) {
scheduler_reweight(&e->sched, e->verbose);
......@@ -4156,7 +4161,7 @@ void engine_step(struct engine *e) {
e->timeStep = (e->ti_current - e->ti_old) * e->timeBase;
e->step_props = engine_step_prop_none;
space_print_cells(e->s);
//space_print_cells(e->s);
//message("nr cells: %d %d", e->s->nr_cells, e->s->tot_cells);
message("ti_current=%lld ti_old=%lld", e->ti_current, e->ti_old);
......
......@@ -78,7 +78,13 @@ gravity_compute_timestep_self(const struct gpart* const gp,
const float epsilon = gravity_get_softening(gp);
/* Note that 0.66666667 = 2. (from Gadget) / 3. (Plummer softening) */
const float dt = sqrtf(0.66666667f * grav_props->eta * epsilon * ac_inv);
float dt = sqrtf(0.66666667f * grav_props->eta * epsilon * ac_inv);
if(gp->id_or_neg_offset == 1) {
dt /= 1000.;
message("lower dt %e", dt);
}
return dt;
}
......
Markdown is supported
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