10 #include "DataStructures/DataVector.hpp"
14 #include "NumericalAlgorithms/DiscontinuousGalerkin/NumericalFluxes/NumericalFluxHelpers.hpp"
15 #include "NumericalAlgorithms/DiscontinuousGalerkin/SimpleBoundaryData.hpp"
18 namespace EllipticNumericalFluxesTestHelpers {
23 template <
size_t Dim,
typename NumericalFluxComputer,
typename MakeRandomArgs>
24 void test_conservation(
const NumericalFluxComputer& numerical_flux_computer,
25 MakeRandomArgs&& make_random_args,
27 const size_t num_points = used_for_size.size();
29 typename NumericalFluxComputer::package_field_tags,
30 typename NumericalFluxComputer::package_extra_tags>;
31 const auto make_random_packaged_data = [&numerical_flux_computer,
32 &make_random_args, &num_points]() {
34 [&numerical_flux_computer, &num_points](
const auto... args) noexcept {
35 PackagedData packaged_data{num_points};
36 dg::NumericalFluxes::package_data(
make_not_null(&packaged_data),
37 numerical_flux_computer, args...);
42 const auto packaged_data_interior = make_random_packaged_data();
43 const auto packaged_data_exterior = make_random_packaged_data();
45 using Vars = Variables<typename NumericalFluxComputer::variables_tags>;
46 Vars n_dot_num_flux_interior(num_points,
48 dg::NumericalFluxes::normal_dot_numerical_fluxes(
49 make_not_null(&n_dot_num_flux_interior), numerical_flux_computer,
50 packaged_data_interior, packaged_data_exterior);
51 Vars n_dot_num_flux_exterior(num_points,
53 dg::NumericalFluxes::normal_dot_numerical_fluxes(
54 make_not_null(&n_dot_num_flux_exterior), numerical_flux_computer,
55 packaged_data_exterior, packaged_data_interior);