aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOHDF5/src/iohdf5.cc
diff options
context:
space:
mode:
authorbzink <>2004-06-04 08:17:00 +0000
committerbzink <>2004-06-04 08:17:00 +0000
commitf2db7c903184bf680f8d61d292189cea0d390ba1 (patch)
treea55b3d60085550b9c84d03f212714ddfa0a44d54 /Carpet/CarpetIOHDF5/src/iohdf5.cc
parent6a1dd750b77c54195b5bcc0b8e76e0d89216ff88 (diff)
Added option "divisor" to out3D_criterion.
darcs-hash:20040604081756-5b8bb-9b67f6d827ffd5f5cf152c1ff815a0d4c73b3431.gz
Diffstat (limited to 'Carpet/CarpetIOHDF5/src/iohdf5.cc')
-rw-r--r--Carpet/CarpetIOHDF5/src/iohdf5.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/Carpet/CarpetIOHDF5/src/iohdf5.cc b/Carpet/CarpetIOHDF5/src/iohdf5.cc
index 56d47035a..c05f401ea 100644
--- a/Carpet/CarpetIOHDF5/src/iohdf5.cc
+++ b/Carpet/CarpetIOHDF5/src/iohdf5.cc
@@ -17,7 +17,7 @@
#include "cctk_Parameters.h"
extern "C" {
- static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOHDF5/src/iohdf5.cc,v 1.31 2004/05/31 18:59:20 schnetter Exp $";
+ static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOHDF5/src/iohdf5.cc,v 1.32 2004/06/04 10:17:56 bzink Exp $";
CCTK_FILEVERSION(Carpet_CarpetIOHDF5_iohdf5_cc);
}
@@ -616,6 +616,23 @@ namespace CarpetIOHDF5 {
// we want no output at this iteration
output_this_iteration = false;
}
+
+ } else if (CCTK_EQUALS (myoutcriterion, "divisor")) {
+
+ int myoutevery = out3D_every;
+ if (myoutevery == -2) {
+ myoutevery = out_every;
+ }
+ if (myoutevery <= 0) {
+ // output is disabled
+ output_this_iteration = false;
+ } else if ((cctk_iteration % myoutevery) == 0) {
+ // we already decided to output this iteration
+ output_this_iteration = true;
+ } else {
+ // we want no output at this iteration
+ output_this_iteration = false;
+ }
} else if (CCTK_EQUALS (myoutcriterion, "time")) {