DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
Loading...
Searching...
No Matches
Sfx::LDeltaOperator Class Reference

Responsible to evaluate the spatial terms according to spatial discretization. The HOperator provides type and method to compute numerically the different terms of the right-hand-side of the equation. It also provide numerical container used for fast floating-point operation. More...

#include <Sfx_LDeltaOperator.h>

Inheritance diagram for Sfx::LDeltaOperator:

Classes

struct  SWE_RHS
 Data structure RHS terms. More...

Public Types

enum class  eNumArrayType { std_valarray =0 , std_vector =1 , swe_NumArray =2 , ublas_vector =3 }
 Numerical array type for fast floating point operation. More...
enum class  eSourceTermType { Hderivative =0 , Zderivative =1 }
enum class  eSourceDxType { central_2ndorder =0 , central_4thorder =1 }
 Source term derivative order. More...
enum class  eDxSchemeType { central_2ndorder = 0 , central_4thorder = 1 }
 Derivative order. More...
enum class  eDerivBCType { noncentered_2ndorder = 0 , emcil_2nd_order = 1 }
 Derivative boundary condition (order) More...
enum class  eFluxType { convective =0 , pressure =1 , conv_pressure =2 }
 flux discretization More...
enum class  eFluxDxType { upwind_1st = 0 , upwind_2nd = 1 }
 flux derivative type More...
using ListSectFlowPtr = std::shared_ptr<Testvs19::ListSectionsFlow<dbpp::SectionFlow>>
 alias (List of section pointer)
using uvec64 = boost::numeric::ublas::vector<float64>
using CalculFF
 Pointer-to-function (numerical flux algorithm)
using sourcediscr = eSourceDxType
using sourceTerm = eSourceTermType
using dx_f = eFluxDxType

Public Member Functions

 LDeltaOperator ()
 default ctor
 LDeltaOperator (dbpp::SweRhsAlgorithm *aRhsDiscr)
 Ctor from rhs algorithm.
 LDeltaOperator (const LDeltaOperator &aOther)=delete
 copy ctor
LDeltaOperatoroperator= (const LDeltaOperator &aOther)=delete
 assign operator
 LDeltaOperator (CalculFF aFluxDiscr)
 Set flux algorithm.
 ~LDeltaOperator ()
 dtor
void * applyTo (std::shared_ptr< Sfx::FieldLattice > &aU1, std::shared_ptr< Sfx::FieldLattice > &aU2) override
 Apply rhs discretization to each term.
void * applyTo (const Sfx::FieldLattice &aU1, const Sfx::FieldLattice &aU2)
 Apply rhs discretization to each term.
void solveFor () override
 apply rhs discretization
eNumArrayType arrayType () const noexcept
 Getter.
void setArrayType (const eNumArrayType aType) noexcept
 Set type of numerical array.
bool haspressureTerm () const noexcept
 taking account pressure term in numerical model
bool useFriction () const noexcept
 friction ON/OFF
void setTraitementS2 (const eSourceTermType aSdx) noexcept
 Set type of treatment to evaluate source term (bed slope)
void setDxSourceTerm (const sourcediscr aSdx) noexcept
 Set derivative order of bed slope term.
void setTraitementF (const dx_f aDxF) noexcept
 numerical flux evaluation
void setDerivativType (eDxSchemeType aDerivType) noexcept
eDxSchemeType getderivativeType () const noexcept
void setD1xBCAtBothEnd (eDerivBCType aBCtype) noexcept
eDerivBCType getD1xBCtype () const noexcept
 Getter.
void setSrcTermRhsData (const ListSectFlowPtr &aSrcData) noexcept
 Some data to compute rhs.
void setFluxAlgorithm (CalculFF aConvF) noexcept
 Set the convective numerical algorithm (ptr-2-function)
CalculFF getFluxAlgorithm () noexcept
 Numerical flux algorithm.

Static Public Attributes

static constexpr int32 DIM = 100

Private Attributes

eNumArrayType m_arrType
eSourceDxType m_sourceDxType
eDxSchemeType m_derivativeType
eDerivBCType m_bcBothEnd
eSourceTermType m_sourceType
eFluxDxType m_dxfType
eFluxType m_fluxSchme
CalculFF m_calculFF = nullptr
dbpp::SweRhsAlgorithmm_rhsDiscr
ListSectFlowPtr m_srcTreatmentData
SWE_RHStheRhs

