Commit 190e7b6f authored by Folkert Nobels's avatar Folkert Nobels
Browse files

Use a static variable to count instead of machine time for simulation time...

Use a static variable to count instead of machine time for simulation time intervals when using VELOCIraptor
parent 87372dde
......@@ -6329,6 +6329,7 @@ void engine_init(struct engine *e, struct space *s, struct swift_params *params,
e->snapshot_units = (struct unit_system *)malloc(sizeof(struct unit_system));
units_init_default(e->snapshot_units, params, "Snapshots", internal_units);
e->snapshot_output_count = 0;
e->stf_output_count = 0;
e->dt_min = parser_get_param_double(params, "TimeIntegration:dt_min");
e->dt_max = parser_get_param_double(params, "TimeIntegration:dt_max");
e->dt_max_RMS_displacement = FLT_MAX;
......
......@@ -235,6 +235,7 @@ struct engine {
double a_first_stf_output;
double time_first_stf_output;
double delta_time_stf;
int stf_output_count;
/* Output_List for the structure finding */
struct output_list *output_list_stf;
......
......@@ -222,8 +222,8 @@ void velociraptor_invoke(struct engine *e) {
snprintf(outputFileName, PARSER_MAX_LINE_SIZE + 128, "%s_%04i.VELOCIraptor",
e->stfBaseName, e->step);
} else if (e->stf_output_freq_format == io_stf_time) {
snprintf(outputFileName, PARSER_MAX_LINE_SIZE + 128, "%s_%04e.VELOCIraptor",
e->stfBaseName, e->time);
snprintf(outputFileName, PARSER_MAX_LINE_SIZE + 128, "%s_%04i.VELOCIraptor",
e->stfBaseName, e->stf_output_count);
}
/* Allocate and populate an array of swift_vel_parts to be passed to
......@@ -282,6 +282,8 @@ void velociraptor_invoke(struct engine *e) {
free(cell_node_ids);
free(swift_parts);
e->stf_output_count++;
message("VELOCIraptor took %.3f %s on rank %d.",
clocks_from_ticks(getticks() - tic), clocks_getunit(), engine_rank);
#else
......
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