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ex("CarpetX::refinement_level");
assert(gi_refinement_level >= 0);
vector<int> groups;
for (int n = 0; n < numgroups; ++n) {
int gi = groups0[n];
if (CCTK_GroupTypeI(gi) != CCTK_GF)
continue;
// Don't restrict the regridding error nor the refinement level
if (gi == gi_regrid_error || gi == gi_refinement_level)
continue;
// Don't restrict groups that have restriction disabled
groups.push_back(gi);
}
if (restrict_during_sync) {
if (current_level == -1)
for (int level = 0; level < int(ghext->leveldata.size()); ++level)
Restrict(level, groups);
else
Restrict(current_level, groups);
}
}
void Restrict(int level) {
const int gi_regrid_error = CCTK_GroupIndex("CarpetX::regrid_error");
assert(gi_regrid_error >= 0);
const int gi_refinement_level = CCTK_GroupIndex("CarpetX::refinement_level");
assert(gi_refinement_level >= 0);
const int numgroups = CCTK_NumGroups();
vector<int> groups;
groups.reserve(numgroups);
for (int gi = 0; gi < numgroups; ++gi) {
if (CCTK_GroupTypeI(gi) != CCTK_GF)
continue;
// Don't restrict the regridding error nor the refinement level
if (gi == gi_regrid_error || gi == gi_refinement_level)
continue;
// Don't restrict groups that have restriction disabled
const bool do_restrict = get_group_restrict_flag(gi);
if (!do_restrict)
continue;
groups.push_back(gi);