![]() |
ryujin 2.5.0 revision c64172211cf21344cb9b9b0f3a1266aa6400d392
|
#include <include/ryujin/typed/hyperbolic_module.h>


Public Member Functions | |
Constructor and setup | |
| HyperbolicModule (const MPIEnsemble &mpi_ensemble, const OfflineData< dim, Number > &offline_data, const HyperbolicSystem &hyperbolic_system, const InitialValues< HyperbolicDescription, dim, Number > &initial_values, const std::string &subsection="/HyperbolicModule") | |
| void | prepare () override |
Functions for performing explicit time steps | |
| void | reinit_state_vector (StateVector< Number > &state_vector) const override |
| void | prepare_state_vector (StateVector< Number > &state_vector, Number t) const override |
| void | fill_precomputed_values (StateVector< Number > &state_vector) const override |
| Number | forward_euler_step (const StateVector< Number > &old_state_vector, StageVectors stage_state_vectors, StageWeights stage_weights, StateVector< Number > &new_state_vector, Number t, Number tau, Number tau_max=std::numeric_limits< Number >::max()) const override |
Information and statistics | |
| void | print_solver_statistics (std::ostream &) const override |
Public Member Functions inherited from ryujin::Interface::HyperbolicModule< dim, Number > | |
| void | set_cfl (Number new_cfl) const |
| void | set_acceptable_tau_max_ratio (Number new_acceptable_tau_max_ratio) const |
Typedefs and constexpr constants | |
| using | StageVectors = typename Interface::HyperbolicModule< dim, Number >::StageVectors |
| using | StageWeights = typename Interface::HyperbolicModule< dim, Number >::StageWeights |
| using | HyperbolicSystem = typename HyperbolicDescription::HyperbolicSystem |
| using | View = typename HyperbolicSystem::template View< dim, Number > |
| using | Indicator = typename HyperbolicDescription::template Indicator< Number > |
| using | Limiter = typename HyperbolicDescription::template Limiter< Number > |
| using | WaveSpeedEstimator = typename HyperbolicDescription::template WaveSpeedEstimator< Number > |
| using | state_type = typename View::state_type |
| using | precomputed_type = typename View::precomputed_type |
| using | initial_precomputed_type = typename View::initial_precomputed_type |
| static constexpr auto | problem_dimension = View::problem_dimension |
| static constexpr auto | n_precomputed_values = View::n_precomputed_values |
| static constexpr auto | n_initial_precomputed_values |
Additional Inherited Members | |
Protected Member Functions inherited from ryujin::Interface::HyperbolicModule< dim, Number > | |
| HyperbolicModule (const unsigned int problem_dimension, const unsigned int n_precomputed_values, const std::string &subsection) | |
Protected Attributes inherited from ryujin::Interface::HyperbolicModule< dim, Number > | |
| Number | cfl_ |
| Number | acceptable_tau_max_ratio_ |
Explicit forward Euler time-stepping for hyperbolic systems with convex limiting.
This module is described in detail in [17], Alg. 1.
Definition at line 37 of file hyperbolic_module.h.
| using ryujin::HyperbolicModule< HyperbolicDescription, dim, Number >::StageVectors = typename Interface::HyperbolicModule<dim, Number>::StageVectors |
Definition at line 45 of file hyperbolic_module.h.
| using ryujin::HyperbolicModule< HyperbolicDescription, dim, Number >::StageWeights = typename Interface::HyperbolicModule<dim, Number>::StageWeights |
Definition at line 48 of file hyperbolic_module.h.
| using ryujin::HyperbolicModule< HyperbolicDescription, dim, Number >::HyperbolicSystem = typename HyperbolicDescription::HyperbolicSystem |
Definition at line 51 of file hyperbolic_module.h.
| using ryujin::HyperbolicModule< HyperbolicDescription, dim, Number >::View = typename HyperbolicSystem::template View<dim, Number> |
Definition at line 53 of file hyperbolic_module.h.
| using ryujin::HyperbolicModule< HyperbolicDescription, dim, Number >::Indicator = typename HyperbolicDescription::template Indicator<Number> |
Definition at line 55 of file hyperbolic_module.h.
| using ryujin::HyperbolicModule< HyperbolicDescription, dim, Number >::Limiter = typename HyperbolicDescription::template Limiter<Number> |
Definition at line 58 of file hyperbolic_module.h.
| using ryujin::HyperbolicModule< HyperbolicDescription, dim, Number >::WaveSpeedEstimator = typename HyperbolicDescription::template WaveSpeedEstimator<Number> |
Definition at line 60 of file hyperbolic_module.h.
| using ryujin::HyperbolicModule< HyperbolicDescription, dim, Number >::state_type = typename View::state_type |
Definition at line 65 of file hyperbolic_module.h.
| using ryujin::HyperbolicModule< HyperbolicDescription, dim, Number >::precomputed_type = typename View::precomputed_type |
Definition at line 69 of file hyperbolic_module.h.
| using ryujin::HyperbolicModule< HyperbolicDescription, dim, Number >::initial_precomputed_type = typename View::initial_precomputed_type |
Definition at line 74 of file hyperbolic_module.h.
| ryujin::HyperbolicModule< HyperbolicDescription, dim, Number >::HyperbolicModule | ( | const MPIEnsemble & | mpi_ensemble, |
| const OfflineData< dim, Number > & | offline_data, | ||
| const HyperbolicSystem & | hyperbolic_system, | ||
| const InitialValues< HyperbolicDescription, dim, Number > & | initial_values, | ||
| const std::string & | subsection = "/HyperbolicModule< HyperbolicDescription, dim, Number >" |
||
| ) |
Constructor
Definition at line 43 of file hyperbolic_module.template.h.
|
override |
Prepare time stepping. A call to prepare() allocates temporary storage and is necessary before any of the following time-stepping functions can be called.
Definition at line 64 of file hyperbolic_module.template.h.
References ryujin::have_separate_memory_spaces, and ryujin::implicit_transfers.
|
override |
(Re)initialize the hyperbolic state vector component and the precomputed vector component of the state vector.
Helper function that (re)initializes the state and the precomputed component of a StateVector to proper sizes.
Definition at line 158 of file hyperbolic_module.template.h.
|
override |
This function preprocesses a given state vector U in preparation for an explicit euler step performed by the forward_euler_step() function. The function performs the following tasks:
U component of the state vector by enforcing boundary conditions for the supplied time time t. We then updates ghost ranges on U so that the state vector is consistent across MPI ranks.Definition at line 192 of file hyperbolic_module.template.h.
References ryujin::precomputed, and ryujin::state.
|
overridevirtual |
Populate the precomputed values of the state vector state_vector from its hyperbolic state and update the ghost values. In contrast to prepare_state_vector() no boundary conditions are applied and constrained degrees of freedom are not skipped.
Implements ryujin::Interface::HyperbolicModule< dim, Number >.
Definition at line 232 of file hyperbolic_module.template.h.
References ryujin::StateVector< Number >::precomputed, ryujin::precomputed, and ryujin::state.
|
overridevirtual |
Given a reference to a previous state vector old_state_vector at time t perform an explicit euler step (and store the result in new_state_vector). The function returns the time step size tau with which the update was performed.
If tau is nonzero the step is performed with tau. If tau is 0 the step is performed with the minimum of tau_max and the computed maximal time step size according to the CFL condition.
The function takes an optional list of states stage_state_vectors together with a list of weights stage_weights to construct a modified high-order flux. The standard high-order flux reads (cf. [17], Eq. 12):
\begin{align} \newcommand{\bF}{{\boldsymbol F}} \newcommand{\bU}{{\boldsymbol U}} \newcommand\bUni{\bU^n_i} \newcommand\bUnj{\bU^n_j} \newcommand{\polf}{{\mathbb f}} \newcommand\Ii{\mathcal{I}(i)} \newcommand{\bc}{{\boldsymbol c}} \sum_{j\in\Ii} \frac{m_{ij}}{m_{j}} \; \frac{m_{j}}{\tau_n}\big( \tilde\bU_j^{H,n+1} - \bU_j^{n}\big) \;=\; \bF^n_i + \sum_{j\in\Ii}d_{ij}^{H,n}\big(\bUnj-\bUni\big), \qquad\text{with}\quad \bF^n_i\;:=\; \sum_{j\in\Ii}\Big(-(\polf(\bUni)+\polf(\bUnj)) \cdot\bc_{ij}\Big). \end{align}
Instead, the function replaces \(\bF^n_i\) in the right-hand side by the modified high-order flux:
\begin{align} \newcommand{\bF}{{\boldsymbol F}} \newcommand{\bU}{{\boldsymbol U}} \newcommand\bUnis{\bU^{s,n}_i} \newcommand\bUnjs{\bU^{s,n}_j} \newcommand{\polf}{{\mathbb f}} \newcommand\Ii{\mathcal{I}(i)} \newcommand{\bc}{{\boldsymbol c}} \tilde{\bF}^n_i\;:=\; \big(1-\sum_{s=1}^{\text{stages}}\omega_s\big)\bF^n_i \;+\; \sum_{s=1}^{\text{stages}}\omega_s \bF^{s,n}_i \qquad\text{with}\quad \bF^{s,n}_i\;:=\; \sum_{j\in\Ii}\Big(-(\polf(\bUnis)+\polf(\bUnjs)) \cdot\bc_{ij}\Big). \end{align}
where \(\omega_s\) denotes the weights for the given stages \(\bU^{s,n}\). The high-order viscosity term \(d_{ij}^{H,n}(\bU^n_j-\bU^n_i)\) is always evaluated with the old state. Source terms, if present, are combined with the same weights.
old_state_vector prior to calling forward_euler_step(). Implements ryujin::Interface::HyperbolicModule< dim, Number >.
Definition at line 410 of file hyperbolic_module.template.h.
|
inlineoverride |
Print a status line with solver statistics. The explicit update has no solver statistics to report.
Definition at line 218 of file hyperbolic_module.h.
|
staticconstexpr |
Definition at line 63 of file hyperbolic_module.h.
|
staticconstexpr |
Definition at line 67 of file hyperbolic_module.h.
|
staticconstexpr |
Definition at line 71 of file hyperbolic_module.h.