DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
Loading...
Searching...
No Matches
dbpp::NujicFluxAlgorithm Class Reference

Numerical flux algorithm based on Nujic (1995) paper. ENO type scheme (Roe simplified version). More...

#include <dbpp_NujicFluxAlgorithm.h>

Inheritance diagram for dbpp::NujicFluxAlgorithm:
dbpp::FluxAlgorithm

Public Types

using valr64 = std::valarray<float64>
using pairf12 = std::pair<std::valarray<float64>, std::valarray<float64>>

Public Member Functions

 NujicFluxAlgorithm (const dbpp::ePhysicalFluxType aFluxType, float64 aAlgoNujicPrm)
 ctor from physical flux and constant
FluxTensor calculFF (const Sfx::cellFaceVariables &aFaceVariables) override final
 numerical flux at cell face
FluxTensorMap calculFF (const Sfx::scalarField1D &U1, const Sfx::scalarField1D &U2, const Omega &aDomain, const PhysicalBoundaryCnd &aPhysbc) override final
 Harten-Lax- Levy numerical flux algorithm.
FluxTensor calculFF (const Sfx::StateVector &aUL, const Sfx::StateVector &aUR, const cellFace &aCellFace) override final
 Numerical flux algorithm.
FluxTensorMap calculFF (const Sfx::scalarField1D &aU1, const Sfx::scalarField1D &aU2, const PhysicalBoundaryCnd &aPhysbc) override final
 compute numerical flux
bool useReconstr () const noexcept override final
 use variable reconstruction
bool usePhysicalCompleteFlux () const noexcept override final
 (hydrostatic term is considered)
void setReconstrType (eReconstrType aRecnstrType) noexcept override final
 Set type of extrapolation.
eReconstrType getReconstrType () const noexcept override final
 Getter.
Public Member Functions inherited from dbpp::FluxAlgorithm
virtual bool usePhysicalInCompleteFlux () const noexcept
 numerical flux based components (only hydrostatic term is considered)
virtual void setFluxAlgoPrms ()
 Flux algorithm parameters.
virtual void setReconstrVarOrder (int32 aOrder) noexcept
 cell face variable reconstr order (second-order default)
virtual int32 getReconstrVarOrder () const noexcept
 reconstruction variable

Protected Member Functions

std::tuple< valr64, valr64, valr64, valr64computePhysicalFlux (std::valarray< float64 > &&aU1, std::valarray< float64 > &&aU2, std::valarray< float64 > &&aH)
 compute face numerical flux
void setNujicAlgoPrm (float64 aNujicAlgoPrm)
std::tuple< valr64, valr64, valr64, valr64computePhysicalFlux (Sfx::StVenant1D *aSclEquation, const Uh &aUh)
 Compute physical flux at nodal point.
valr64 computef12p (std::span< float64, Sfx::DIM::value > &&aRng, std::span< float64, Sfx::DIM::value > &&adRng)
 positive component of physical flux
valr64 computef12m (std::span< float64, Sfx::DIM::value > &&aRng, std::span< float64, Sfx::DIM::value > &&adRng)
 negative component of physical flux

Private Attributes

ePhysicalFluxType m_fluxType
eReconstrType m_reconstype
float64 m_Alpha {}
float64 m_algoPrm { 0.4 }
std::vector< float64m_Hvec

Detailed Description

Numerical flux algorithm based on Nujic (1995) paper. ENO type scheme (Roe simplified version).

Member Typedef Documentation

◆ pairf12

using dbpp::NujicFluxAlgorithm::pairf12 = std::pair<std::valarray<float64>, std::valarray<float64>>

Aliases

◆ valr64

using dbpp::NujicFluxAlgorithm::valr64 = std::valarray<float64>

An enum type Physical flux type Aliases

Constructor & Destructor Documentation

◆ NujicFluxAlgorithm()

dbpp::NujicFluxAlgorithm::NujicFluxAlgorithm ( const dbpp::ePhysicalFluxType aFluxType,
float64 aAlgoNujicPrm )
inline

ctor from physical flux and constant

Parameters
aFluxTypephysical flux type
aAlgoNujicPrmNujic constant

Member Function Documentation

◆ calculFF() [1/4]

FluxTensor dbpp::NujicFluxAlgorithm::calculFF ( const Sfx::cellFaceVariables & aFaceVariables)
finaloverridevirtual

numerical flux at cell face

Parameters
aFaceVariablescell face variables
Returns
flux tensor

Implements dbpp::FluxAlgorithm.

◆ calculFF() [2/4]

FluxTensorMap dbpp::NujicFluxAlgorithm::calculFF ( const Sfx::scalarField1D & aU1,
const Sfx::scalarField1D & aU2,
const PhysicalBoundaryCnd & aPhysbc )
inlinefinaloverridevirtual

