ryujin 2.1.1 revision 336b16a72e829721302c626ec7071b92032b8248
Public Member Functions | Protected Attributes | List of all members
ryujin::FluxLibrary::Flux Class Referenceabstract

#include <source/scalar_conservation/flux.h>

Inheritance diagram for ryujin::FluxLibrary::Flux:
Inheritance graph
[legend]
Collaboration diagram for ryujin::FluxLibrary::Flux:
Collaboration graph
[legend]

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_
 

Detailed Description

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.

Definition at line 30 of file flux.h.

Constructor & Destructor Documentation

◆ Flux()

ryujin::FluxLibrary::Flux::Flux ( const std::string &  name,
const std::string &  subsection 
)
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_.

Member Function Documentation

◆ value()

virtual double ryujin::FluxLibrary::Flux::value ( double  state,
unsigned int  direction 
) const
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.

◆ gradient()

virtual double ryujin::FluxLibrary::Flux::gradient ( double  state,
unsigned int  direction 
) const
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.

◆ ACCESSOR_READ_ONLY() [1/2]

ryujin::FluxLibrary::Flux::ACCESSOR_READ_ONLY ( name  )

The name of the flux function

◆ ACCESSOR_READ_ONLY() [2/2]

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").

Member Data Documentation

◆ derivative_approximation_delta_

double ryujin::FluxLibrary::Flux::derivative_approximation_delta_
protected

Definition at line 86 of file flux.h.

Referenced by Flux(), and ryujin::FluxLibrary::Function::Function().

◆ flux_formula_

std::string ryujin::FluxLibrary::Flux::flux_formula_
protected

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