23 std::set<unsigned int> flux_regions;
25 unsigned int i_side = 0;
27 for (
const auto & W_pair : W_pairs)
29 const auto & WL = W_pair.first;
30 const auto & WR = W_pair.second;
38 const auto FLR = flux.getFlux(i_side, 0,
true, UL, UR, 1.0);
39 const auto FRL = flux.getFlux(i_side, 0,
false, UL, UR, 1.0);
41 flux_regions.insert(flux.getLastRegionIndex());
43 const auto FRL_flipped = flux.getFlux(i_side, 0,
true, UR, UL, -1.0);
44 const auto FLR_flipped = flux.getFlux(i_side, 0,
false, UR, UL, -1.0);
46 flux_regions.insert(flux.getLastRegionIndex());
48 for (
unsigned int i = 0; i < FLR.size(); ++i)
50 REL_TEST(FLR[i], FLR_flipped[i], REL_TOL_CONSISTENCY);
51 REL_TEST(FRL[i], FRL_flipped[i], REL_TOL_CONSISTENCY);
56 EXPECT_TRUE(flux_regions.size() == flux.getNumberOfRegions());
64 unsigned int i_side = 0;
66 for (
const auto & W : W_list)
73 const auto & FL_computed_pos = flux.getFlux(i_side, 0,
true, U, U, 1.0);
74 const auto & FR_computed_pos = flux.getFlux(i_side, 0,
false, U, U, 1.0);
77 const auto & FL_computed_neg = flux.getFlux(i_side, 0,
true, U, U, -1.0);
78 const auto & FR_computed_neg = flux.getFlux(i_side, 0,
false, U, U, -1.0);
81 for (
unsigned int i = 0; i < FL_computed_pos.size(); ++i)
83 REL_TEST(FL_computed_pos[i], F_expected[i], REL_TOL_CONSISTENCY);
84 REL_TEST(FR_computed_pos[i], F_expected[i], REL_TOL_CONSISTENCY);
86 REL_TEST(FL_computed_neg[i], F_expected[i], REL_TOL_CONSISTENCY);
87 REL_TEST(FR_computed_neg[i], F_expected[i], REL_TOL_CONSISTENCY);
void testSymmetry()
Runs the symmetry test(s)
virtual std::vector< ADReal > computeFluxFromPrimitive(const std::vector< ADReal > &W, const ADReal &A) const =0
Computes the 1D flux vector from the primitive solution.
virtual std::vector< std::pair< std::vector< ADReal >, std::vector< ADReal > > > getPrimitiveSolutionsSymmetryTest() const =0
Gets a vector of pairs of primitive solution vectors to use for symmetry test.
void testConsistency()
Runs the consistency test(s)
virtual std::vector< ADReal > computeConservativeSolution(const std::vector< ADReal > &W, const ADReal &A) const =0
Computes the conservative solution from the primitive solution.
virtual std::vector< std::vector< ADReal > > getPrimitiveSolutionsConsistencyTest() const =0
Gets a vector of primitive solution vectors to use for consistency test.
virtual const NumericalFlux1D & createFluxObject()=0
Creates the flux object to be tested.