Skip to content

Commit

Permalink
Merge pull request #330 from JamesMcClung/pr/write-length-again
Browse files Browse the repository at this point in the history
Write length and corner in gauss output
  • Loading branch information
JamesMcClung authored Apr 23, 2024
2 parents 23f175a + 2722589 commit de3345b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/include/writer_adios2.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
4 changes: 2 additions & 2 deletions src/libpsc/psc_checks/checks_impl.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit de3345b

Please sign in to comment.