5IAXY3XZJTRMMVT2OVIJ6OXQJI6OJPTPCHHA4IVLVMHANCCC5NKAC
33IC3UHCEPZLGS5ACS2JXHGT6CRU5LXU6PM6RDHCERPOIELVRVXQC
7Y37CMWGUQY3IOMFZW46UINY2W5DIEE3TXGN7RDKYZO6FHCLHDBQC
2DKSL6DKZAIYQUJGDULORCKU5K4Z5Z3W4RIKQYDSLKMCNQNDZFBAC
722HZ7UFINNE3YKSYKP2NHZ5XEG5QQLQHSKC7PREJZR3EX6RDYUAC
QN2UTSQP4IMCMVXZNR24J22N24ASGXF6EWXQ2P3VWVQERUPFAFDQC
KG47IF4CPCUT3BHS34WDRHTH5HYMBTY4OSTB3X7APR2E5ZJ32IYQC
MSBBCXVGD3GRLE5KAI6BKAFRV7SQUWI2SNN43AJAUD3ISRCEXY6QC
UUGQGVC4WEKN64WAP7F5QPS2UHGQB5ZLMFRIYNWKMIEBDO3QRX4AC
2DD222JSYRPHTXKSRXLSOMSCQPZUORNFLLO2P3GMIDELAAMD5MEQC
U77PE56ICORZNQW33NXGSEMW7GDHCSSZ4EXB6OHBJSHEG6WHYSSQC
WE6MDRN5SPK3THM4COLQFE3IUWBCQ5ZYUIAUCBJAZVEMMOVTNBOAC
BVR7DVINVPQG7PA6Z7QYVYNQ43YZL7XCC6AOMSMWMGAAB2Q43STAC
2XYZZL42IEZHGDJA6NDKGSQKGJP24LOTLFJ6RNHOKWHHSUYIHGKQC
ActiveThorns = "
AMReX
IOUtil
WaveToyAMReX
"
$nlevels = 6
$ncells = 16
Cactus::cctk_show_schedule = no
Cactus::cctk_itlast = $ncells * 2 ** ($nlevels - 1) * 2
# AMReX::verbose = yes
AMReX::ncells_x = $ncells
AMReX::ncells_y = $ncells
AMReX::ncells_z = $ncells
AMReX::max_num_levels = $nlevels
AMReX::regrid_every = 16
AMReX::regrid_error_threshold = 0.01 #TODO 0.1
AMReX::dtfac = 0.5
WaveToyAMReX::initial_condition = "Gaussian"
# WaveToyAMReX::spatial_frequency_x = 0.5
# WaveToyAMReX::spatial_frequency_y = 0.0
# WaveToyAMReX::spatial_frequency_z = 0.0
IO::out_dir = $parfile
IO::out_every = 16 #TODO $ncells * 2 ** ($nlevels - 1) / 2
// periodic boundaries
const BCRec bcrec(BCType::int_dir, BCType::int_dir, BCType::int_dir,
BCType::int_dir, BCType::int_dir, BCType::int_dir);
// boundary conditions
const BCRec bcrec(periodic_x ? BCType::int_dir : BCType::reflect_odd,
periodic_y ? BCType::int_dir : BCType::reflect_odd,
periodic_z ? BCType::int_dir : BCType::reflect_odd,
periodic_x ? BCType::int_dir : BCType::reflect_odd,
periodic_y ? BCType::int_dir : BCType::reflect_odd,
periodic_z ? BCType::int_dir : BCType::reflect_odd);
// periodic boundaries
const BCRec bcrec(BCType::int_dir, BCType::int_dir, BCType::int_dir,
BCType::int_dir, BCType::int_dir, BCType::int_dir);
// boundary conditions
const BCRec bcrec(periodic_x ? BCType::int_dir : BCType::reflect_odd,
periodic_y ? BCType::int_dir : BCType::reflect_odd,
periodic_z ? BCType::int_dir : BCType::reflect_odd,
periodic_x ? BCType::int_dir : BCType::reflect_odd,
periodic_y ? BCType::int_dir : BCType::reflect_odd,
periodic_z ? BCType::int_dir : BCType::reflect_odd);
void RegridLevel(int level) {
DECLARE_CCTK_PARAMETERS;
if (verbose)
CCTK_VINFO("RegridLevel level %d", level);
assert(level < int(ghext->leveldata.size()));
GHExt::LevelData &leveldata = ghext->leveldata.at(level);
for (auto &groupdata : leveldata.groupdata) {
for (int tl = 0; tl < int(groupdata.mfab.size()); ++tl) {
#warning "TODO"
assert(0);
groupdata.mfab.at(tl) =
make_unique<MultiFab>(ghext->amrcore->boxArray(level),
ghext->amrcore->DistributionMap(level),
groupdata.numvars, ghost_size);
}
}
}
// periodic boundaries
const BCRec bcrec(BCType::int_dir, BCType::int_dir, BCType::int_dir,
BCType::int_dir, BCType::int_dir, BCType::int_dir);
// boundary conditions
const BCRec bcrec(periodic_x ? BCType::int_dir : BCType::reflect_odd,
periodic_y ? BCType::int_dir : BCType::reflect_odd,
periodic_z ? BCType::int_dir : BCType::reflect_odd,
periodic_x ? BCType::int_dir : BCType::reflect_odd,
periodic_y ? BCType::int_dir : BCType::reflect_odd,
periodic_z ? BCType::int_dir : BCType::reflect_odd);