EHF2P5PKVTMAUL5R5QSZ3DS3VLE7Z6SHJTCZAGRBTQ66Y7HZKNYQC
M5R6KQLXLGYSVKHVAX5AJKD6NYE6IM5Z6WVTR3BTKPJDNNKF3ARAC
UAAT6NQ2HFOTZZPJX63COUOSD2GLW2L5JMFSAKLFNNFUCGR4XP6AC
3ROBI6IPLFHSSNMGTZHYWIPCO342OKQLXHNWFJ3KMNQRNYMAMLKAC
RFUF3QUEOYDFA5H5BZJP7HVQ5LMCWCIO7MV32RQBDMVDULGQGO5QC
IUYUWJZ3KF2ZNIZREWYZO6DX4SRBLTXJ4ZL4L44H5RES6ZCQ6FFAC
722HZ7UFINNE3YKSYKP2NHZ5XEG5QQLQHSKC7PREJZR3EX6RDYUAC
GECUITHDXKCWB7HBCM7EA5Q56JDDWUVUWHMW2K6OM7UW36DFAZ3QC
BVR7DVINVPQG7PA6Z7QYVYNQ43YZL7XCC6AOMSMWMGAAB2Q43STAC
A7ETPFXEHA2RM4LINSBVMJJ3G62NF7Q5ZQOKJPNJK3YOQ5WS5HKAC
BPRNUTY7MHK7LK4EY5MY5OFFG3ABOL7LWXD574L35M74YSQPULFAC
IL5XPFSWQX3OWZHEUSDP3R2IKVWHHOI6MNNBKU3P6MNBT6MVYJ2QC
}
}
// Set grid scalars to nan
void poison_invalid(const GHExt::GlobalData::ScalarGroupData &scalargroupdata, int vi,
int tl) {
DECLARE_CCTK_PARAMETERS;
if (!poison_undefined_values)
return;
const valid_t &valid = scalargroupdata.valid.at(tl).at(vi);
if (valid.valid_int && valid.valid_bnd)
return;
// scalar have no boundary so we expect it to alway be valid
assert(valid.valid_bnd);
if (!valid.valid_int) {
CCTK_REAL *restrict const ptr = scalargroupdata.data.at(tl).at(vi);
*ptr = 0.0 / 0.0;
CCTK_VERROR("Grid Scalar \"%s\" has nans on time level %d; expected valid %s",
CCTK_FullVarName(scalargroupdata.firstvarindex + vi),
CCTK_VERROR("%s: Grid Scalar \"%s\" has nans on time level %d; expected valid %s",
msg().c_str(), CCTK_FullVarName(scalargroupdata.firstvarindex + vi),
check_valid(leveldata, leveldata.groupdata.at(rd.gi), rd.vi, rd.tl);
check_valid(leveldata, leveldata.groupdata.at(rd.gi), rd.vi, rd.tl, [&]() {
ostringstream buf;
buf << "CallFunction iteration " << cctkGH->cctk_iteration << " "
<< attribute->where << ": " << attribute->thorn
<< "::" << attribute->routine << " checking input";
return buf.str();
});
check_valid(globaldata.scalargroupdata.at(rd.gi), rd.vi, rd.tl);
check_valid(globaldata.scalargroupdata.at(rd.gi), rd.vi, rd.tl, [&]() {
ostringstream buf;
buf << "CallFunction iteration " << cctkGH->cctk_iteration << " "
<< attribute->where << ": " << attribute->thorn
<< "::" << attribute->routine << " checking input";
return buf.str();
});
check_valid(leveldata, leveldata.groupdata.at(wr.gi), wr.vi, wr.tl);
check_valid(leveldata, leveldata.groupdata.at(wr.gi), wr.vi, wr.tl, [&]() {
ostringstream buf;
buf << "CallFunction iteration " << cctkGH->cctk_iteration << " "
<< attribute->where << ": " << attribute->thorn
<< "::" << attribute->routine << " checking output";
return buf.str();
});
check_valid(globaldata.scalargroupdata.at(wr.gi), wr.vi, wr.tl);
check_valid(globaldata.scalargroupdata.at(wr.gi), wr.vi, wr.tl, [&]() {
ostringstream buf;
buf << "CallFunction iteration " << cctkGH->cctk_iteration << " "
<< attribute->where << ": " << attribute->thorn
<< "::" << attribute->routine << " checking output";
return buf.str();
});
auto &restrict groupdata = leveldata.groupdata.at(inv.gi);
cGroup group;
int ierr = CCTK_GroupData(inv.gi, &group);
assert(!ierr);
GHExt::CommonGroupData * groupdata = group.grouptype == CCTK_GF ?
static_cast<GHExt::CommonGroupData *>(&leveldata.groupdata.at(inv.gi)) :
static_cast<GHExt::CommonGroupData *>(&globaldata.scalargroupdata.at(inv.gi));
check_valid(leveldata, groupdata, inv.vi, inv.tl, [&]() {
ostringstream buf;
buf << "CallFunction iteration " << cctkGH->cctk_iteration << " "
<< attribute->where << ": " << attribute->thorn
<< "::" << attribute->routine << " checking output";
return buf.str();
});
if (group.grouptype == CCTK_GF) {
check_valid(leveldata, leveldata.groupdata.at(inv.gi), inv.vi, inv.tl, [&]() {
ostringstream buf;
buf << "CallFunction iteration " << cctkGH->cctk_iteration << " "
<< attribute->where << ": " << attribute->thorn
<< "::" << attribute->routine << " checking output";
return buf.str();
});
} else {
check_valid(globaldata.scalargroupdata.at(inv.gi), inv.vi, inv.tl, [&]() {
ostringstream buf;
buf << "CallFunction iteration " << cctkGH->cctk_iteration << " "
<< attribute->where << ": " << attribute->thorn
<< "::" << attribute->routine << " checking output";
return buf.str();
});
}