DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
Loading...
Searching...
No Matches
dbpp::RhsPtr2FuncFlux Class Referencefinal

Wrappper class to support legacy code (C-functions). More...

#include <dbpp_RhsPtr2FuncFlux.h>

Inheritance diagram for dbpp::RhsPtr2FuncFlux:
dbpp::SweRhsAlgorithm

Public Member Functions

 ~RhsPtr2FuncFlux ()
 dtor from pointer-to-function and source treatment
 RhsPtr2FuncFlux (std::string aFFname, CalculFF aPtr2Func, const ListSectionsFlow &aSectionList, bool aUsePressure=false)
 RhsPtr2FuncFlux (std::string aFFname, CalculFF aPtr2Func, SrcNumericalTreatment *aSrcTreatment, bool aUsePressure)
 ctor from pointer-to-function and source treatment
void setPhysicalBoundaryCnd (const PhysicalBoundaryCnd &aPhyBnd) override
 physical boundary condition
PhysicalBoundaryCnd getPhysicalBoundaryCnd () const override final
 physical boundary condition
void setSourceTermDiscr (SrcNumericalTreatment *aSrcDiscr, bool useManningFormula=true) override
 not sure about this one
std::string getPtr2FuncName () const noexcept
 getter
SweRhsData calculate (const Sfx::StateVectorField &aU) override final
 compute RHS terms
SweRhsData calculate (const Sfx::StateVectorField &aU, const ListSectionsFlow &aList)
 compute RHS ...
SweRhsData calculate (const Sfx::StateVectorField &aU, const std::shared_ptr< FiniteVolumeDiscretization > &aGblDiscr) override final
 compute RHS ...
bool useReconstruction () const noexcept override final
 use reconstruction of state variables
bool isFrictionLess () const noexcept override final
 use friction
bool usePressureTerm () const noexcept override final
 take account of the pressure
bool useSourceTerms () const noexcept override final
 compute source terms
bool useIncompleteFlux () const noexcept override final
 physical flux type
bool usePtr2FuncLegacy () const noexcept override final
 use legacy code version of flux algorithm
bool supportTraitementTermeS2 () const
ListSectionsFlow getListSections () const
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 setFluxAlgorithm (FluxAlgorithm *aFluxAlgo, bool useIncompleteFlux=true)
 Set flux algorithm.
virtual void setPtr2FuncAlgo (CalculFF aPtr2Func)
 Flux algorithm (Pointer to function)
virtual void setPressureTermDiscr ()
 Set pressure term discretization.
virtual bool useManningFormula () const noexcept
 Used friction formula.

Private Attributes

std::string m_ptr2funcName
CalculFF m_calculFF
ListSectionsFlow m_listSections
PhyBCNdlConstraint m_leftBcNode
PhyBCNdlConstraint m_rightBcNode
Ptr2FLegacyFluxAlgorithm m_ptr2FuncFF
SrcNumericalTreatmentm_srcDiscr
bool m_usePressure
bool m_useSourceTerms

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

Wrappper class to support legacy code (C-functions).

Constructor & Destructor Documentation

◆ ~RhsPtr2FuncFlux()

dbpp::RhsPtr2FuncFlux::~RhsPtr2FuncFlux ( )

dtor from pointer-to-function and source treatment

◆ RhsPtr2FuncFlux() [1/2]

dbpp::RhsPtr2FuncFlux::RhsPtr2FuncFlux ( std::string aFFname,
CalculFF aPtr2Func,
const ListSectionsFlow & aSectionList,
bool aUsePressure = false )

◆ RhsPtr2FuncFlux() [2/2]

dbpp::RhsPtr2FuncFlux::RhsPtr2FuncFlux ( std::string aFFname,
CalculFF aPtr2Func,
SrcNumericalTreatment * aSrcTreatment,
bool aUsePressure )

ctor from pointer-to-function and source treatment

Parameters
aFFnamefunction pointer name
aPtr2Funcfunction pointer
aSrcTreatmentsource treatment type
aUsePressureflag to set pressure term in the computation

Member Function Documentation

◆ calculate() [1/3]

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

compute RHS terms

Parameters
aUstate vector field
Returns
RHS data for each term

Implements dbpp::SweRhsAlgorithm.

◆ calculate() [2/3]

