void Restrict(int level) {
auto &leveldata = ghext->leveldata.at(level);
const auto &fineleveldata = ghext->leveldata.at(level + 1);
for (int gi = 0; gi < int(leveldata.groupdata.size()); ++gi) {
auto &groupdata = leveldata.groupdata.at(gi);
const auto &finegroupdata = fineleveldata.groupdata.at(gi);
// If there is more than one time level, then we don't restrict
// the oldest.
int ntls = groupdata.mfab.size();
int restrict_tl = ntls > 1 ? ntls - 1 : ntls;
const IntVect reffact{2, 2, 2};
for (int tl = 0; tl < restrict_tl; ++tl) {
amrex::average_down(*finegroupdata.mfab.at(tl), *groupdata.mfab.at(tl),
ghext->amrcore->Geom(level + 1),
ghext->amrcore->Geom(level), 0, groupdata.numvars,
reffact);
}
}
}