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

Physics algorithm based on Nujic paper (1995), but use HLL (Harten-Lax-van Leer) for convective flux solver (E. McNeil). More...

#include <dbpp_RhsFluxSrc.h>

Inheritance diagram for dbpp::RhsHLLFluxSrc:
dbpp::SweRhsAlgorithm

Public Member Functions

 RhsHLLFluxSrc (std::string aName, const PhysicalSystem *aPhysys, bool aUsePressure=false)
 Constructor from physical system.
 RhsHLLFluxSrc (std::string aName, HLLFluxAlgorithm *aFluxAlgo, SrcNumericalTreatment *aSrcDiscr, const PhysicalBoundaryCnd &aPhybc)
 flux algorithm and source discretization
void setPhysicalBoundaryCnd (const PhysicalBoundaryCnd &aPhyBnd) override final
 set physical boundary condition
PhysicalBoundaryCnd getPhysicalBoundaryCnd () const override final
 physical boundary condition in use
void setFluxAlgorithm (FluxAlgorithm *aFluxAlgo, bool useIncompleteFlux=true) override
 Set Numerical flux algorithm.
void setSourceTermDiscr (SrcNumericalTreatment *aSrcDiscr, bool useManningFormula=true) override
 set numerical source treatment (discretization)
bool useReconstruction () const noexcept override final
 variable reconstruction is use
bool isFrictionLess () const noexcept override final
 friction coefficient is applied
bool useSourceTerms () const noexcept override final
 source terms discretization is used
SweRhsData calculate (const Sfx::StateVectorField &aU, const std::shared_ptr< FiniteVolumeDiscretization > &aGblDiscr) override
 calculate rhs terms (apply discretization at each term)
SweRhsData calculate (const Sfx::StateVectorField &aU) override final
 calculate rhs terms (apply discretization at each term)
Public Member Functions inherited from dbpp::SweRhsAlgorithm
virtual ~SweRhsAlgorithm ()=default
 Dtor (disable move semantic) If base class has no members, not supporting move semantic has no effect.
virtual std::string name () const
 Class name.
virtual void setPtr2FuncAlgo (CalculFF aPtr2Func)
 Flux algorithm (Pointer to function)
virtual void setPressureTermDiscr ()
 Set pressure term discretization.
virtual bool usePressureTerm () const noexcept
 Used pressure terms.
virtual bool useManningFormula () const noexcept
 Used friction formula.
virtual bool useIncompleteFlux () const noexcept
 Used convective.
virtual bool usePtr2FuncLegacy () const noexcept
 Used legacy algorithm.

Private Attributes

std::string m_name {"RhsHLLFluxSrc"}
bool m_usePressure
PhyBCNdlConstraint m_leftEnd
PhyBCNdlConstraint m_rightEnd
const PhysicalSystemm_phySystem
PhysicalBoundaryCnd m_phyBC
FluxAlgorithmm_fluxAlgo {nullptr}
SrcNumericalTreatmentm_srcDiscr { nullptr }

Additional Inherited Members

Protected Member Functions inherited from dbpp::SweRhsAlgorithm
SweRhsAlgorithmoperator= (const SweRhsAlgorithm &)=delete
 disable assign operator to avoid slicing problem
SweRhsAlgorithmoperator= (SweRhsAlgorithm &&)=delete
 disable assign operator to avoid slicing problem

Detailed Description

Physics algorithm based on Nujic paper (1995), but use HLL (Harten-Lax-van Leer) for convective flux solver (E. McNeil).

Constructor & Destructor Documentation

◆ RhsHLLFluxSrc() [1/2]

dbpp::RhsHLLFluxSrc::RhsHLLFluxSrc ( std::string aName,
const PhysicalSystem * aPhysys,
bool aUsePressure = false )

Constructor from physical system.

Parameters
aNameclass name
aPhysysphysical system
aUsePressureflag to set pressure term

◆ RhsHLLFluxSrc() [2/2]

dbpp::RhsHLLFluxSrc::RhsHLLFluxSrc ( std::string aName,
HLLFluxAlgorithm * aFluxAlgo,
SrcNumericalTreatment * aSrcDiscr,
const PhysicalBoundaryCnd & aPhybc )

flux algorithm and source discretization

Parameters
aNamestring description
aFluxAlgo
aSrcDiscr
aPhybc

