diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-02-19 05:13:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-02-19 05:13:00 +0000 |
commit | 4bbcf71c8ae06f468e4bc849e8a6dddc1b1ebd0e (patch) | |
tree | 21fa285db811c6913c8cc4537007fe377d20f7ea /Carpet/Carpet/src/Restrict.cc | |
parent | 5437b82d13df60940c5ab1d1ce9f9ea1ba2be320 (diff) |
Carpet: Small cleanup in Restrict.cc
darcs-hash:20080219051347-dae7b-9c9c8c0c114f630512fc5c216ced461765aaa9dd.gz
Diffstat (limited to 'Carpet/Carpet/src/Restrict.cc')
-rw-r--r-- | Carpet/Carpet/src/Restrict.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Carpet/Carpet/src/Restrict.cc b/Carpet/Carpet/src/Restrict.cc index 7abee5b2f..fbe9f59af 100644 --- a/Carpet/Carpet/src/Restrict.cc +++ b/Carpet/Carpet/src/Restrict.cc @@ -40,11 +40,12 @@ namespace Carpet { // remove all groups with are non-GFs, empty, or have no storage assigned vector<int> groups; + groups.reserve (CCTK_NumGroups()); for (int group = 0; group < CCTK_NumGroups(); ++group) { if (CCTK_GroupTypeI(group) == CCTK_GF - && CCTK_NumVarsInGroupI(group) > 0 - && CCTK_QueryGroupStorageI(cgh, group)) { + and CCTK_NumVarsInGroupI(group) > 0 + and CCTK_QueryGroupStorageI(cgh, group)) { groups.push_back (group); } } @@ -63,7 +64,7 @@ namespace Carpet { const int tl = 0; - for (comm_state state; ! state.done(); state.step()) { + for (comm_state state; not state.done(); state.step()) { for (int g = 0; g < (int)groups.size(); ++g) { const int group = groups[g]; for (int m=0; m<(int)arrdata.at(group).size(); ++m) { |