From 5557835eb10610d01869b1ec54fb65145b5a7187 Mon Sep 17 00:00:00 2001 From: Stuart Mcalpine <s.r.mcalpine@durham.ac.uk> Date: Thu, 1 Aug 2019 14:19:24 +0100 Subject: [PATCH] Added duplicate logic for final timestep in main.c --- examples/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/main.c b/examples/main.c index 758ebcbdfd..a528153662 100644 --- a/examples/main.c +++ b/examples/main.c @@ -1303,12 +1303,12 @@ int main(int argc, char *argv[]) { if ((e.output_list_snapshots && e.output_list_snapshots->final_step_dump) || !e.output_list_snapshots) { #ifdef HAVE_VELOCIRAPTOR - if (with_structure_finding && e.snapshot_invoke_stf) + if (with_structure_finding && e.snapshot_invoke_stf && !e.stf_this_timestep) velociraptor_invoke(&e, /*linked_with_snap=*/1); #endif engine_dump_snapshot(&e); #ifdef HAVE_VELOCIRAPTOR - if (with_structure_finding && e.snapshot_invoke_stf) + if (with_structure_finding && e.snapshot_invoke_stf && !e.stf_this_timestep) free(e.s->gpart_group_data); #endif } @@ -1316,7 +1316,7 @@ int main(int argc, char *argv[]) { /* Write final stf? */ #ifdef HAVE_VELOCIRAPTOR if (with_structure_finding && e.output_list_stf) { - if (e.output_list_stf->final_step_dump) + if (e.output_list_stf->final_step_dump && !e.stf_this_timestep) velociraptor_invoke(&e, /*linked_with_snap=*/0); } #endif -- GitLab