From 2aadeacd19900b0e1d5cbfe3ff399f76f8872647 Mon Sep 17 00:00:00 2001 From: Ben Wibking Date: Tue, 29 Oct 2024 13:31:41 -0400 Subject: [PATCH] update restart reproducer --- inputs/precipitator_restart_reproducer.in | 12 +----------- reproducer0.sh | 10 +++++----- src/main.cpp | 3 +++ 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/inputs/precipitator_restart_reproducer.in b/inputs/precipitator_restart_reproducer.in index fc5faedc..9c00b9b3 100644 --- a/inputs/precipitator_restart_reproducer.in +++ b/inputs/precipitator_restart_reproducer.in @@ -5,19 +5,10 @@ problem = Precipitator box problem_id = precipitator # problem ID: basename of output filenames -file_type = hst # History data dump -dt = 1.0 # time increment between outputs - - -file_type = hdf5 # HDF5 data dump -variables = prim, drho_over_rho, dP_over_P, dK_over_K, dT_over_T, entropy, temperature, tcool_over_tff, plasma_beta, dv_x, dv_y, dv_z -dt = 1.0 # Time increment between outputs -id = prim # Name to append to output - - file_type = rst # Binary data dump dt = 1.0 # time increment between outputs id = restart +ghost_zones = true cfl = 0.2 # The Courant, Friedrichs, & Lewy (CFL) Number @@ -26,7 +17,6 @@ tlim = 3.0 # time limit integrator = rk2 # time integration algorithm perf_cycle_offset = 10 # interval for stdout summary info - refinement = static nghost = 4 diff --git a/reproducer0.sh b/reproducer0.sh index 5727a7a0..f2ff1aaa 100755 --- a/reproducer0.sh +++ b/reproducer0.sh @@ -17,14 +17,14 @@ mkdir first_run mv parthenon.* first_run rm *.csv -# restart run from time zero -mpirun -np 8 ./build/bin/athenaPK -r first_run/parthenon.restart.00000.rhdf +# restart run +mpirun -np 8 ./build/bin/athenaPK -r first_run/parthenon.restart.00002.rhdf # clean up rm *.csv -# compare SECOND restart outputs -h5diff first_run/parthenon.restart.00002.rhdf parthenon.restart.00002.rhdf +# compare t=0 restart outputs +h5diff first_run/parthenon.restart.00002.rhdf parthenon.restart.now.rhdf # compare with phdf_diff -uv run external/parthenon/scripts/python/packages/parthenon_tools/parthenon_tools/phdf_diff.py -one parthenon.restart.00002.rhdf first_run/parthenon.restart.00002.rhdf +uv run external/parthenon/scripts/python/packages/parthenon_tools/parthenon_tools/phdf_diff.py --tol 0 first_run/parthenon.restart.00002.rhdf parthenon.restart.now.rhdf diff --git a/src/main.cpp b/src/main.cpp index 4b8fb455..cc24d3da 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -207,6 +207,9 @@ int main(int argc, char *argv[]) { { Hydro::HydroDriver driver(pman.pinput.get(), pman.app_input.get(), pman.pmesh.get()); + // output restart file at t=0 + driver.pouts->MakeOutputs(pman.pmesh.get(), pman.pinput.get(), &driver.tm, parthenon::SignalHandler::OutputSignal::now); + // This line actually runs the simulation driver.Execute(); }