1 #include "algebraic_rrk_ode_solver.h" 6 template <
int dim,
typename real,
typename MeshType>
14 template <
int dim,
typename real,
typename MeshType>
17 const std::vector<dealii::LinearAlgebra::distributed::Vector<double>> &rk_stage,
18 const dealii::LinearAlgebra::distributed::Vector<double> &
23 double denominator = 0;
34 gamma = (denominator < 1E-8) ? 1 : numerator/denominator;
38 template <
int dim,
typename real,
typename MeshType>
40 const dealii::LinearAlgebra::distributed::Vector<double> &stage_i,
41 const dealii::LinearAlgebra::distributed::Vector<double> &stage_j,
46 dealii::LinearAlgebra::distributed::Vector<double> temp;
49 if(dg->all_parameters->use_inverse_mass_on_the_fly){
50 dg->apply_global_mass_matrix(stage_j, temp);
52 dg->global_mass_matrix.vmult(temp,stage_j);
55 const double result = temp * stage_i;
const int n_rk_stages
Number of RK stages.
AlgebraicRRKODESolver(std::shared_ptr< RKTableauBase< dim, real, MeshType >> rk_tableau_input)
Default constructor that will set the constants.
Files for the baseline physics.
real compute_relaxation_parameter(const real dt, std::shared_ptr< DGBase< dim, real, MeshType >> dg, const std::vector< dealii::LinearAlgebra::distributed::Vector< double >> &rk_stage, const dealii::LinearAlgebra::distributed::Vector< double > &) override
real compute_inner_product(const dealii::LinearAlgebra::distributed::Vector< double > &stage_i, const dealii::LinearAlgebra::distributed::Vector< double > &stage_j, std::shared_ptr< DGBase< dim, real, MeshType >> dg) const
Compute inner product according to the nodes being used.
Base class for storing the RK method.
DGBase is independent of the number of state variables.
std::shared_ptr< RKTableauBase< dim, real, MeshType > > butcher_tableau
Store pointer to RK tableau.
Relaxation Runge-Kutta ODE solver base class.