From e91a83cb71e3d886cc767b50d33f543b39dde0c0 Mon Sep 17 00:00:00 2001 From: James Date: Fri, 29 Mar 2024 15:44:38 -0400 Subject: [PATCH 1/3] checks_impl: pass grid to begin_step --- src/libpsc/psc_checks/checks_impl.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libpsc/psc_checks/checks_impl.hxx b/src/libpsc/psc_checks/checks_impl.hxx index af7139d008..c513712909 100644 --- a/src/libpsc/psc_checks/checks_impl.hxx +++ b/src/libpsc/psc_checks/checks_impl.hxx @@ -94,7 +94,7 @@ public: if (!writer_) { writer_.open("continuity"); } - writer_.begin_step(grid.timestep(), grid.timestep() * grid.dt); + writer_.begin_step(grid); writer_.write(dt_divj, grid, "dt_divj", {"dt_divj"}); writer_.write(d_rho, grid, "d_rho", {"d_rho"}); writer_.end_step(); @@ -173,7 +173,7 @@ public: if (!writer_) { writer_.open("gauss"); } - writer_.begin_step(grid.timestep(), grid.timestep() * grid.dt); + writer_.begin_step(grid); writer_.write(rho, grid, "rho", {"rho"}); writer_.write(dive, grid, "dive", {"dive"}); writer_.end_step(); From 3a590f70712a472aac190ea9470d05e30820aff3 Mon Sep 17 00:00:00 2001 From: James Date: Fri, 29 Mar 2024 15:58:45 -0400 Subject: [PATCH 2/3] writer_adios2: -begin_step(step, time) --- src/include/writer_adios2.hxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/include/writer_adios2.hxx b/src/include/writer_adios2.hxx index f8e7c3d254..92fa7f764a 100644 --- a/src/include/writer_adios2.hxx +++ b/src/include/writer_adios2.hxx @@ -71,11 +71,9 @@ public: void begin_step(const Grid_t& grid) { - begin_step(grid.timestep(), grid.timestep() * grid.dt); - } + int step = grid.timestep(); + double time = grid.timestep() * grid.dt; - void begin_step(int step, double time) - { char filename[dir_.size() + pfx_.size() + 20]; sprintf(filename, "%s/%s.%09d.bp", dir_.c_str(), pfx_.c_str(), step); file_ = io_.open(filename, kg::io::Mode::Write, comm_, pfx_); From 2722589df3bdc8d2724a98753ac7c92723c3b6fe Mon Sep 17 00:00:00 2001 From: James Date: Fri, 29 Mar 2024 15:59:43 -0400 Subject: [PATCH 3/3] writer_adios2: put length, corner in begin_step --- src/include/writer_adios2.hxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/include/writer_adios2.hxx b/src/include/writer_adios2.hxx index 92fa7f764a..840e4c10cd 100644 --- a/src/include/writer_adios2.hxx +++ b/src/include/writer_adios2.hxx @@ -80,6 +80,8 @@ public: file_.beginStep(kg::io::StepMode::Append); file_.put("step", step); file_.put("time", time); + file_.put("length", grid.domain.length); + file_.put("corner", grid.domain.corner); file_.performPuts(); }