OJZWEAJRLOA5FZAC6FMGBQ6XFQFDNO55IRWLFWDAYWM54MUIU5LAC
S7LV6VRMBSJPJ765HYMGC5IZ4LCQRJ7VH3D3E36PD6LHVGPQWNYAC
722HZ7UFINNE3YKSYKP2NHZ5XEG5QQLQHSKC7PREJZR3EX6RDYUAC
KG47IF4CPCUT3BHS34WDRHTH5HYMBTY4OSTB3X7APR2E5ZJ32IYQC
UZAKARMGORRQG733ZUPJOEGL5FG243I32NCC2SRSFDCZKUQ5A52QC
2DD222JSYRPHTXKSRXLSOMSCQPZUORNFLLO2P3GMIDELAAMD5MEQC
RCLGQ2LZMFVPBPTU2G55DJ6HZPOGGTPZRZCY54VGP6YLHANJ2LAQC
WASO7G5FJXRXWNH2U2FLUNEKU6VE63OI3HUYP64BVD4LMD6KE7OQC
VAF66DTVLDWNG7N2PEQYEH4OH5SPSMFBXKPR2PU67IIM6CVPCJ7AC
QN2UTSQP4IMCMVXZNR24J22N24ASGXF6EWXQ2P3VWVQERUPFAFDQC
KQNKYNRSWOY2K7M5PY362RJT4CRUJVECVSCNGKSJJBPYI3NU4GDQC
for (const auto &restrict leveldata : ghext->leveldata) {
auto &restrict groupdata = leveldata.groupdata.at(gi);
if (groupdata.mfab.size() > 0) {
const int tl = 0;
auto &restrict groupdata0 = ghext->leveldata.at(0).groupdata.at(gi);
if (groupdata0.mfab.size() > 0) {
const int tl = 0;
string groupname = unique_ptr<char>(CCTK_GroupName(gi)).get();
groupname = regex_replace(groupname, regex("::"), "-");
for (auto &c : groupname)
c = tolower(c);
ostringstream buf;
buf << "wavetoy/" << groupname;
buf << ".it" << setw(6) << setfill('0') << cctk_iteration;
string filename = buf.str();
buf << "wavetoy/" << groupname;
buf << ".rl" << setw(2) << setfill('0') << leveldata.level;
buf << ".it" << setw(6) << setfill('0') << cctk_iteration;
string filename = buf.str();
buf << CCTK_VarName(groupdata0.firstvarindex + vi);
for (int i = 0; i < tl; ++i)
buf << "_p";
varnames.at(vi) = buf.str();
}
Vector<const MultiFab *> mfabs(ghext->leveldata.size());
Vector<Geometry> geoms(ghext->leveldata.size());
Vector<int> iters(ghext->leveldata.size());
Vector<IntVect> reffacts(ghext->leveldata.size());
for (const auto &restrict leveldata : ghext->leveldata) {
mfabs.at(leveldata.level) = &*leveldata.groupdata.at(gi).mfab.at(tl);
geoms.at(leveldata.level) = ghext->amrmesh->Geom(leveldata.level);
iters.at(leveldata.level) = cctk_iteration;
reffacts.at(leveldata.level) = IntVect{2, 2, 2};
}
Vector<string> varnames(groupdata.numvars);
for (int vi = 0; vi < groupdata.numvars; ++vi) {
ostringstream buf;
buf << CCTK_VarName(groupdata.firstvarindex + vi);
for (int i = 0; i < tl; ++i)
buf << "_p";
varnames.at(vi) = buf.str();
}
// TODO: Output all groups into a single file
WriteMultiLevelPlotfile(filename, mfabs.size(), mfabs, varnames, geoms,
cctk_time, iters, reffacts);
// TODO: Output all levels into a single file
// TODO: Output all groups into a single file
WriteSingleLevelPlotfile(filename, *groupdata.mfab.at(tl), varnames,
ghext->amrmesh->Geom(leveldata.level),
cctk_time, cctk_iteration);
}
count_vars += ghext->leveldata.at(0).groupdata.at(gi).numvars;