ryujin 2.1.1 revision 0348cbb53a3e4b1da2a4c037e81f88f2d21ce219
parabolic_module.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3// Copyright (C) 2023 - 2024 by the ryujin authors
4//
5
6#pragma once
7
8#include "hyperbolic_module.h"
9
10#include <compile_time_options.h>
11
12#include "convenience_macros.h"
13#include "initial_values.h"
14#include "mpi_ensemble.h"
15#include "offline_data.h"
16
17#include <deal.II/base/parameter_acceptor.h>
18#include <deal.II/base/timer.h>
19#include <deal.II/lac/sparse_matrix.templates.h>
20#include <deal.II/lac/vector.h>
21
22#include <functional>
23
24namespace ryujin
25{
32 template <typename Description, int dim, typename Number = double>
33 class ParabolicModule final : public dealii::ParameterAcceptor
34 {
35 public:
40
42
43 using View =
44 typename Description::template HyperbolicSystemView<dim, Number>;
45
47
49 typename Description::template ParabolicSolver<dim, Number>;
50
52
54
58
63 const MPIEnsemble &mpi_ensemble,
64 std::map<std::string, dealii::Timer> &computing_timer,
65 const OfflineData<dim, Number> &offline_data,
66 const HyperbolicSystem &hyperbolic_system,
67 const ParabolicSystem &parabolic_system,
68 const InitialValues<Description, dim, Number> &initial_values,
69 const std::string &subsection = "/ParabolicModule");
70
76 void prepare();
77
79
83
93 template <int stages>
94 void step(const StateVector &old_state_vector,
95 const Number old_t,
96 std::array<std::reference_wrapper<const StateVector>, stages>
97 stage_state_vectors,
98 const std::array<Number, stages> stage_weights,
99 StateVector &new_state_vector,
100 Number tau) const;
101
107 void print_solver_statistics(std::ostream &output) const;
108
110
118
119
124
125 // FIXME: refactor to function
127
128 private:
130
134
135 // FIXME: refactor contents into this class.
136 ParabolicSolver parabolic_solver_;
137 mutable unsigned int cycle_;
138
139 mutable unsigned int n_restarts_;
140 mutable unsigned int n_warnings_;
141
143 };
144
145} /* namespace ryujin */
typename View::StateVector StateVector
IDViolationStrategy id_violation_strategy_
typename Description::ParabolicSystem ParabolicSystem
typename Description::template ParabolicSolver< dim, Number > ParabolicSolver
typename Description::template HyperbolicSystemView< dim, Number > View
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 &parabolic_system, const InitialValues< Description, dim, Number > &initial_values, const std::string &subsection="/ParabolicModule")
typename Description::HyperbolicSystem HyperbolicSystem
void 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
void print_solver_statistics(std::ostream &output) const
#define ACCESSOR_READ_ONLY(member)
std::tuple< MultiComponentVector< Number, problem_dim >, MultiComponentVector< Number, prec_dim >, BlockVector< Number > > StateVector
Definition: state_vector.h:51
Euler::ParabolicSystem ParabolicSystem
Definition: description.h:37
Euler::HyperbolicSystem HyperbolicSystem
Definition: description.h:32