Member Function Documentation

◆ calculate() [1/2]

SweRhsData dbpp::RhsHLLFluxSrc::calculate ( const Sfx::StateVectorField & aU)
finaloverridevirtual

calculate rhs terms (apply discretization at each term)

Parameters
aUstate variables vector field
Returns
struct of rhs data

Implements dbpp::SweRhsAlgorithm.

◆ calculate() [2/2]

SweRhsData dbpp::RhsHLLFluxSrc::calculate ( const Sfx::StateVectorField & aU,
const std::shared_ptr< FiniteVolumeDiscretization > & aGblDiscr )
overridevirtual

calculate rhs terms (apply discretization at each term)

Parameters
aUstate vector of state variables
aGblDiscrfinite volume discretization
Returns
struct of rhs data

Implements dbpp::SweRhsAlgorithm.

◆ getPhysicalBoundaryCnd()

PhysicalBoundaryCnd dbpp::RhsHLLFluxSrc::getPhysicalBoundaryCnd ( ) const
inlinefinaloverridevirtual

physical boundary condition in use

Returns
physical boundary condition

Implements dbpp::SweRhsAlgorithm.

◆ isFrictionLess()

bool dbpp::RhsHLLFluxSrc::isFrictionLess ( ) const
inlinefinaloverridevirtualnoexcept

friction coefficient is applied

Returns
true/false

Reimplemented from dbpp::SweRhsAlgorithm.

◆ setFluxAlgorithm()

void dbpp::RhsHLLFluxSrc::setFluxAlgorithm ( FluxAlgorithm * aFluxAlgo,
bool useIncompleteFlux = true )
inlineoverridevirtual

Set Numerical flux algorithm.

Parameters
aFluxAlgoflux algorithm
useIncompleteFluxflux type take account ppressure or not

Reimplemented from dbpp::SweRhsAlgorithm.

◆ setPhysicalBoundaryCnd()

void dbpp::RhsHLLFluxSrc::setPhysicalBoundaryCnd ( const PhysicalBoundaryCnd & aPhyBnd)
inlinefinaloverridevirtual

set physical boundary condition

Parameters
aPhyBndphysical boundary condition

Implements dbpp::SweRhsAlgorithm.

◆ setSourceTermDiscr()

void dbpp::RhsHLLFluxSrc::setSourceTermDiscr ( SrcNumericalTreatment * aSrcDiscr,
bool useManningFormula = true )
inlineoverridevirtual

set numerical source treatment (discretization)

Reimplemented from dbpp::SweRhsAlgorithm.

◆ useReconstruction()

bool dbpp::RhsHLLFluxSrc::useReconstruction ( ) const
inlinefinaloverridevirtualnoexcept

variable reconstruction is use

Returns
true/false

Reimplemented from dbpp::SweRhsAlgorithm.

◆ useSourceTerms()

bool dbpp::RhsHLLFluxSrc::useSourceTerms ( ) const
inlinefinaloverridevirtualnoexcept

source terms discretization is used

Returns
true/false

Reimplemented from dbpp::SweRhsAlgorithm.

Member Data Documentation

◆ m_fluxAlgo

FluxAlgorithm* dbpp::RhsHLLFluxSrc::m_fluxAlgo {nullptr}
private

Convective flux algorithm

◆ m_leftEnd

PhyBCNdlConstraint dbpp::RhsHLLFluxSrc::m_leftEnd
private

far left domain node b.c.

◆ m_name

std::string dbpp::RhsHLLFluxSrc::m_name {"RhsHLLFluxSrc"}
private

name

◆ m_phyBC

PhysicalBoundaryCnd dbpp::RhsHLLFluxSrc::m_phyBC
private

physical boundary condition

◆ m_phySystem

const PhysicalSystem* dbpp::RhsHLLFluxSrc::m_phySystem
private

physical system

◆ m_rightEnd

PhyBCNdlConstraint dbpp::RhsHLLFluxSrc::m_rightEnd
private

far right domain node b.c.

◆ m_srcDiscr

SrcNumericalTreatment* dbpp::RhsHLLFluxSrc::m_srcDiscr { nullptr }
private

Source numerical discretization

◆ m_usePressure

bool dbpp::RhsHLLFluxSrc::m_usePressure
private

pressure term flag


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