aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2010-02-13 18:38:16 -0600
committerBarry Wardell <barry.wardell@gmail.com>2011-12-14 16:45:27 +0000
commit0696f61f7b1b1eea20f13eedcf57bb45c7a059e3 (patch)
tree70613aa0e4524faa5fd8fe91d964e921da92285a /Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc
parent90957740d78d290157f3866c798628bca387f577 (diff)
CarpetIOHDF5: Use parameter IO::out_timesteps_per_file
Diffstat (limited to 'Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc')
-rw-r--r--Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc b/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc
index d54619ee6..0c0e8a282 100644
--- a/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc
+++ b/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc
@@ -669,6 +669,14 @@ static int OutputVarAs (const cGH* const cctkGH, const char* const fullname,
string filename;
filename.append (myGH->out_dir);
filename.append (alias);
+ if (out_timesteps_per_file > 0) {
+ // Round down to nearest multiple of out_timesteps_per_file
+ int const iter =
+ cctk_iteration / out_timesteps_per_file * out_timesteps_per_file;
+ char buffer[32];
+ snprintf (buffer, sizeof (buffer), ".iter_%d", iter);
+ filename.append (buffer);
+ }
if (not (CCTK_EQUALS (out_mode, "onefile") or
request->out_unchunked or
groupdata.disttype == CCTK_DISTRIB_CONSTANT or