1 #ifndef __TVB_LIMITER__ 2 #define __TVB_LIMITER__ 4 #include "bound_preserving_limiter.h" 14 template<
int dim,
int nstate,
typename real>
28 std::array<std::vector<real>,
nstate> soln_at_q,
29 const unsigned int n_quad_pts,
30 const std::array<real, nstate> prev_cell_avg,
31 const std::array<real, nstate> soln_cell_avg,
32 const std::array<real, nstate> next_cell_avg,
33 const std::array<real, nstate> M,
38 const dealii::LinearAlgebra::distributed::Vector<double>& solution,
39 const dealii::hp::FECollection<dim>& fe_collection,
40 const dealii::hp::QCollection<dim>& volume_quadrature_collection,
42 const int poly_degree,
43 const std::vector<dealii::types::global_dof_index>& neigh_dofs_indices,
44 const unsigned int n_dofs_neigh_cell);
48 std::array<std::vector<real>,
nstate> soln_at_q,
49 const unsigned int n_quad_pts,
50 const std::vector<real>& quad_weights);
57 const double diff_next_state,
58 const double diff_prev_state,
59 const double cell_avg_state,
60 const bool left_face);
68 dealii::LinearAlgebra::distributed::Vector<double>& solution,
69 const dealii::DoFHandler<dim>& dof_handler,
70 const dealii::hp::FECollection<dim>& fe_collection,
71 const dealii::hp::QCollection<dim>& volume_quadrature_collection,
72 const unsigned int grid_degree,
73 const unsigned int max_degree,
74 const dealii::hp::FECollection<1> oneD_fe_collection_1state,
75 const dealii::hp::QCollection<1> oneD_quadrature_collection);
Base Class for bound preserving limiters templated on state.
TVBLimiter(const Parameters::AllParameters *const parameters_input)
Constructor.
void limit(dealii::LinearAlgebra::distributed::Vector< double > &solution, const dealii::DoFHandler< dim > &dof_handler, const dealii::hp::FECollection< dim > &fe_collection, const dealii::hp::QCollection< dim > &volume_quadrature_collection, const unsigned int grid_degree, const unsigned int max_degree, const dealii::hp::FECollection< 1 > oneD_fe_collection_1state, const dealii::hp::QCollection< 1 > oneD_quadrature_collection)
real apply_modified_minmod(const double a_state, const double M_state, const double h, const double diff_next_state, const double diff_prev_state, const double cell_avg_state, const bool left_face)
Function to apply modified_minmod using Thm3.7 in Chen, Shu 2017.
const int nstate
Number of states.
Files for the baseline physics.
std::array< std::vector< real >, nstate > limit_cell(std::array< std::vector< real >, nstate > soln_at_q, const unsigned int n_quad_pts, const std::array< real, nstate > prev_cell_avg, const std::array< real, nstate > soln_cell_avg, const std::array< real, nstate > next_cell_avg, const std::array< real, nstate > M, const double h)
Function to limit cell - apply minmod function, obtain theta (linear scaling value) and apply limiter...
Main parameter class that contains the various other sub-parameter classes.
Class for implementation of a TVD/TVB limiter derived from BoundPreservingLimiterState class...
std::array< real, nstate > get_neighbour_cell_avg(const dealii::LinearAlgebra::distributed::Vector< double > &solution, const dealii::hp::FECollection< dim > &fe_collection, const dealii::hp::QCollection< dim > &volume_quadrature_collection, OPERATOR::basis_functions< dim, 2 *dim, real > soln_basis, const int poly_degree, const std::vector< dealii::types::global_dof_index > &neigh_dofs_indices, const unsigned int n_dofs_neigh_cell)
Function to obtain the neighbour cell average.
~TVBLimiter()=default
Destructor.
std::array< real, nstate > get_current_cell_avg(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 current cell average.