From 6067109fee05c1106f388178ea7183fb268e7aaf Mon Sep 17 00:00:00 2001 From: Roland Haas Date: Fri, 25 Feb 2011 08:42:57 -0500 Subject: CarpetIOHDF5: make sliced 3D output depend on out3D_XXX rather than always ocuring together with the old-style 3D output. --- Carpet/CarpetIOHDF5/param.ccl | 35 ++++++++++++++++++++++++++++++++++ Carpet/CarpetIOHDF5/src/OutputSlice.cc | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/Carpet/CarpetIOHDF5/param.ccl b/Carpet/CarpetIOHDF5/param.ccl index 11a7323e6..e25c993a4 100644 --- a/Carpet/CarpetIOHDF5/param.ccl +++ b/Carpet/CarpetIOHDF5/param.ccl @@ -89,6 +89,12 @@ CCTK_STRING out2D_dir "Name of 2D HDF5 slice output directory, overrides IO::out ".+" :: "Not empty: directory name" } "" +CCTK_STRING out3D_dir "Name of 3D HDF5 slice output directory, overrides IO::out_dir" STEERABLE = ALWAYS +{ + "^$" :: "Empty: use IO::out_dir" + ".+" :: "Not empty: directory name" +} "" + STRING out_vars "Variables to output in CarpetIOHDF5 file format" STEERABLE = ALWAYS { "" :: "List of group or variable names" @@ -109,6 +115,11 @@ CCTK_STRING out2D_vars "Variables to output in 2D HDF5 file format" STEERABLE = "" :: "List of group or variable names" } "" +CCTK_STRING out3D_vars "Variables to output in 3D HDF5 file format" STEERABLE = ALWAYS +{ + "" :: "List of group or variable names" +} "" + STRING out_extension "File extension to use for CarpetIOHDF5 output" STEERABLE = ALWAYS { "" :: "File extension (including a leading dot, if desired)" @@ -150,6 +161,15 @@ KEYWORD out2D_criterion "Criterion to select 2D HDF5 slice output intervals, ove "time" :: "Output every that much coordinate time" } "default" +KEYWORD out3D_criterion "Criterion to select 3D HDF5 slice output intervals, overrides out_every" STEERABLE = ALWAYS +{ + "default" :: "Use IO::out_criterion" + "never" :: "Never output" + "iteration" :: "Output every so many iterations" + "divisor" :: "Output if (iteration % out_every) == 0." + "time" :: "Output every that much coordinate time" +} "default" + INT out_every "How often to do CarpetIOHDF5 output, overrides out_every" STEERABLE = ALWAYS { 1:* :: "Output every so many time steps" @@ -178,6 +198,13 @@ CCTK_INT out2D_every "How often to do 2D HDF5 slice output, overrides out_every" -2 :: "Use IO::out_every" } -2 +CCTK_INT out3D_every "How often to do 3D HDF5 slice output, overrides out_every" STEERABLE = ALWAYS +{ + 1:* :: "Output every so many time steps" + -1:0 :: "No output" + -2 :: "Use IO::out_every" +} -2 + REAL out_dt "How often to do CarpetIOHDF5 output, overrides 'IO::out_dt'" STEERABLE = ALWAYS { (0:* :: "In intervals of that much coordinate time" @@ -210,6 +237,14 @@ REAL out2D_dt "How often to do 2D HDF5 slice output, overrides IO::out_dt" STEER -2 :: "Default to IO::out_dt" } -2 +REAL out3D_dt "How often to do 3D HDF5 slice output, overrides IO::out_dt" STEERABLE = ALWAYS +{ + (0:* :: "In intervals of that much coordinate time" + 0 :: "As often as possible" + -1 :: "Disable output" + -2 :: "Default to IO::out_dt" +} -2 + ############################################################################ # 0D slice output diff --git a/Carpet/CarpetIOHDF5/src/OutputSlice.cc b/Carpet/CarpetIOHDF5/src/OutputSlice.cc index 4ee4ffe26..a87fe0a79 100644 --- a/Carpet/CarpetIOHDF5/src/OutputSlice.cc +++ b/Carpet/CarpetIOHDF5/src/OutputSlice.cc @@ -30,7 +30,7 @@ namespace Carpet { #define GetParameter(parameter) \ outdim == 0 ? out0D_##parameter : \ outdim == 1 ? out1D_##parameter : \ - outdim == 2 ? out2D_##parameter : out_##parameter + outdim == 2 ? out2D_##parameter : out3D_##parameter namespace CarpetIOHDF5 { -- cgit v1.2.3