diff --git a/examples/UniformDMBox/uniformBox.yml b/examples/UniformDMBox/uniformBox.yml index e59d677b308ca70f212f74c7e4d8b79f015c77a9..51b78db743f76a7b131b98e07a93179fdf22209a 100644 --- a/examples/UniformDMBox/uniformBox.yml +++ b/examples/UniformDMBox/uniformBox.yml @@ -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 diff --git a/src/engine.c b/src/engine.c index 38118db083597a66d9de0a18cfee9dda018b9113..89ddd2d7ca2b363231bcd14805a1cf922834fb88 100644 --- a/src/engine.c +++ b/src/engine.c @@ -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); diff --git a/src/gravity/Default/gravity.h b/src/gravity/Default/gravity.h index 1eee6e678288a209b669c46f7c87fbb5c399b6c7..031b4b2d303dd2bd5acbc778112672cc03a918e2 100644 --- a/src/gravity/Default/gravity.h +++ b/src/gravity/Default/gravity.h @@ -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; }