aboutsummaryrefslogtreecommitdiff
path: root/Carpet
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2007-04-24 22:37:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2007-04-24 22:37:00 +0000
commit063aac347299b54ce7cec5d1e8b97172d469d7db (patch)
tree5c7127f94384b66ef676b0e6ed678209671ad589 /Carpet
parenta8485bd04ce129caff0e5edb6b487899fc28aa65 (diff)
CarpetRegrid2: Avoid accessing non-existing level information
Store information about the coarse grid in the vector regions as well, although this is not used for regridding later. darcs-hash:20070424223735-dae7b-5bb3bdd52d5ec0b912658a020de973f679f595ac.gz
Diffstat (limited to 'Carpet')
-rw-r--r--Carpet/CarpetRegrid2/src/regrid.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/Carpet/CarpetRegrid2/src/regrid.cc b/Carpet/CarpetRegrid2/src/regrid.cc
index a91454edc..ab178317e 100644
--- a/Carpet/CarpetRegrid2/src/regrid.cc
+++ b/Carpet/CarpetRegrid2/src/regrid.cc
@@ -264,6 +264,9 @@ namespace CarpetRegrid2 {
// The set of refined regions
vector <ibboxset> regions (1);
+ // Set up coarsest level
+ regions.at(0) = ibboxset (hh.extent (0, 0, 0));
+
// Loop over all centres
for (int n = 0; n < num_centres; ++ n) {
centre_description centre (cctkGH, n);
@@ -535,6 +538,7 @@ namespace CarpetRegrid2 {
// TODO: move this to the top, and check the current grid
// instead of the next coarser one
if (rl > 0) {
+ assert (not regions.at(rl-1).empty());
ibbox const & coarse = * regions.at(rl-1).begin();
i2vect const fdistance =