Detailed Description

Responsible to evaluate the spatial terms according to spatial discretization. The HOperator provides type and method to compute numerically the different terms of the right-hand-side of the equation. It also provide numerical container used for fast floating-point operation.

Member Typedef Documentation

◆ CalculFF

Initial value:
void(*)( NumArrayType& aFF1, NumArrayType& aFF2,
const NumArrayType& aU1, const NumArrayType& aU2)
std::valarray< float64 > NumArrayType
Definition SimulationConfig.h:24

Pointer-to-function (numerical flux algorithm)

◆ dx_f

◆ ListSectFlowPtr

alias (List of section pointer)

◆ sourcediscr

◆ sourceTerm

◆ uvec64

using Sfx::LDeltaOperator::uvec64 = boost::numeric::ublas::vector<float64>

Member Enumeration Documentation

◆ eDerivBCType

Derivative boundary condition (order)

Enumerator
noncentered_2ndorder 
emcil_2nd_order 

◆ eDxSchemeType

Derivative order.

Enumerator
central_2ndorder 

second-order derivative

central_4thorder 

fourth-order derivative

◆ eFluxDxType

flux derivative type

Enumerator
upwind_1st 

upwind first-order

upwind_2nd 

upwind second-order

◆ eFluxType

enum class Sfx::LDeltaOperator::eFluxType
strong

flux discretization

Deprecated
will be removecd in the next version
Enumerator
convective 

Harten-Lax-Levy

pressure 

Nujic ENO flux

conv_pressure 

Nujic Roe simplified

◆ eNumArrayType

Numerical array type for fast floating point operation.

Enumerator
std_valarray 

numerical array fast floating point operation

std_vector 

deprecated, will be removed in the next version

swe_NumArray 

Elligno numerical array

ublas_vector 

boost ublas numerical array

◆ eSourceDxType

Source term derivative order.

Deprecated
to be merged (removed in the next re-factoring)
Enumerator
central_2ndorder 

second-order derivative

central_4thorder 

fourth-order derivative

◆ eSourceTermType

Enumerator
Hderivative 

H-derivative

Zderivative 

Z-derivative

Constructor & Destructor Documentation

◆ LDeltaOperator() [1/4]

Sfx::LDeltaOperator::LDeltaOperator ( )

default ctor

< flux discretization scheme

◆ LDeltaOperator() [2/4]

Sfx::LDeltaOperator::LDeltaOperator ( dbpp::SweRhsAlgorithm * aRhsDiscr)

Ctor from rhs algorithm.

Parameters
Rhsterm discretization algorithm

< flux discretization scheme

◆ LDeltaOperator() [3/4]

Sfx::LDeltaOperator::LDeltaOperator ( const LDeltaOperator & aOther)
delete

copy ctor

Parameters
objectto copy from

◆ LDeltaOperator() [4/4]

Sfx::LDeltaOperator::LDeltaOperator ( CalculFF aFluxDiscr)

Set flux algorithm.

Parameters
functionpointer

◆ ~LDeltaOperator()

Sfx::LDeltaOperator::~LDeltaOperator ( )

dtor

Member Function Documentation

◆ applyTo() [1/2]

void * Sfx::LDeltaOperator::applyTo ( const Sfx::FieldLattice & aU1,
const Sfx::FieldLattice & aU2 )

Apply rhs discretization to each term.

Parameters
aU1first state variable
aU2second state variable
Returns
rhs struct

◆ applyTo() [2/2]

void * Sfx::LDeltaOperator::applyTo ( std::shared_ptr< Sfx::FieldLattice > & aU1,
std::shared_ptr< Sfx::FieldLattice > & aU2 )
override

Apply rhs discretization to each term.

Parameters
aU1first state variable
aU2second state variable
Returns
rhs struct

◆ arrayType()

eNumArrayType Sfx::LDeltaOperator::arrayType ( ) const
inlinenoexcept

Getter.

Returns
numerical array type

◆ getD1xBCtype()

eDerivBCType Sfx::LDeltaOperator::getD1xBCtype ( ) const
inlinenoexcept

Getter.

Returns
boundary condition type (finite difference derivative)

◆ getderivativeType()

eDxSchemeType Sfx::LDeltaOperator::getderivativeType ( ) const
inlinenoexcept

◆ getFluxAlgorithm()

CalculFF Sfx::LDeltaOperator::getFluxAlgorithm ( )
inlinenoexcept

