From 79b610c03867a7ee9489cef32f8bbfa86fea075a Mon Sep 17 00:00:00 2001 From: Thomas Radke Date: Tue, 13 Sep 2005 16:29:00 +0000 Subject: CarpetIOHDF5: don't checkpoint variables tagged as 'checkpoint="no"' darcs-hash:20050913162936-776a0-7b3fa7d3f08c37321b6ea836178168131fa98964.gz --- Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Carpet/CarpetIOHDF5/src/CarpetIOHDF5.cc') 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 #include +#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); -- cgit v1.2.3