1 #include "bound_preserving_limiter.h" 2 #include "physics/physics_factory.h" 6 template <
int dim,
typename real>
8 const int nstate_input,
10 : nstate(nstate_input)
11 , all_parameters(parameters_input) {}
14 template <
int dim,
int nstate,
typename real>
20 template <
int dim,
int nstate,
typename real>
22 const std::array<std::vector<real>,
nstate>& soln_at_q,
23 const unsigned int n_quad_pts,
24 const std::vector<real>& quad_weights)
26 std::array<real, nstate> soln_cell_avg;
27 for (
unsigned int istate = 0; istate <
nstate; ++istate) {
28 soln_cell_avg[istate] = 0;
32 for (
unsigned int istate = 0; istate <
nstate; ++istate) {
33 for (
unsigned int iquad = 0; iquad < n_quad_pts; ++iquad) {
34 soln_cell_avg[istate] += quad_weights[iquad]
35 * soln_at_q[istate][iquad];
Base Class for bound preserving limiters templated on state.
const int nstate
Number of states.
Files for the baseline physics.
BoundPreservingLimiter(const int nstate_input, const Parameters::AllParameters *const parameters_input)
Constructor.
Main parameter class that contains the various other sub-parameter classes.
std::array< real, nstate > get_soln_cell_avg(const std::array< std::vector< real >, nstate > &soln_at_q, const unsigned int n_quad_pts, const std::vector< real > &quad_weights)
Function to obtain the solution cell average.
Base Class for implementation of bound preserving limiters.
BoundPreservingLimiterState(const Parameters::AllParameters *const parameters_input)
Constructor.