Commit c307218d authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Time the update of general quantities (e.g. cooling tables)

parent 501c4600
......@@ -2496,15 +2496,17 @@ void engine_step(struct engine *e) {
e->time_step = (e->ti_current - e->ti_old) * e->time_base;
}
/*****************************************************/
/* OK, we now know what the next end of time-step is */
/*****************************************************/
const ticks tic_updates = getticks();
/* Update the cooling function */
if ((e->policy & engine_policy_cooling) ||
(e->policy & engine_policy_temperature))
cooling_update(e->cosmology, e->cooling_func, e->s);
/*****************************************************/
/* OK, we now know what the next end of time-step is */
/*****************************************************/
/* Update the softening lengths */
if (e->policy & engine_policy_self_gravity)
gravity_props_update(e->gravity_properties, e->cosmology);
......@@ -2514,6 +2516,10 @@ void engine_step(struct engine *e) {
hydro_props_update(e->hydro_properties, e->gravity_properties,
e->cosmology);
if (e->verbose)
message("Updating global quantities took %.3f %s",
clocks_from_ticks(getticks() - tic_updates), clocks_getunit());
/* Trigger a tree-rebuild if we passed the frequency threshold */
if ((e->policy & engine_policy_self_gravity) &&
((double)e->g_updates_since_rebuild >
......
......@@ -98,6 +98,7 @@ labels = [
["engine_drift_top_multipoles:", 0],
["Communicating rebuild flag", 0],
["Writing step info to files", 0],
["Updating general quantities", 0],
["task_dump_all:", 0],
["task_dump_stats:", 0],
["task_dump_active:", 0],
......
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