SweRhsData dbpp::RhsPtr2FuncFlux::calculate ( const Sfx::StateVectorField & aU,
const ListSectionsFlow & aList )

compute RHS ...

Parameters
aUstate vector field
aList
Returns
RHS data (...)

◆ calculate() [3/3]

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

compute RHS ...

Parameters
aUstate vector field
aGblDiscrfinite volume discretization
Returns
RHS data for each term

Implements dbpp::SweRhsAlgorithm.

◆ getListSections()

ListSectionsFlow dbpp::RhsPtr2FuncFlux::getListSections ( ) const
inline

◆ getPhysicalBoundaryCnd()

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

physical boundary condition

Returns
boundary type

Implements dbpp::SweRhsAlgorithm.

◆ getPtr2FuncName()

std::string dbpp::RhsPtr2FuncFlux::getPtr2FuncName ( ) const
inlinenoexcept

getter

Returns
name Flux pointer to function

◆ isFrictionLess()

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

use friction

Returns
true/false

Reimplemented from dbpp::SweRhsAlgorithm.

◆ setPhysicalBoundaryCnd()

void dbpp::RhsPtr2FuncFlux::setPhysicalBoundaryCnd ( const PhysicalBoundaryCnd & aPhyBnd)
inlineoverridevirtual

physical boundary condition

Parameters
aPhyBndboundary to set from

Implements dbpp::SweRhsAlgorithm.

◆ setSourceTermDiscr()

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

not sure about this one

Parameters
aPtr2Func

set source treqatment terms algorithm

Parameters
aSrcDiscrsource treatment type

Reimplemented from dbpp::SweRhsAlgorithm.

◆ supportTraitementTermeS2()

bool dbpp::RhsPtr2FuncFlux::supportTraitementTermeS2 ( ) const
inline

◆ useIncompleteFlux()

bool dbpp::RhsPtr2FuncFlux::useIncompleteFlux ( ) const
inlinefinaloverridevirtualnoexcept

physical flux type

Returns
true/false

Reimplemented from dbpp::SweRhsAlgorithm.

◆ usePressureTerm()

bool dbpp::RhsPtr2FuncFlux::usePressureTerm ( ) const
inlinefinaloverridevirtualnoexcept

take account of the pressure

Returns
true/false

Reimplemented from dbpp::SweRhsAlgorithm.

◆ usePtr2FuncLegacy()

bool dbpp::RhsPtr2FuncFlux::usePtr2FuncLegacy ( ) const
inlinefinaloverridevirtualnoexcept

use legacy code version of flux algorithm

Returns
true/false

Reimplemented from dbpp::SweRhsAlgorithm.

◆ useReconstruction()

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

use reconstruction of state variables

Returns
true/false

Reimplemented from dbpp::SweRhsAlgorithm.

◆ useSourceTerms()

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

compute source terms

Returns
true/false

Reimplemented from dbpp::SweRhsAlgorithm.

Member Data Documentation

◆ m_calculFF

CalculFF dbpp::RhsPtr2FuncFlux::m_calculFF
private

Pointer-to-function flux algorithm ??? really need it

◆ m_leftBcNode

PhyBCNdlConstraint dbpp::RhsPtr2FuncFlux::m_leftBcNode
private

physical boundary

◆ m_listSections

ListSectionsFlow dbpp::RhsPtr2FuncFlux::m_listSections
private

list of sections

◆ m_ptr2FuncFF

Ptr2FLegacyFluxAlgorithm dbpp::RhsPtr2FuncFlux::m_ptr2FuncFF
private

Pointer-to-function flux algorithm

◆ m_ptr2funcName

std::string dbpp::RhsPtr2FuncFlux::m_ptr2funcName
private

Ptr-to-Func flux algorithm

◆ m_rightBcNode

PhyBCNdlConstraint dbpp::RhsPtr2FuncFlux::m_rightBcNode
private

physical boundary

◆ m_srcDiscr

SrcNumericalTreatment* dbpp::RhsPtr2FuncFlux::m_srcDiscr
private

source numerical treatment

◆ m_usePressure

bool dbpp::RhsPtr2FuncFlux::m_usePressure
private

pressure ...

◆ m_useSourceTerms

bool dbpp::RhsPtr2FuncFlux::m_useSourceTerms
private

friction, bottomm slope


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