diff options
author | schnetter <> | 2004-08-04 14:25:00 +0000 |
---|---|---|
committer | schnetter <> | 2004-08-04 14:25:00 +0000 |
commit | f5823f2c4e0adff6fc53ef4a4aab9743100cca05 (patch) | |
tree | d0e1e316d34549c7f25a93f08fb49bbd66de1d19 | |
parent | 9eedc6c0a0bb423ed650d301a371beabd9c5a209 (diff) |
Update loop over a bounding box to the not-so-recent change of the
Update loop over a bounding box to the not-so-recent change of the
iterator semantics.
darcs-hash:20040804142558-07bb3-ad9bf80bdcc1feb4fce2b05cc525950ba664816f.gz
-rw-r--r-- | Carpet/CarpetRegrid/src/automatic.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Carpet/CarpetRegrid/src/automatic.cc b/Carpet/CarpetRegrid/src/automatic.cc index 511c40ed4..a3b4da055 100644 --- a/Carpet/CarpetRegrid/src/automatic.cc +++ b/Carpet/CarpetRegrid/src/automatic.cc @@ -16,7 +16,7 @@ #include "regrid.hh" extern "C" { - static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/automatic.cc,v 1.4 2004/04/28 15:45:25 schnetter Exp $"; + static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetRegrid/src/automatic.cc,v 1.5 2004/08/04 16:25:58 schnetter Exp $"; CCTK_FILEVERSION(Carpet_CarpetRegrid_automatic_cc); } @@ -188,8 +188,12 @@ namespace CarpetRegrid { // (this doesn't work yet on multiple processors) assert (CCTK_nProcs(cctkGH)==1); int cnt = 0; - for (ibbox::iterator it=region.begin(); it!=region.end(); ++it) { - if (errordata[*it] > maxerror) ++cnt; + { + ibbox::iterator it=region.begin(); + do { + if (errordata[*it] > maxerror) ++cnt; + ++it; + } while (it!=region.end()); } const CCTK_REAL fraction = (CCTK_REAL)cnt / region.size(); const int width = maxval(region.shape() / region.stride()); |