ryujin 2.1.1 revision ee5cbcbf2346c1299c942d0e1f13b46449973c18
Loading...
Searching...
No Matches
stub_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 by the ryujin authors
4//
5
6#pragma once
7
8#include <compile_time_options.h>
9
10#include <hyperbolic_module.h>
11#include <initial_values.h>
12#include <mpi_ensemble.h>
13#include <offline_data.h>
14
15#include <deal.II/base/parameter_acceptor.h>
16
17namespace ryujin
18{
24 template <typename Description, int dim, typename Number>
25 class StubParabolicModule final : public dealii::ParameterAcceptor
26 {
27 public:
32
35
36 using View = typename HyperbolicSystem::template View<dim, Number>;
37
38 using StateVector = typename View::StateVector;
39
41
45
50 const MPIEnsemble & /*mpi_ensemble*/,
51 const OfflineData<dim, Number> & /*offline_data*/,
52 const HyperbolicSystem & /*hyperbolic_system*/,
53 const ParabolicSystem & /*parabolic_system*/,
54 const InitialValues<Description, dim, Number> & /*initial_values*/,
55 const std::string &subsection = "StubParabolicModule")
56 : ParameterAcceptor(subsection)
57 {
58 }
59
65 void prepare()
66 {
67 // do nothing
68 }
69
71
75
83 void reinit_state_vector(StateVector & /*state_vector*/) const
84 {
85 // do nothing
86 }
87
95 void prepare_state_vector(StateVector & /*state_vector*/,
96 Number /*t*/) const
97 {
98 Assert(false,
99 dealii::ExcMessage("The parabolic system is the identity. This "
100 "function should have never been called."));
101 }
102
112 template <int stages>
113 void
114 backward_euler_step(const StateVector &old_state_vector,
115 const Number /*old_t*/,
116 std::array<std::reference_wrapper<const StateVector>,
117 stages> /*stage_state_vectors*/,
118 const std::array<Number, stages> /*stage_weights*/,
119 StateVector &new_state_vector,
120 Number /*tau*/) const
121 {
122 Assert(false,
123 dealii::ExcMessage("The parabolic system is the identity. This "
124 "function should have never been called."));
125
126 new_state_vector = old_state_vector;
127 }
128
137 void crank_nicolson_step(const StateVector &old_state_vector,
138 const Number /*old_t*/,
139 StateVector &new_state_vector,
140 Number /*tau*/) const
141 {
142 Assert(false,
143 dealii::ExcMessage("The parabolic system is the identity. This "
144 "function should have never been called."));
145
146 new_state_vector = old_state_vector;
147 }
148
153 const IDViolationStrategy & /*new_strategy*/) const
154 {
155 // do nothing
156 }
157
159
163
169 void print_solver_statistics(std::ostream & /*output*/) const
170 {
171 // do nothing
172 }
173
177 unsigned int n_restarts() const
178 {
179 return 0;
180 }
181
187 unsigned int n_corrections() const
188 {
189 return 0;
190 }
191
196 unsigned int n_warnings() const
197 {
198 return 0;
199 }
200
202 };
203} /* namespace ryujin */
void reinit_state_vector(StateVector &) const
typename View::StateVector StateVector
void print_solver_statistics(std::ostream &) const
StubParabolicModule(const MPIEnsemble &, const OfflineData< dim, Number > &, const HyperbolicSystem &, const ParabolicSystem &, const InitialValues< Description, dim, Number > &, const std::string &subsection="StubParabolicModule")
typename Description::ParabolicSystem ParabolicSystem
void prepare_state_vector(StateVector &, Number) const
typename HyperbolicSystem::template View< dim, Number > View
void set_id_violation_strategy(const IDViolationStrategy &) const
void crank_nicolson_step(const StateVector &old_state_vector, const Number, StateVector &new_state_vector, Number) const
typename Description::HyperbolicSystem HyperbolicSystem
void backward_euler_step(const StateVector &old_state_vector, const Number, std::array< std::reference_wrapper< const StateVector >, stages >, const std::array< Number, stages >, StateVector &new_state_vector, Number) const
Euler::HyperbolicSystem HyperbolicSystem
Definition description.h:34
ryujin::StubParabolicSystem ParabolicSystem
Definition description.h:36