BSMJ4V7GV3EOGY4KCSTOJQUOFE2OOCIKQETE4WC2WRNLWBQIBW3QC
KCIWCVZOHG44WBOLKI2XK33WPHPRI5FWCETF4AOGTPZISKCW3CLQC
WNIZUZ26W6RAWU2D4XTX5KU5D63VGG74RXB2W4N4M2VDQNE6T6UQC
722HZ7UFINNE3YKSYKP2NHZ5XEG5QQLQHSKC7PREJZR3EX6RDYUAC
BPRNUTY7MHK7LK4EY5MY5OFFG3ABOL7LWXD574L35M74YSQPULFAC
33IC3UHCEPZLGS5ACS2JXHGT6CRU5LXU6PM6RDHCERPOIELVRVXQC
BVR7DVINVPQG7PA6Z7QYVYNQ43YZL7XCC6AOMSMWMGAAB2Q43STAC
YIQN7NJTGEVKW7JZHL6CTH6EPCIXCNBYNURIGXPYZAOUX3VAJQMAC
2XYZZL42IEZHGDJA6NDKGSQKGJP24LOTLFJ6RNHOKWHHSUYIHGKQC
2DKSL6DKZAIYQUJGDULORCKU5K4Z5Z3W4RIKQYDSLKMCNQNDZFBAC
WASO7G5FJXRXWNH2U2FLUNEKU6VE63OI3HUYP64BVD4LMD6KE7OQC
TOBGHRPKEPSXDN56WGSZNWOMCBVJ4KUSLWYWI56MC2RR3MM3KLZAC
UTHNLH3J3VG7BBJPOKGE6DY7Z2QHDLY72TR2VMEDQYP73SIWZGKAC
PG2P3JQPLWZRLCAJ7JY2B7G7AM5DHOE2CJUKIPWREI3NAUKZF3TAC
FEMASUBNU32NSG4DNXZX54CGCA57PVRGYO46L3A6F2EJ4BCSJ3SAC
// Ensure grid functions are not nan
void check_valid(const GHExt::LevelData &leveldata,
const GHExt::LevelData::GroupData &groupdata, int vi, int tl) {
DECLARE_CCTK_PARAMETERS;
if (!poison_undefined_values)
return;
const valid_t &valid = groupdata.valid.at(tl).at(vi);
if (!valid.valid_int && !valid.valid_bnd)
return;
const auto mfitinfo = MFItInfo().SetDynamic(true).EnableTiling(
{max_tile_size_x, max_tile_size_y, max_tile_size_z});
#pragma omp parallel
for (MFIter mfi(*leveldata.mfab0, mfitinfo); mfi.isValid(); ++mfi) {
const GridPtrDesc grid(leveldata, mfi);
const Array4<const CCTK_REAL> &vars = groupdata.mfab.at(tl)->array(mfi);
const CCTK_REAL *restrict const ptr = grid.ptr(vars, vi);
if (valid.valid_int) {
if (valid.valid_bnd) {
grid.loop_all(groupdata.indextype, [&](const Loop::PointDesc &p) {
assert(!isnan(ptr[p.idx]));
});
} else {
grid.loop_int(groupdata.indextype, [&](const Loop::PointDesc &p) {
assert(!isnan(ptr[p.idx]));
});
}
} else {
if (valid.valid_bnd) {
grid.loop_bnd(groupdata.indextype, [&](const Loop::PointDesc &p) {
assert(!isnan(ptr[p.idx]));
});
} else {
assert(0);
}
}
}
} // namespace AMReX
for (int vi = 0; vi < groupdata.numvars; ++vi)
assert(fine_groupdata.valid.at(tl).at(vi).valid_int &&
fine_groupdata.valid.at(tl).at(vi).valid_bnd &&
for (int vi = 0; vi < groupdata.numvars; ++vi) {
assert(finegroupdata.valid.at(tl).at(vi).valid_int &&
finegroupdata.valid.at(tl).at(vi).valid_bnd &&