From 55b400ccfb28838bf64fb00d02429a4c2bbac7bd Mon Sep 17 00:00:00 2001 From: Piotr Dziekan Date: Wed, 3 Apr 2024 22:13:56 +0200 Subject: [PATCH] const T: include last timestep; do record_all at t=outstart --- libmpdata++/output/detail/output_common.hpp | 2 +- libmpdata++/output/hdf5.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libmpdata++/output/detail/output_common.hpp b/libmpdata++/output/detail/output_common.hpp index f14d00c2..b3258c18 100644 --- a/libmpdata++/output/detail/output_common.hpp +++ b/libmpdata++/output/detail/output_common.hpp @@ -158,7 +158,7 @@ namespace libmpdataxx record_time = this->time; for (int t = 0; t < outwindow; ++t) { - if ((this->timestep - t) % static_cast(outfreq) == 0 && this->timestep > static_cast(outstart)) record_all(); + if ((this->timestep - t) % static_cast(outfreq) == 0 && this->timestep >= static_cast(outstart)) record_all(); } } } diff --git a/libmpdata++/output/hdf5.hpp b/libmpdata++/output/hdf5.hpp index 1586edb0..6116ccf2 100644 --- a/libmpdata++/output/hdf5.hpp +++ b/libmpdata++/output/hdf5.hpp @@ -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 coord(nt_out);