diff options
author | tradke <tradke@4825ed28-b72c-4eae-9704-e50c059e567d> | 2000-09-22 14:21:42 +0000 |
---|---|---|
committer | tradke <tradke@4825ed28-b72c-4eae-9704-e50c059e567d> | 2000-09-22 14:21:42 +0000 |
commit | b9f4c2e40c5013624a2a61e92fda1ab133eda073 (patch) | |
tree | 8f2bc3faa53ac5771e63b4e5053f2c2db0046617 /src/Output2D.c | |
parent | 99019aafa0ad4b1580799744004ea222ecf9f96c (diff) |
Made IOHDF5 compiling again.
Put in all the recent (mostly name) changes from IOUtil and the flesh.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5/trunk@19 4825ed28-b72c-4eae-9704-e50c059e567d
Diffstat (limited to 'src/Output2D.c')
-rw-r--r-- | src/Output2D.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/Output2D.c b/src/Output2D.c index b07efc8..021b258 100644 --- a/src/Output2D.c +++ b/src/Output2D.c @@ -18,7 +18,6 @@ #include "cctk.h" #include "cctk_Parameters.h" -#include "CactusBase/IOUtil/src/ioGH.h" #include "ioHDF5GH.h" @@ -26,6 +25,7 @@ int IOHDF5_TimeFor2D (cGH *GH, int index); int IOHDF5_Output2DVarAs (cGH *GH, const char *var, const char *alias); static void CheckSteerableParameters (ioHDF5GH *myGH); +static void SetOutputFlag (int index, const char *optstring, void *arg); /*@@ @@ -262,14 +262,33 @@ static void CheckSteerableParameters (ioHDF5GH *myGH) if (out2D_every > 0) myGH->out2D_every = out2D_every; - /* re-parse the 'out2D_vars' parameter if it was changed */ + /* re-parse the 'IOHDF5::out2D_vars' parameter if it was changed */ out2D_vars_current_nset = CCTK_ParameterQueryTimesSet ("out2D_vars", CCTK_THORNSTRING); if (out2D_vars_current_nset != out2D_vars_lastset) { - IOUtil_ParseVarsForOutput (out2D_vars, myGH->do_out2D); + memset (myGH->do_out2D, 0, CCTK_NumVars ()); + CCTK_TraverseString (out2D_vars, SetOutputFlag, myGH->do_out2D, + CCTK_GROUP_OR_VAR); /* Save the last setting of 'out2D_vars' parameter */ out2D_vars_lastset = out2D_vars_current_nset; } } + + +/* callback for CCTK_TraverseString() to set the output flag + for the given variable */ +static void SetOutputFlag (int index, const char *optstring, void *arg) +{ + char *flags = (char *) arg; + + + flags[index] = 1; + + if (optstring) + { + CCTK_VWarn (5, __LINE__, __FILE__, CCTK_THORNSTRING, + "Optional string '%s' in variable name ignored", optstring); + } +} |