diff options
author | Thomas Radke <tradke@aei.mpg.de> | 2005-09-13 16:29:00 +0000 |
---|---|---|
committer | Thomas Radke <tradke@aei.mpg.de> | 2005-09-13 16:29:00 +0000 |
commit | 79b610c03867a7ee9489cef32f8bbfa86fea075a (patch) | |
tree | 3973e89c788a9c89aee189bd1674d3fca8194e6b | |
parent | 08063628c00a3b6238f29e5b985a6d998a48d3fd (diff) |
CarpetIOHDF5: don't checkpoint variables tagged as 'checkpoint="no"'
darcs-hash:20050913162936-776a0-7b3fa7d3f08c37321b6ea836178168131fa98964.gz
-rw-r--r-- | Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc b/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc index 4d74275a7..5b77379b1 100644 --- a/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc +++ b/Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc @@ -3,6 +3,7 @@ #include <map> #include <sstream> +#include "util_Table.h" #include "cctk.h" #include "cctk_Arguments.h" #include "cctk_Parameters.h" @@ -733,6 +734,23 @@ static int Checkpoint (const cGH* const cctkGH, int called_from) continue; } + int const len = Util_TableGetString (gdata.tagstable, 0, NULL, + "checkpoint"); + if (len > 0) { + char* value = new char[len + 1]; + Util_TableGetString (gdata.tagstable, len + 1, value, "checkpoint"); + if (len == sizeof ("no") - 1 and CCTK_Equals (value, "no")) { + continue; + } else if (not CCTK_Equals (value, "yes")) { + char* groupname = CCTK_GroupName (group); + CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, + "Ignoring unknown checkpoint tag '%s' for group '%s'", + value, groupname); + free (groupname); + } + delete[] value; + } + /* get the number of active timelevels */ gdata.numtimelevels = CCTK_ActiveTimeLevelsGI (cctkGH, group); |