ryujin 2.5.0 revision 3a6c8d57210175dea14d8116e1fe878f349f8c1c
Loading...
Searching...
No Matches
List of all members
ryujin::Interface::HyperbolicModule< dim, Number > Class Template Referenceabstract

#include <include/ryujin/interface/hyperbolic_module.h>

Inheritance diagram for ryujin::Interface::HyperbolicModule< dim, Number >:
Inheritance graph
[legend]
Collaboration diagram for ryujin::Interface::HyperbolicModule< dim, Number >:
Collaboration graph
[legend]

Public Member Functions

Functions for performing explicit time steps
virtual void fill_precomputed_values (StateVector< Number > &state_vector) const =0
 
virtual Number step (const StateVector< Number > &old_state_vector, StageVectors stage_state_vectors, StageWeights stage_weights, StateVector< Number > &new_state_vector, Number tau=Number(0.), Number tau_max=std::numeric_limits< Number >::max()) const =0
 
void set_cfl (Number new_cfl) const
 
void set_acceptable_tau_max_ratio (Number new_acceptable_tau_max_ratio) const
 

Information and statistics

Number cfl_
 
Number acceptable_tau_max_ratio_
 
 HyperbolicModule (const unsigned int problem_dimension, const unsigned int n_precomputed_values, const std::string &subsection)
 

Detailed Description

template<int dim, typename Number = double>
class ryujin::Interface::HyperbolicModule< dim, Number >

The description-free interface of a HyperbolicModule: explicit forward Euler time-stepping for a hyperbolic system with convex limiting.

In addition to the common state of Interface::Module the interface holds the CFL number and the acceptable tau_max ratio.

Definition at line 33 of file hyperbolic_module.h.

Constructor & Destructor Documentation

◆ HyperbolicModule()

template<int dim, typename Number = double>
ryujin::Interface::HyperbolicModule< dim, Number >::HyperbolicModule ( const unsigned int  problem_dimension,
const unsigned int  n_precomputed_values,
const std::string &  subsection 
)
inlineprotected

Returns the relative CFL number used for computing an appropriate time-step size. Returns the relative maximal acceptable tau_max ratio. The number of components of the hyperbolic state, a run time copy of the compile time constant of the hyperbolic system. The number of precomputed values, a run time copy of the compile time constant of the hyperbolic system. Constructor.

Definition at line 152 of file hyperbolic_module.h.

Member Function Documentation

◆ fill_precomputed_values()

template<int dim, typename Number = double>
virtual void ryujin::Interface::HyperbolicModule< dim, Number >::fill_precomputed_values ( StateVector< Number > &  state_vector) const
pure virtual

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.

Note
This function operates on the selected memory space.

Implemented in ryujin::HyperbolicModule< HyperbolicDescription, dim, Number >.

◆ step()

template<int dim, typename Number = double>
virtual Number ryujin::Interface::HyperbolicModule< dim, Number >::step ( const StateVector< Number > &  old_state_vector,
StageVectors  stage_state_vectors,
StageWeights  stage_weights,
StateVector< Number > &  new_state_vector,
Number  tau = Number(0.),
Number  tau_max = std::numeric_limits< Number >::max() 
) const
pure virtual

Given a reference to a previous state vector old_state_vector perform an explicit Euler step (and store the result in new_state_vector). The function returns the chosen time step size tau with which the update was performed.

The time step is performed with either tau_max (if tau is set to 0), or tau (if tau is nonzero). Here, tau_max is the minimum of the specified parameter tau_max and the computed maximal time step size according to the CFL condition.

The stage state vectors stage_state_vectors together with the weights stage_weights are used to construct a modified high order flux, see the typed HyperbolicModule for details.

Note
The state vector old_state_vector has to be prepared with prepare_state_vector() prior to calling the step function.
This function operates on the selected memory space.

Implemented in ryujin::HyperbolicModule< HyperbolicDescription, dim, Number >.

◆ set_cfl()

template<int dim, typename Number = double>
void ryujin::Interface::HyperbolicModule< dim, Number >::set_cfl ( Number  new_cfl) const
inline

Sets the relative CFL number used for computing an appropriate time-step size to the given value. The CFL number must be a positive value. If chosen to be within the interval \((0,1)\) then the low-order update and limiting stages guarantee invariant domain preservation.

Definition at line 97 of file hyperbolic_module.h.

References ryujin::Interface::HyperbolicModule< dim, Number >::cfl_.

◆ set_acceptable_tau_max_ratio()

template<int dim, typename Number = double>
void ryujin::Interface::HyperbolicModule< dim, Number >::set_acceptable_tau_max_ratio ( Number  new_acceptable_tau_max_ratio) const
inline

Sets the relative maximal acceptable tau_max ratio. If the ratio of the enforced time-step size tau and our computed tau_max for the hyperbolic (sub) step is above this limit we throw a Restart exception.

Definition at line 110 of file hyperbolic_module.h.

References ryujin::Interface::HyperbolicModule< dim, Number >::acceptable_tau_max_ratio_.

Member Data Documentation

◆ cfl_

template<int dim, typename Number = double>
Number ryujin::Interface::HyperbolicModule< dim, Number >::cfl_
mutableprotected

◆ acceptable_tau_max_ratio_

template<int dim, typename Number = double>
Number ryujin::Interface::HyperbolicModule< dim, Number >::acceptable_tau_max_ratio_
mutableprotected

The documentation for this class was generated from the following file: