12 using namespace dealii;
14 template <
typename Description,
int dim,
typename Number>
17 std::map<std::string, dealii::Timer> &computing_timer,
22 const std::string &subsection )
23 : ParameterAcceptor(subsection)
25 , parabolic_solver_(mpi_ensemble,
39 template <
typename Description,
int dim,
typename Number>
43 std::cout <<
"ParabolicModule<Description, dim, Number>::prepare()"
46 if constexpr (!ParabolicSystem::is_identity)
47 parabolic_solver_.prepare();
53 template <
typename Description,
int dim,
typename Number>
58 std::cout <<
"ParabolicModule<Description, dim, "
59 "Number>::prepare_state_vector()"
63 if constexpr (ParabolicSystem::is_identity) {
66 dealii::ExcMessage(
"The parabolic system is the identity. This "
67 "function should have never been called."));
71 parabolic_solver_.prepare_state_vector(state_vector, t);
76 template <
typename Description,
int dim,
typename Number>
81 std::array<std::reference_wrapper<const StateVector>,
83 const std::array<Number, stages> ,
87 if constexpr (ParabolicSystem::is_identity) {
90 dealii::ExcMessage(
"The parabolic system is the identity. This "
91 "function should have never been called."));
96 AssertThrow(stages == 0,
97 dealii::ExcMessage(
"Although IMEX schemes are implemented, "
98 "the high order fluxes are not. "));
100 const bool reinit_gmg = cycle_++ % 4 == 0;
101 parabolic_solver_.backward_euler_step(old_state_vector,
105 id_violation_strategy_,
109 n_restarts_ = parabolic_solver_.n_restarts();
110 n_corrections_ = parabolic_solver_.n_corrections();
111 n_warnings_ = parabolic_solver_.n_warnings();
116 template <
typename Description,
int dim,
typename Number>
123 if constexpr (ParabolicSystem::is_identity) {
126 dealii::ExcMessage(
"The parabolic system is the identity. This "
127 "function should have never been called."));
132 const bool reinit_gmg = cycle_++ % 4 == 0;
133 parabolic_solver_.crank_nicolson_step(old_state_vector,
137 id_violation_strategy_,
141 n_restarts_ = parabolic_solver_.n_restarts();
142 n_corrections_ = parabolic_solver_.n_corrections();
143 n_warnings_ = parabolic_solver_.n_warnings();
148 template <
typename Description,
int dim,
typename Number>
150 std::ostream &output)
const
152 if constexpr (!ParabolicSystem::is_identity) {
153 parabolic_solver_.print_solver_statistics(output);
void prepare_state_vector(StateVector &state_vector, Number t) const
typename View::StateVector StateVector
void crank_nicolson_step(const StateVector &old_state_vector, const Number old_t, StateVector &new_state_vector, Number tau) const
typename Description::ParabolicSystem ParabolicSystem
ParabolicModule(const MPIEnsemble &mpi_ensemble, std::map< std::string, dealii::Timer > &computing_timer, const OfflineData< dim, Number > &offline_data, const HyperbolicSystem &hyperbolic_system, const ParabolicSystem ¶bolic_system, const InitialValues< Description, dim, Number > &initial_values, const std::string &subsection="/ParabolicModule")
typename Description::HyperbolicSystem HyperbolicSystem
void print_solver_statistics(std::ostream &output) const
void backward_euler_step(const StateVector &old_state_vector, const Number old_t, std::array< std::reference_wrapper< const StateVector >, stages > stage_state_vectors, const std::array< Number, stages > stage_weights, StateVector &new_state_vector, Number tau) const