compute numerical flux

Parameters
aU1first state variable
aU2second state variable
aPhysbcphysical boundary condition
Returns
flux tensor

Implements dbpp::FluxAlgorithm.

◆ calculFF() [3/4]

FluxTensorMap dbpp::NujicFluxAlgorithm::calculFF ( const Sfx::scalarField1D & U1,
const Sfx::scalarField1D & U2,
const Omega & aDomain,
const PhysicalBoundaryCnd & aPhysbc )
finaloverridevirtual

Harten-Lax- Levy numerical flux algorithm.

Parameters
U1scalar field first state variable
U2scalar field second state variable
aDomaincomputational domain (cells)
aPhysbcphysical boundary cond.
Returns
flux tensor

Implements dbpp::FluxAlgorithm.

◆ calculFF() [4/4]

FluxTensor dbpp::NujicFluxAlgorithm::calculFF ( const Sfx::StateVector & aUL,
const Sfx::StateVector & aUR,
const cellFace & aCellFace )
inlinefinaloverridevirtual

Numerical flux algorithm.

Parameters
aULleft state
aURright state
cellFacecell face
Returns
flux tensor

Implements dbpp::FluxAlgorithm.

◆ computef12m()

std::valarray< float64 > dbpp::NujicFluxAlgorithm::computef12m ( std::span< float64, Sfx::DIM::value > && aRng,
std::span< float64, Sfx::DIM::value > && adRng )
protected

negative component of physical flux

Parameters
aRngflux values
adRngderivative (gradient) values
Returns
cell face values at given order (2nd)

◆ computef12p()

std::valarray< float64 > dbpp::NujicFluxAlgorithm::computef12p ( std::span< float64, Sfx::DIM::value > && aRng,
std::span< float64, Sfx::DIM::value > && adRng )
protected

positive component of physical flux

Parameters
aRngflux values
adRngderivative (gradient) values
Returns
cell face values at given order (2nd)

◆ computePhysicalFlux() [1/2]

std::tuple< valr64, valr64, valr64, valr64 > dbpp::NujicFluxAlgorithm::computePhysicalFlux ( Sfx::StVenant1D * aSclEquation,
const Uh & aUh )
protected

Compute physical flux at nodal point.

Parameters
aSclEquationmath equations
aUhglobal nodal values

◆ computePhysicalFlux() [2/2]

std::tuple< valr64, valr64, valr64, valr64 > dbpp::NujicFluxAlgorithm::computePhysicalFlux ( std::valarray< float64 > && aU1,
std::valarray< float64 > && aU2,
std::valarray< float64 > && aH )
protected

compute face numerical flux

Parameters
aU1array of nodal values
aU2array of nodal values
aHwater level at nodal point
Returns
numerical flux tensor

◆ getReconstrType()

eReconstrType dbpp::NujicFluxAlgorithm::getReconstrType ( ) const
inlinefinaloverridevirtualnoexcept

Getter.

Returns
extrapolation type

Implements dbpp::FluxAlgorithm.

◆ setNujicAlgoPrm()

void dbpp::NujicFluxAlgorithm::setNujicAlgoPrm ( float64 aNujicAlgoPrm)
inlineprotected
Parameters
aNujicAlgoPrm

◆ setReconstrType()

void dbpp::NujicFluxAlgorithm::setReconstrType ( eReconstrType aRecnstrType)
inlinefinaloverridevirtualnoexcept

Set type of extrapolation.

Parameters
aRecnstrTypetype extrapolation

Implements dbpp::FluxAlgorithm.

◆ usePhysicalCompleteFlux()

bool dbpp::NujicFluxAlgorithm::usePhysicalCompleteFlux ( ) const
inlinefinaloverridevirtualnoexcept

(hydrostatic term is considered)

Returns
true/false

Reimplemented from dbpp::FluxAlgorithm.

◆ useReconstr()

bool dbpp::NujicFluxAlgorithm::useReconstr ( ) const
inlinefinaloverridevirtualnoexcept

use variable reconstruction

Returns
true/false

Reimplemented from dbpp::FluxAlgorithm.

Member Data Documentation

◆ m_algoPrm

float64 dbpp::NujicFluxAlgorithm::m_algoPrm { 0.4 }
private

value to 0.4 as default

◆ m_Alpha

float64 dbpp::NujicFluxAlgorithm::m_Alpha {}
private

algorithm parameter

◆ m_fluxType

ePhysicalFluxType dbpp::NujicFluxAlgorithm::m_fluxType
private

physical flux type

◆ m_Hvec

std::vector<float64> dbpp::NujicFluxAlgorithm::m_Hvec
private

water level

◆ m_reconstype

eReconstrType dbpp::NujicFluxAlgorithm::m_reconstype
private

extrapolation type


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