diff --git a/CarpetX/src/driver.cxx b/CarpetX/src/driver.cxx index aed7fe00f..b4f3bc4c4 100644 --- a/CarpetX/src/driver.cxx +++ b/CarpetX/src/driver.cxx @@ -561,6 +561,8 @@ amrex::Interpolater *get_interpolator(const std::array indextype) { return interp_t::natural; else if (CCTK_EQUALS(prolongation_type, "poly-cons3lfb")) return interp_t::poly_cons3lfb; + else if (CCTK_EQUALS(prolongation_type, "poly-eno3lfb")) + return interp_t::poly_eno3lfb; else assert(0); }(); @@ -848,27 +850,6 @@ amrex::Interpolater *get_interpolator(const std::array indextype) { switch (prolongation_order) { - case 1: - switch ((indextype[0] << 2) | (indextype[1] << 1) | (indextype[2] << 0)) { - case 0b000: - return &prolongate_eno_3d_rf2_c000_o1; - case 0b001: - return &prolongate_eno_3d_rf2_c001_o1; - case 0b010: - return &prolongate_eno_3d_rf2_c010_o1; - case 0b011: - return &prolongate_eno_3d_rf2_c011_o1; - case 0b100: - return &prolongate_eno_3d_rf2_c100_o1; - case 0b101: - return &prolongate_eno_3d_rf2_c101_o1; - case 0b110: - return &prolongate_eno_3d_rf2_c110_o1; - case 0b111: - return &prolongate_eno_3d_rf2_c111_o1; - } - break; - case 3: switch ((indextype[0] << 2) | (indextype[1] << 1) | (indextype[2] << 0)) { case 0b000: @@ -1164,6 +1145,98 @@ amrex::Interpolater *get_interpolator(const std::array indextype) { } break; + case interp_t::poly_eno3lfb: + + switch (prolongation_order) { + + case 1: + switch ((indextype[0] << 2) | (indextype[1] << 1) | (indextype[2] << 0)) { + case 0b000: + return &prolongate_poly_eno3lfb_3d_rf2_c000_o1; + case 0b001: + return &prolongate_poly_eno3lfb_3d_rf2_c001_o1; + case 0b010: + return &prolongate_poly_eno3lfb_3d_rf2_c010_o1; + case 0b011: + return &prolongate_poly_eno3lfb_3d_rf2_c011_o1; + case 0b100: + return &prolongate_poly_eno3lfb_3d_rf2_c100_o1; + case 0b101: + return &prolongate_poly_eno3lfb_3d_rf2_c101_o1; + case 0b110: + return &prolongate_poly_eno3lfb_3d_rf2_c110_o1; + case 0b111: + return &prolongate_poly_eno3lfb_3d_rf2_c111_o1; + } + break; + + case 3: + switch ((indextype[0] << 2) | (indextype[1] << 1) | (indextype[2] << 0)) { + case 0b000: + return &prolongate_poly_eno3lfb_3d_rf2_c000_o3; + case 0b001: + return &prolongate_poly_eno3lfb_3d_rf2_c001_o3; + case 0b010: + return &prolongate_poly_eno3lfb_3d_rf2_c010_o3; + case 0b011: + return &prolongate_poly_eno3lfb_3d_rf2_c011_o3; + case 0b100: + return &prolongate_poly_eno3lfb_3d_rf2_c100_o3; + case 0b101: + return &prolongate_poly_eno3lfb_3d_rf2_c101_o3; + case 0b110: + return &prolongate_poly_eno3lfb_3d_rf2_c110_o3; + case 0b111: + return &prolongate_poly_eno3lfb_3d_rf2_c111_o3; + } + break; + + case 5: + switch ((indextype[0] << 2) | (indextype[1] << 1) | (indextype[2] << 0)) { + case 0b000: + return &prolongate_poly_eno3lfb_3d_rf2_c000_o5; + case 0b001: + return &prolongate_poly_eno3lfb_3d_rf2_c001_o5; + case 0b010: + return &prolongate_poly_eno3lfb_3d_rf2_c010_o5; + case 0b011: + return &prolongate_poly_eno3lfb_3d_rf2_c011_o5; + case 0b100: + return &prolongate_poly_eno3lfb_3d_rf2_c100_o5; + case 0b101: + return &prolongate_poly_eno3lfb_3d_rf2_c101_o5; + case 0b110: + return &prolongate_poly_eno3lfb_3d_rf2_c110_o5; + case 0b111: + return &prolongate_poly_eno3lfb_3d_rf2_c111_o5; + } + break; + +#if 0 + case 7: + switch ((indextype[0] << 2) | (indextype[1] << 1) | (indextype[2] << 0)) { + case 0b000: + return &prolongate_poly_eno3lfb_3d_rf2_c000_o7; + case 0b001: + return &prolongate_poly_eno3lfb_3d_rf2_c001_o7; + case 0b010: + return &prolongate_poly_eno3lfb_3d_rf2_c010_o7; + case 0b011: + return &prolongate_poly_eno3lfb_3d_rf2_c011_o7; + case 0b100: + return &prolongate_poly_eno3lfb_3d_rf2_c100_o7; + case 0b101: + return &prolongate_poly_eno3lfb_3d_rf2_c101_o7; + case 0b110: + return &prolongate_poly_eno3lfb_3d_rf2_c110_o7; + case 0b111: + return &prolongate_poly_eno3lfb_3d_rf2_c111_o7; + } + break; +#endif + } + break; + case interp_t::unset: // do nothing; errors are handled below break; diff --git a/CarpetX/src/prolongate_3d_rf2.hxx b/CarpetX/src/prolongate_3d_rf2.hxx index 7a95bcb21..5eced083f 100644 --- a/CarpetX/src/prolongate_3d_rf2.hxx +++ b/CarpetX/src/prolongate_3d_rf2.hxx @@ -386,19 +386,19 @@ extern prolongate_3d_rf2 extern prolongate_3d_rf2 prolongate_eno_3d_rf2_c000_o5; -extern prolongate_3d_rf2 +extern prolongate_3d_rf2 prolongate_eno_3d_rf2_c001_o5; -extern prolongate_3d_rf2 +extern prolongate_3d_rf2 prolongate_eno_3d_rf2_c010_o5; -extern prolongate_3d_rf2 +extern prolongate_3d_rf2 prolongate_eno_3d_rf2_c011_o5; -extern prolongate_3d_rf2 +extern prolongate_3d_rf2 prolongate_eno_3d_rf2_c100_o5; -extern prolongate_3d_rf2 +extern prolongate_3d_rf2 prolongate_eno_3d_rf2_c101_o5; -extern prolongate_3d_rf2 +extern prolongate_3d_rf2 prolongate_eno_3d_rf2_c110_o5; -extern prolongate_3d_rf2 +extern prolongate_3d_rf2 prolongate_eno_3d_rf2_c111_o5; // Hermite interpolation