ryujin 2.1.1 revision 0348cbb53a3e4b1da2a4c037e81f88f2d21ce219
|
#include <source/scalar_conservation/flux.h>
Public Member Functions | |
Flux (const std::string &name, const std::string &subsection) | |
virtual double | value (double state, unsigned int direction) const =0 |
virtual double | gradient (double state, unsigned int direction) const =0 |
ACCESSOR_READ_ONLY (name) | |
ACCESSOR_READ_ONLY (flux_formula) | |
Protected Attributes | |
double | derivative_approximation_delta_ |
std::string | flux_formula_ |
A small abstract base class to group configuration options for the flux.
This function derives directly from dealii::Function<1>. Derived classes must thus implement the value() and gradient() methods.
|
inline |
Constructor taking flux name name
and a subsection subsection
as an argument. The dealii::ParameterAcceptor is initialized with the subsubsection subsection + "/" + name
.
Definition at line 38 of file flux.h.
References derivative_approximation_delta_.
|
pure virtual |
Return the flux f(u) for the given state U
and direction direction
.
Implemented in ryujin::FluxLibrary::Function, ryujin::FluxLibrary::KPP, and ryujin::FluxLibrary::Burgers.
|
pure virtual |
Return the gradient f'(u) of the flux for the given state u
and direction direction
.
Implemented in ryujin::FluxLibrary::Function, ryujin::FluxLibrary::KPP, and ryujin::FluxLibrary::Burgers.
ryujin::FluxLibrary::Flux::ACCESSOR_READ_ONLY | ( | name | ) |
The name of the flux function
ryujin::FluxLibrary::Flux::ACCESSOR_READ_ONLY | ( | flux_formula | ) |
Return an appropriate step size for approximating a differential with a central difference quotient. This value is used internally in the Riemann solver to switch between a central difference formula and the "true" gradient() for computing the Roe average.
The value should be set to be of the same order than any discretization used for computing the gradient(). The default value is 1e4 times the machine epsilon and is appropriate if gradient() is known and therefore implemented exactly. A string showing a detailed formula of the chosen flux function (such as "f(u)=0.5*u*u").
|
protected |
Definition at line 86 of file flux.h.
Referenced by Flux(), and ryujin::FluxLibrary::Function::Function().
|
protected |
Definition at line 87 of file flux.h.
Referenced by ryujin::FluxLibrary::Burgers::Burgers(), ryujin::FluxLibrary::Function::Function(), and ryujin::FluxLibrary::KPP::KPP().