aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOASCII/src
diff options
context:
space:
mode:
authorbzink <>2004-06-03 08:03:00 +0000
committerbzink <>2004-06-03 08:03:00 +0000
commitd3549e3ccb05225d65425735a2ad2d44227fb9c3 (patch)
tree7555647e64c94fc01c891f76b6e18a1e724c0a20 /Carpet/CarpetIOASCII/src
parent814738e83b2234d7534a64a791eb187c47940830 (diff)
Added the option "divisor" to out?d_criterion.
darcs-hash:20040603080347-5b8bb-9375277326973c1c75fe326db70081817fdc31fd.gz
Diffstat (limited to 'Carpet/CarpetIOASCII/src')
-rw-r--r--Carpet/CarpetIOASCII/src/ioascii.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/Carpet/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc
index 13923fa80..4622ea479 100644
--- a/Carpet/CarpetIOASCII/src/ioascii.cc
+++ b/Carpet/CarpetIOASCII/src/ioascii.cc
@@ -31,7 +31,7 @@
#include "ioascii.hh"
extern "C" {
- static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOASCII/src/ioascii.cc,v 1.71 2004/05/27 12:23:03 schnetter Exp $";
+ static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOASCII/src/ioascii.cc,v 1.72 2004/06/03 10:03:47 bzink Exp $";
CCTK_FILEVERSION(Carpet_CarpetIOASCII_ioascii_cc);
}
@@ -680,6 +680,23 @@ namespace CarpetIOASCII {
output_this_iteration = false;
}
+ } else if (CCTK_EQUALS (myoutcriterion, "divisor")) {
+
+ int myoutevery = GetIntParameter("out%dD_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")) {
CCTK_REAL myoutdt = GetRealParameter("out%dD_dt");