Numerical flux algorithm.

Returns
pointer-to-function type

◆ haspressureTerm()

bool Sfx::LDeltaOperator::haspressureTerm ( ) const
inlinenoexcept

taking account pressure term in numerical model

Returns
true/false

◆ operator=()

LDeltaOperator & Sfx::LDeltaOperator::operator= ( const LDeltaOperator & aOther)
delete

assign operator

Parameters
objectto assign from
Returns
this

◆ setArrayType()

void Sfx::LDeltaOperator::setArrayType ( const eNumArrayType aType)
inlinenoexcept

Set type of numerical array.

Parameters
aTypetype

◆ setD1xBCAtBothEnd()

void Sfx::LDeltaOperator::setD1xBCAtBothEnd ( eDerivBCType aBCtype)
inlinenoexcept
Parameters
aBCtype

◆ setDerivativType()

void Sfx::LDeltaOperator::setDerivativType ( eDxSchemeType aDerivType)
inlinenoexcept
Parameters
aDerivType

◆ setDxSourceTerm()

void Sfx::LDeltaOperator::setDxSourceTerm ( const sourcediscr aSdx)
inlinenoexcept

Set derivative order of bed slope term.

Parameters
aSdxderivative order type
Deprecated
to be removed in next re-factoring

◆ setFluxAlgorithm()

void Sfx::LDeltaOperator::setFluxAlgorithm ( CalculFF aConvF)
inlinenoexcept

Set the convective numerical algorithm (ptr-2-function)

Parameters
aConvFpointer-to-function type
Deprecated
to be removed in next version

◆ setSrcTermRhsData()

void Sfx::LDeltaOperator::setSrcTermRhsData ( const ListSectFlowPtr & aSrcData)
inlinenoexcept

Some data to compute rhs.

Parameters
aSrcDatarhs data
Deprecated
to be removed in the re-factoring

◆ setTraitementF()

void Sfx::LDeltaOperator::setTraitementF ( const dx_f aDxF)
inlinenoexcept

numerical flux evaluation

Parameters
aDxFflux type (...)
Deprecated
to be removed in next re-factoring

◆ setTraitementS2()

void Sfx::LDeltaOperator::setTraitementS2 ( const eSourceTermType aSdx)
inlinenoexcept

Set type of treatment to evaluate source term (bed slope)

Parameters
aSdxsource type (H/Z) variables
Deprecated
to be removed in next re-factoring

◆ solveFor()

void Sfx::LDeltaOperator::solveFor ( )
inlineoverride

apply rhs discretization

◆ useFriction()

bool Sfx::LDeltaOperator::useFriction ( ) const
inlinenoexcept

friction ON/OFF

Returns
true/false
Deprecated
to be removed in next re-factoring

Member Data Documentation

◆ DIM

int32 Sfx::LDeltaOperator::DIM = 100
staticconstexpr

comptational domain

◆ m_arrType

eNumArrayType Sfx::LDeltaOperator::m_arrType
private

numerical array for fast floating point op

◆ m_bcBothEnd

eDerivBCType Sfx::LDeltaOperator::m_bcBothEnd
private

boundary condition

◆ m_calculFF

CalculFF Sfx::LDeltaOperator::m_calculFF = nullptr
private

ptr-2-function flux algorithm flux discretization (convective)()

◆ m_derivativeType

eDxSchemeType Sfx::LDeltaOperator::m_derivativeType
private

finite difference scheme type

◆ m_dxfType

eFluxDxType Sfx::LDeltaOperator::m_dxfType
private

numerical treatment of physical flux

◆ m_fluxSchme

eFluxType Sfx::LDeltaOperator::m_fluxSchme
private

flux discretization scheme

◆ m_rhsDiscr

dbpp::SweRhsAlgorithm* Sfx::LDeltaOperator::m_rhsDiscr
private

rhs terms discretization

◆ m_sourceDxType

eSourceDxType Sfx::LDeltaOperator::m_sourceDxType
private

numerical treatment of source terms

◆ m_sourceType

eSourceTermType Sfx::LDeltaOperator::m_sourceType
private

source term to be considered (H or Z Nujic algorithm)

◆ m_srcTreatmentData

ListSectFlowPtr Sfx::LDeltaOperator::m_srcTreatmentData
private

List section flow

◆ theRhs

SWE_RHS* Sfx::LDeltaOperator::theRhs
private

right-hand-side values


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