UEZKNPXXK5WU6B5LYRKGGYGBZ6T6TAZI26CWTJFUBUW2SJJOMV2AC
2A7Y7KPC7JW6QTW6DD7A7APXF4JIULFUNWONQXY667JCUXATJHXAC
IV3MLV677VWS7GLESBQZ4HRFNW5TBFBIGIBWXTCHAER3FQ7VG3GQC
M5R6KQLXLGYSVKHVAX5AJKD6NYE6IM5Z6WVTR3BTKPJDNNKF3ARAC
722HZ7UFINNE3YKSYKP2NHZ5XEG5QQLQHSKC7PREJZR3EX6RDYUAC
NZTFEMGJPN53J34S3MVUCL7TTRB4UG7JQM2R563OAHIRM4QPZOWAC
EHF2P5PKVTMAUL5R5QSZ3DS3VLE7Z6SHJTCZAGRBTQ66Y7HZKNYQC
BVR7DVINVPQG7PA6Z7QYVYNQ43YZL7XCC6AOMSMWMGAAB2Q43STAC
IUYUWJZ3KF2ZNIZREWYZO6DX4SRBLTXJ4ZL4L44H5RES6ZCQ6FFAC
RFUF3QUEOYDFA5H5BZJP7HVQ5LMCWCIO7MV32RQBDMVDULGQGO5QC
BPRNUTY7MHK7LK4EY5MY5OFFG3ABOL7LWXD574L35M74YSQPULFAC
void check_valid(const GHExt::GlobalData::ScalarGroupData &scalargroupdata, int vi,
int tl,
const function<string()> &msg) {
void check_valid(const GHExt::GlobalData::ScalarGroupData &scalargroupdata,
int vi, int tl, const function<string()> &msg) {
CCTK_VERROR("%s: Grid Scalar \"%s\" has nans on time level %d; expected valid %s",
msg().c_str(), CCTK_FullVarName(scalargroupdata.firstvarindex + vi),
tl, where);
CCTK_VERROR(
"%s: Grid Scalar \"%s\" has nans on time level %d; expected valid %s",
msg().c_str(), CCTK_FullVarName(scalargroupdata.firstvarindex + vi), tl,
where);
switch(rdwr) {
case rdwr_t::read:
where = RDWR.where_rd;
break;
case rdwr_t::write:
where = RDWR.where_wr;
break;
case rdwr_t::invalid:
where = RDWR.where_inv;
break;
default:
assert(0);
switch (rdwr) {
case rdwr_t::read:
where = RDWR.where_rd;
break;
case rdwr_t::write:
where = RDWR.where_wr;
break;
case rdwr_t::invalid:
where = RDWR.where_inv;
break;
default:
assert(0);
// TODO: something about this cast (https://stackoverflow.com/questions/6179314/casting-pointers-and-the-ternary-operator-have-i-reinvented-the-wheel)
const GHExt::CommonGroupData * groupdata = group.grouptype == CCTK_GF ?
static_cast<const GHExt::CommonGroupData *>(&leveldata.groupdata.at(rd.gi)) :
static_cast<const GHExt::CommonGroupData *>(&globaldata.scalargroupdata.at(rd.gi));
// TODO: something about this cast
// (https://stackoverflow.com/questions/6179314/casting-pointers-and-the-ternary-operator-have-i-reinvented-the-wheel)
const GHExt::CommonGroupData *groupdata =
group.grouptype == CCTK_GF
? static_cast<const GHExt::CommonGroupData *>(
&leveldata.groupdata.at(rd.gi))
: static_cast<const GHExt::CommonGroupData *>(
&globaldata.scalargroupdata.at(rd.gi));
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(
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, [&]() {
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, [&]() {
ostringstream buf;
buf << "CallFunction iteration " << cctkGH->cctk_iteration
<< " " << attribute->where << ": " << attribute->thorn
<< "::" << attribute->routine << " checking input";
return buf.str();
});
GHExt::CommonGroupData * groupdata = group.grouptype == CCTK_GF ?
static_cast<GHExt::CommonGroupData *>(&leveldata.groupdata.at(wr.gi)) :
static_cast<GHExt::CommonGroupData *>(&globaldata.scalargroupdata.at(wr.gi));
GHExt::CommonGroupData *groupdata =
group.grouptype == CCTK_GF
? static_cast<GHExt::CommonGroupData *>(
&leveldata.groupdata.at(wr.gi))
: static_cast<GHExt::CommonGroupData *>(
&globaldata.scalargroupdata.at(wr.gi));
GHExt::CommonGroupData * groupdata = group.grouptype == CCTK_GF ?
static_cast<GHExt::CommonGroupData *>(&leveldata.groupdata.at(wr.gi)) :
static_cast<GHExt::CommonGroupData *>(&globaldata.scalargroupdata.at(wr.gi));
GHExt::CommonGroupData *groupdata =
group.grouptype == CCTK_GF
? static_cast<GHExt::CommonGroupData *>(
&leveldata.groupdata.at(wr.gi))
: static_cast<GHExt::CommonGroupData *>(
&globaldata.scalargroupdata.at(wr.gi));
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(
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, [&]() {
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, [&]() {
ostringstream buf;
buf << "CallFunction iteration " << cctkGH->cctk_iteration
<< " " << attribute->where << ": " << attribute->thorn
<< "::" << attribute->routine << " checking output";
return buf.str();
});
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));
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, 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();
});
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();
});
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();
});
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();
});