diff options
author | Thomas Radke <tradke@aei.mpg.de> | 2006-05-12 11:55:00 +0000 |
---|---|---|
committer | Thomas Radke <tradke@aei.mpg.de> | 2006-05-12 11:55:00 +0000 |
commit | d41aa1e4406946e98059baa2c1f247650d991feb (patch) | |
tree | 90b563ee6562b91e2d2cf30578ebfc8aca45f601 /Carpet/CarpetIOHDF5 | |
parent | 8fde50d19e7344be32fb9fa631ca83107cbb3d1f (diff) |
CarpetIOHDF5: don't try to recover variables in groups which have no grid points (zero size)
darcs-hash:20060512115514-776a0-dba29d6e31a12d4cff6772e69bd1ef54e3aa2d8b.gz
Diffstat (limited to 'Carpet/CarpetIOHDF5')
-rw-r--r-- | Carpet/CarpetIOHDF5/src/Input.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Carpet/CarpetIOHDF5/src/Input.cc b/Carpet/CarpetIOHDF5/src/Input.cc index 73ed60c07..aa0f52854 100644 --- a/Carpet/CarpetIOHDF5/src/Input.cc +++ b/Carpet/CarpetIOHDF5/src/Input.cc @@ -322,6 +322,22 @@ int Recover (cGH* cctkGH, const char *basefilename, int called_from) } END_MAP_LOOP; } + // mark variables in groups with no grid points (size 0) as already done + for (int group = 0; group < group_bboxes.size(); group++) { + bool is_empty = true; + for (int map = 0; map < group_bboxes[group].size(); map++) { + is_empty &= group_bboxes[group][map].empty(); + } + if (is_empty) { + int vindex = CCTK_FirstVarIndexI (group); + const int last = vindex + CCTK_NumVarsInGroupI (group); + while (vindex < last) { + read_completely[vindex].assign (read_completely[vindex].size(), true); + vindex++; + } + } + } + const ioGH* ioUtilGH = (const ioGH*) CCTK_GHExtension (cctkGH, "IO"); // loop over all input files of this set |