ryujin 2.5.0 revision c64172211cf21344cb9b9b0f3a1266aa6400d392
Loading...
Searching...
No Matches
parabolic_module.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3// Copyright (C) 2025 - 2026 by the ryujin authors
4//
5
6#pragma once
7
8#include <ryujin/base/compile_time_options.h>
14
15#include <deal.II/base/parameter_acceptor.h>
16
17#include <limits>
18
19namespace ryujin
20{
26 template <typename HyperbolicDescription, int dim, typename Number>
28 : public Interface::ParabolicModule<dim, Number>
29 {
30 public:
35
37 typename Interface::ParabolicModule<dim, Number>::StageVectors;
38
40 typename Interface::ParabolicModule<dim, Number>::StageWeights;
41
42 using HyperbolicSystem = typename HyperbolicDescription::HyperbolicSystem;
44
45 using View = typename HyperbolicSystem::template View<dim, Number>;
46
48
52
56 StubParabolicModule(const MPIEnsemble & /*mpi_ensemble*/,
57 const OfflineData<dim, Number> & /*offline_data*/,
58 const HyperbolicSystem & /*hyperbolic_system*/,
59 const ParabolicSystem & /*parabolic_system*/,
61 & /*initial_values*/,
62 const std::string &subsection = "StubParabolicModule")
63 : Interface::ParabolicModule<dim, Number>(subsection)
64 {
65 }
66
72 void prepare() override
73 {
74 // do nothing
75 }
76
78
82
90 void
91 reinit_state_vector(StateVector<Number> & /*state_vector*/) const override
92 {
93 // do nothing
94 }
95
104 Number /*t*/) const override
105 {
106 Assert(false,
107 dealii::ExcMessage("The parabolic system is the identity. This "
108 "function should have never been called."));
109 }
110
117 const StateVector<Number> &old_state_vector,
118 StageVectors /*stage_state_vectors*/,
119 StageWeights /*stage_weights*/,
120 StateVector<Number> &new_state_vector,
121 Number /*t*/,
122 Number tau,
123 Number /*tau_max*/ = std::numeric_limits<Number>::max()) const override
124 {
125 Assert(false,
126 dealii::ExcMessage("The parabolic system is the identity. This "
127 "function should have never been called."));
128
129 new_state_vector = old_state_vector;
130 return tau;
131 }
132
142 const StateVector<Number> &old_state_vector,
143 StateVector<Number> &new_state_vector,
144 Number /*t*/,
145 Number tau,
146 Number /*tau_max*/ = std::numeric_limits<Number>::max()) const override
147 {
148 Assert(false,
149 dealii::ExcMessage("The parabolic system is the identity. This "
150 "function should have never been called."));
151
152 new_state_vector = old_state_vector;
153 return tau;
154 }
155
157
161
167 void print_solver_statistics(std::ostream & /*output*/) const override
168 {
169 // do nothing
170 }
171
173 };
174
175
185
186 template <typename HyperbolicDescription, int dim, typename Number = double>
189 };
190} // namespace ryujin
Number crank_nicolson_step(const StateVector< Number > &old_state_vector, StateVector< Number > &new_state_vector, Number, Number tau, Number=std::numeric_limits< Number >::max()) const override
void reinit_state_vector(StateVector< Number > &) const override
StubParabolicModule(const MPIEnsemble &, const OfflineData< dim, Number > &, const HyperbolicSystem &, const ParabolicSystem &, const InitialValues< HyperbolicDescription, dim, Number > &, const std::string &subsection="StubParabolicModule")
typename HyperbolicDescription::HyperbolicSystem HyperbolicSystem
typename Interface::ParabolicModule< dim, Number >::StageWeights StageWeights
void prepare_state_vector(StateVector< Number > &, Number) const override
void print_solver_statistics(std::ostream &) const override
typename HyperbolicSystem::template View< dim, Number > View
Number backward_euler_step(const StateVector< Number > &old_state_vector, StageVectors, StageWeights, StateVector< Number > &new_state_vector, Number, Number tau, Number=std::numeric_limits< Number >::max()) const override
typename Interface::ParabolicModule< dim, Number >::StageVectors StageVectors