Skip to content

Commit

Permalink
const T: include last timestep; do record_all at t=outstart
Browse files Browse the repository at this point in the history
  • Loading branch information
pdziekan committed Apr 3, 2024
1 parent 331ccb7 commit 55b400c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libmpdata++/output/detail/output_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ namespace libmpdataxx
record_time = this->time;
for (int t = 0; t < outwindow; ++t)
{
if ((this->timestep - t) % static_cast<int>(outfreq) == 0 && this->timestep > static_cast<int>(outstart)) record_all();
if ((this->timestep - t) % static_cast<int>(outfreq) == 0 && this->timestep >= static_cast<int>(outstart)) record_all();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion libmpdata++/output/hdf5.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ namespace libmpdataxx
// T
{
const hsize_t
nt_out = (nt - this->outstart) / this->outfreq + 1; // incl. t=0
nt_out = (nt - this->outstart) / this->outfreq + 2; // incl. t=0 and t=outstart
float dt = this->dt;

blitz::Array<typename solver_t::real_t, 1> coord(nt_out);
Expand Down

0 comments on commit 55b400c

Please sign in to comment.