NKZ62JLSJQ7WH6ERIPBWSU63CAP4H3GHYCUL6JKQELBY7V33HGOAC
DQZRKU4B6C3WWWXFMBBSVKYD5AXDGUMHHPACVWKERGKB5WLHZGYAC
N3HG6SWTZQ4EVDYZYNKLDPVCSGYVGN5PK37ULA2ZV7CIRYHUUSGQC
AW3GEKCXENPOTX6J57FBCK3IOKNGROONVUI52AGVDKFB7GASXWMAC
QQ4Q3VCFYAV5H3C2GY4RUUZWMKQX3NHR2W3FFHH63ZFLY4I6L3DQC
7XUTAB76BF7WTONVKH2Y7WLIYHOSAPSCIVRU7Y7SKZWPITWOS2TAC
LY3PYR4JIRLBS3MH2LVHNFOXGR4NMNTZRA4LMYITZ5QPCT554S4AC
XIVFKBY3NZR3BGMKVLIW7GYHDAEN27DM75YPVMOOQGK2F5N4A6KQC
BVO33OXTG3QDBJ5YLBBVMUDHZGVFE777UOGZKVAHQK6MSDVR5RRAC
722HZ7UFINNE3YKSYKP2NHZ5XEG5QQLQHSKC7PREJZR3EX6RDYUAC
24A4OZBZBQ6QXIQ3EOOCQIBTOWRA32TMSQ4CCL3LKIJVJPKZFHVQC
DGEGTDYVGRHEGNFDHCCVTD6AVLRJ2XHDXQPWR5MMR62V5NU2XGIQC
GSGI6HIWST43XFEORCMKH6VPEGXHEZG5EK4JUUNWP3XFYUKGNA3AC
2V4VNNOWTOFSM22PBTFKP73NMTFDYCHFKWTMD4BJVSXA3DGI33KAC
VWANG2UUPKW6YVZ5CGFXSTLQYQPINOA24M3BEITIZGIX6H3WNRHQC
FIZ4UQEPE2TMH2KR47KKJS2B24LRHZPB7M6MCEI4RUCOBV56JU5QC
if (!conservative_prolongation) {
enum class interp_t { unset, interpolate, conservative, ddf };
static interp_t interp = interp_t::unset;
if (interp == interp_t::unset) {
if (CCTK_EQUALS(prolongation_type, "interpolate")) {
interp = interp_t::interpolate;
} else if (CCTK_EQUALS(prolongation_type, "conservative")) {
interp = interp_t::conservative;
} else if (CCTK_EQUALS(prolongation_type, "ddf")) {
interp = interp_t::ddf;
} else {
assert(0);
}
}
assert(interp != interp_t::unset);
switch (interp) {
case interp_t::interpolate:
} // if conservative_prolongation
break;
case interp_t::ddf:
switch ((indextype[0] << 2) | (indextype[1] << 1) | (indextype[2] << 0)) {
case 0b000:
return &prolongate_ddf_3d_rf2_c000_o1;
case 0b001:
return &prolongate_ddf_3d_rf2_c001_o1;
case 0b010:
return &prolongate_ddf_3d_rf2_c010_o1;
case 0b011:
return &prolongate_ddf_3d_rf2_c011_o1;
case 0b100:
return &prolongate_ddf_3d_rf2_c100_o1;
case 0b101:
return &prolongate_ddf_3d_rf2_c101_o1;
case 0b110:
return &prolongate_ddf_3d_rf2_c110_o1;
case 0b111:
return &prolongate_ddf_3d_rf2_c111_o1;
}
break;
CCTK_VERROR("Unsupported index type 0b%d%d%d and for order %d", indextype[0],
indextype[1], indextype[2], prolongation_order);
case interp_t::unset:
// do nothing; errors are handled below
break;
} // switch prolongation_type
CCTK_VERROR("Unsupported combination of prolongation_type \"%s\", "
"prolongation order %d, and index type [%d,%d,%d]",
prolongation_type, prolongation_order, indextype[0], indextype[1],
indextype[2]);
prolongate_3d_rf2<0, 0, 0, false, false, false, 1, 1, 1>
prolongate_ddf_3d_rf2_c000_o1;
prolongate_3d_rf2<0, 0, 1, false, false, true, 1, 1, 0>
prolongate_ddf_3d_rf2_c001_o1;
prolongate_3d_rf2<0, 1, 0, false, true, false, 1, 0, 1>
prolongate_ddf_3d_rf2_c010_o1;
prolongate_3d_rf2<0, 1, 1, false, true, true, 1, 0, 0>
prolongate_ddf_3d_rf2_c011_o1;
prolongate_3d_rf2<1, 0, 0, true, false, false, 0, 1, 1>
prolongate_ddf_3d_rf2_c100_o1;
prolongate_3d_rf2<1, 0, 1, true, false, true, 0, 1, 0>
prolongate_ddf_3d_rf2_c101_o1;
prolongate_3d_rf2<1, 1, 0, true, true, false, 0, 0, 1>
prolongate_ddf_3d_rf2_c110_o1;
prolongate_3d_rf2<1, 1, 1, true, true, true, 0, 0, 0>
prolongate_ddf_3d_rf2_c111_o1;
// Prolongation operators for discrete differential forms:
// interpolating (non-conservative) for vertex centred directions,
// conservative for cell centred directions. We use linear
// interpolation for vertex centred and constant interpolation for
// cell centred directions.
extern prolongate_3d_rf2<0, 0, 0, false, false, false, 1, 1, 1>
prolongate_ddf_3d_rf2_c000_o1;
extern prolongate_3d_rf2<0, 0, 1, false, false, true, 1, 1, 0>
prolongate_ddf_3d_rf2_c001_o1;
extern prolongate_3d_rf2<0, 1, 0, false, true, false, 1, 0, 1>
prolongate_ddf_3d_rf2_c010_o1;
extern prolongate_3d_rf2<0, 1, 1, false, true, true, 1, 0, 0>
prolongate_ddf_3d_rf2_c011_o1;
extern prolongate_3d_rf2<1, 0, 0, true, false, false, 0, 1, 1>
prolongate_ddf_3d_rf2_c100_o1;
extern prolongate_3d_rf2<1, 0, 1, true, false, true, 0, 1, 0>
prolongate_ddf_3d_rf2_c101_o1;
extern prolongate_3d_rf2<1, 1, 0, true, true, false, 0, 0, 1>
prolongate_ddf_3d_rf2_c110_o1;
extern prolongate_3d_rf2<1, 1, 1, true, true, true, 0, 0, 0>
prolongate_ddf_3d_rf2_c111_o1;
int conservative_type;
const void *conservative_p =
CCTK_ParameterGet("conservative_prolongation", "AMReX", &conservative_type);
assert(conservative_p);
assert(conservative_type == PARAMETER_BOOLEAN);
const CCTK_INT conservative_prolongation =
*static_cast<const CCTK_INT*>(conservative_p);
int prolongation_type_type;
const void *prolongation_type_p =
CCTK_ParameterGet("prolongation_type", "AMReX", &prolongation_type_type);
assert(prolongation_type_p);
assert(prolongation_type_type == PARAMETER_KEYWORD);
const char* prolongation_type =
*static_cast<const char* const*>(prolongation_type_p);
const bool conservative_prolongation =
CCTK_EQUALS(prolongation_type, "conservative");
int conservative_type;
const void *conservative_p =
CCTK_ParameterGet("conservative_prolongation", "AMReX", &conservative_type);
assert(conservative_p);
assert(conservative_type == PARAMETER_BOOLEAN);
const CCTK_INT conservative_prolongation =
*static_cast<const CCTK_INT*>(conservative_p);
int prolongation_type_type;
const void *prolongation_type_p =
CCTK_ParameterGet("prolongation_type", "AMReX", &prolongation_type_type);
assert(prolongation_type_p);
assert(prolongation_type_type == PARAMETER_KEYWORD);
const char* prolongation_type =
*static_cast<const char* const*>(prolongation_type_p);
const bool conservative_prolongation =
CCTK_EQUALS(prolongation_type, "conservative");