aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Radke <tradke@aei.mpg.de>2005-02-04 18:10:00 +0000
committerThomas Radke <tradke@aei.mpg.de>2005-02-04 18:10:00 +0000
commitf1d2e63e9dea07e056b792f618b2b98c81b66f9c (patch)
tree49a946553cbc4d6f529a89131ffead8d79c56107
parent27114558d235f1f5df6b4cca7a62ea090ef6fc31 (diff)
CarpetIOHDF5: output individual refinement levels if requested
After updating CactusBase/IOUtil, one can now choose refinement levels for individual grid functions to be output, simply by using an options string, eg.: IOHDF5::out_vars = "wavetoy::phi{refinement_levels = {1 2}}" If no such option is given, output defaults to all refinement levels. Note that the parsing routine (in IOUtil) does not check for invalid refinement levels (>= max_refinement_levels). darcs-hash:20050204181016-776a0-4d1d74a64c2869ffc4a16846146e1a0b7fd98638.gz
-rw-r--r--Carpet/CarpetIOHDF5/src/Output.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/Carpet/CarpetIOHDF5/src/Output.cc b/Carpet/CarpetIOHDF5/src/Output.cc
index 8f5601dce..e3bc38873 100644
--- a/Carpet/CarpetIOHDF5/src/Output.cc
+++ b/Carpet/CarpetIOHDF5/src/Output.cc
@@ -597,6 +597,12 @@ static int TimeToOutput (const cGH* const cctkGH, const int vindex)
return (0);
}
+ // check whether this refinement level should be output
+ if (! (myGH->requests[vindex]->refinement_levels & (1 << reflevel)))
+ {
+ return (0);
+ }
+
// check if output for this variable was requested individually
// by a "<varname>{ out_every = <number> }" option string
// this will overwrite the output criterion setting