diff --git a/src/include/writer_adios2.hxx b/src/include/writer_adios2.hxx index f8e7c3d254..840e4c10cd 100644 --- a/src/include/writer_adios2.hxx +++ b/src/include/writer_adios2.hxx @@ -71,17 +71,17 @@ 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_); 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(); } 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();