diff options
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/Carpet/src/Restrict.cc | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/Carpet/Carpet/src/Restrict.cc b/Carpet/Carpet/src/Restrict.cc index 0c66308a8..f1b047384 100644 --- a/Carpet/Carpet/src/Restrict.cc +++ b/Carpet/Carpet/src/Restrict.cc @@ -17,10 +17,10 @@ namespace Carpet { using namespace std; // restricts a set of groups - static void RestrictGroups (const cGH* cgh, const vector<int>& groups); + static void RestrictGroups (const cGH* cctkGH, const vector<int>& groups); - void Restrict (const cGH* cgh) + void Restrict (const cGH* cctkGH) { DECLARE_CCTK_PARAMETERS; @@ -45,21 +45,21 @@ namespace Carpet { for (int group = 0; group < CCTK_NumGroups(); ++group) { if (CCTK_GroupTypeI(group) == CCTK_GF and CCTK_NumVarsInGroupI(group) > 0 - and CCTK_QueryGroupStorageI(cgh, group)) { + and CCTK_QueryGroupStorageI(cctkGH, group)) { groups.push_back (group); } } // Restrict - RestrictGroups (cgh, groups); + RestrictGroups (cctkGH, groups); // Synchronise - SyncGroups (cgh, groups); + SyncGroups (cctkGH, groups); } // restricts a set of groups which all have the same vartype - static void RestrictGroups (const cGH* cgh, const vector<int>& groups) { + static void RestrictGroups (const cGH* cctkGH, const vector<int>& groups) { DECLARE_CCTK_PARAMETERS; const int tl = 0; @@ -74,14 +74,15 @@ namespace Carpet { const CCTK_REAL time = vtt.at(m)->time (tl, reflevel, mglevel); const CCTK_REAL time1 = vtt.at(m)->time (0, reflevel, mglevel); - const CCTK_REAL time2 - = (cgh->cctk_time - cctk_initial_time) / delta_time; + const CCTK_REAL time2 = + (cctkGH->cctk_time - cctk_initial_time) / delta_time; + const CCTK_REAL time0 = + abs(time1) + abs(time2) + abs(cctkGH->cctk_delta_time); const CCTK_REAL eps = 1.0e-12; - assert (abs(time1 - time2) <= - eps * (abs(time1) + abs(time2) + abs(cgh->cctk_delta_time))); + assert (abs(time1 - time2) <= eps * time0); - for (int v = 0; v < (int)arrdata.at(group).at(m).data.size(); ++v) { - ggf *const gv = arrdata.at(group).at(m).data.at(v); + for (int v = 0; v < (int)arrdata.at(g).at(m).data.size(); ++v) { + ggf *const gv = arrdata.at(g).at(m).data.at(v); #if 0 for (int c = 0; c < vhh.at(m)->components(reflevel); ++c) { gv->ref_restrict (state, tl, reflevel, c, mglevel, time); |