DamBreak++ Wave Simulator 0.3
DamBreak++ Simulation Framework
Loading...
Searching...
No Matches
dbpp Namespace Reference

Classes

class  callCounter
 Generic class that wraps and counts calls of an arbitrary callback. More...
class  Cell
 Cell concept is at the heart of the finite volume discretization. Usage: Reconstruction procedure based on MUSCL (UL,UR at each face) MusclReconstruction w_muscl(); w_muscl.reconstr(GlobalDisretization aGDiscr); // based on cell face global Id retrieve a cell to perform some operation std::map<unsigned shortglobal cell face Id,fluxpairFL,FR> w_fluxFace; list<cell> w_listOfCell; for(Cell w_cell : w_listOfCell) { Create a flux algorithm FluxAlgorithm w_fluxAlgo;. More...
class  cellFace
 Cell face in the finite volume discretization Usage: caculFF(const cellFace& aFace) compute the numerical flux with Godunov-type scheme for example F(UL,UR) with Approximate Riemann Solver (discontinuity or shock represented by cell face). More...
class  cellFaceFlux
 Face flux variables at cell face (aggregate). Physical flux is used to compute the face flux ... More...
class  DamBreakProblem
 The DAM-BREAK Problem class is a model of a well-posed problem. More...
class  DamBreakWaveSimulator
 Abstract class that serve as base class intending to implement dam break wave simulator. More...
class  EMcNeilPhysBC
 Physical boundary (characteristic equation solved). More...
class  FileDataStore
 Specify the DataStore file (save simulation results). More...
class  FiniteDifferenceModel
 "Model of Explicit scheme with time integration algorithm. Finite difference model a numerical representation of the math equations More...
class  FiniteVolumeDiscretization
 global discretized domain is defined as a set of all nodes and all elements. PHYSICAL ENTITIES include nodes and elements Node <-— Cell; i.e., element depends on node Omega = { all Node, all Cell }; global discretized domain is defined as a set of all nodes and all elements. More...
class  FirstDerivative
 Compute first derivative at second-order (finite difference). More...
class  FluxAlgorithm
 Abstract base class for numerical flux algorithm. More...
struct  FluxTensor
 Flux tensor field (aggregate initialization). More...
struct  FluxTensorMap
 Map cell face and flux values. More...
class  Gamma
 Boundary condition. More...
class  GodunovTypeScheme
 Abstract base class for Godunov-type scheme (Model of). This is a model of an explicit scheme U_i = U_i - lambda*{F (UL_i+1/2,UR_i+1/2) - F(UL_i-1/2, UR_i-1/2) } Numerical representation of the mathematical model equivalent of conservation system law () More...
class  HLLFlux1D
 "Model of" F_j +/- 1/2 numerical scheme at the cell interface. This class represents the HLL (Harten-Lax-Leer) solving algorithm (based on Riemann approximate solver). More...
class  HLLFluxAlgorithm
 Numerical flux algorithm based on HLL (Harten-Lax_Levy). More...
struct  HLLParameterStruct
 Algorithm parameters HLL Algorithm. More...
class  HLLPhysicalFlux
class  HLLSolver1D
 Riemann solver that belongs to Approximate Riemann solver. Solve the Riemann problem at cell Face. Riemann problem u want to set which is made of discontinuity and state vector (left/right) Shall return a map with key = cellFaceID and value is flux face (FF1,FF2) More...
struct  isHomogeneous
 Check if types are identical using fold expression. More...
class  ListSectionsFlow
 List of cross-section flow (itereable) More...
class  ManningFormula
 Manning formula (friction law) Sf = g*n1*n1*V1*::fabs(V1)/A*A::pow(R1, 4./3.);. More...
class  MinMod19
 Minmod limiter function for slope limiting gradient evaluation. More...
class  MUSCLReconstr
struct  NodalTpl
 Implementation for nodal variable concept used in our application (use of variadic template). More...
class  NujicFluxAlgorithm
 Numerical flux algorithm based on Nujic (1995) paper. ENO type scheme (Roe simplified version). More...
class  NujicIntegrator
 Belongs two-step integrator Runge-Kutta family. More...
class  NumericalMethod
 Mapping between continuum and discrete domain. Transformation of the differential or integral equations to discrete algebraic equations involving the values of the unknowns at the mesh points. The basis of all numerical methods consists of this transformation of the physical euations into an algebraic, linear or non-linear, systems of equations. More...
class  ODESolver1D
 Base class ODE Solver (under construction). More...
class  Omega
 Global Domain (part of global discretization) list of elements and geomeric nodes used by numerical method. More...
class  PhysicalBoundaryCnd
 Physical boundary condition (computational domain) based on characteristic equation ... More...
class  PhysicalMeasurement
 Measure taken on the physical system (defines the required method for the Measurement bean). Still under development, physical state variables are the only measured quantities relevant for this simulation. we may be interested by energy slope, ... any other physics qty. More...
class  PhysicalSystem
 Physical system made of physical objects under study and described by the state variables. DamBreak physical system, physical objects are cross-sectional flow. Dynamic equations that describe the movement of the flow of water under gravity law, pressure and friction are described by the St-Venant set of equations. In conservative form mass and momentum are the quantity conserved across each section (state variables). More...
class  Ptr2FLegacyFluxAlgorithm
 Numerical Face Flux Algorithm (Legacy code support Pointer-2-Function) More...
class  RhsHLLFluxSrc
 Physics algorithm based on Nujic paper (1995), but use HLL (Harten-Lax-van Leer) for convective flux solver (E. McNeil). More...
class  RhsPtr2FuncFlux
 Wrappper class to support legacy code (C-functions). More...
class  RiemannProblem
 System of conservation Law with an initial discontinuity in it. Two states connected by a left and right state which can be represented constant piecewise function over each cell where shock propagate (a cell face define a discontinuity). More...
class  Rk2HllScheme
 Algorithm based on the Godunov-type Scheme (explicit). We use a two-time steps integrator belongs to Runge-Kutta family and the HLL algorithm for convective flux evaluation. Order is achieved by MUSCL reconstruction procedure to extrapolate state variables at cell face j+1/2 (piecewise-constant state variable on each cell). This algorithm solve at cell-face a Riemann problem (system of conservation law coupled with 2-state tied by a discontinuity define a Riemann Problem). More...
class  SectionFlow
 Cross-sectional flow (2-dimensional). More...
class  SemiDiscreteMethod
 MOL (Method-of-lines) spatial and time discretization done separetly. Model of the following equation (ODE) U_t = L_delta(U;t);
where L_delta (spatial operator) contains derivative of some variable and describe the evolution of this variable (time evolution). ODE: Ordinary Differential Equation. More...
class  SemiDiscreteScheme
 Under construction ... More...
class  SrcNumericalTreatment
 Basic algorithm to evaluate source terms (bed slope and energy slope) The Manning formula can be read as follow: More...
class  SrcTreatmentS2
 Implementation using a different formula for Manning coefficient. More...
class  SweLDeltaOperator
 to be completed ... see Swe_LDeltaOperator as base implementation U1n12 = w_LdeltaOp->applyTo(arr U1. arr U2).massEq(); // n+1/2 time step U1n12 = w_LdeltaOp->applyTo(arr U1. arr U2).momentumEq(); // ditto More...
class  SweRhsAlgorithm
 Abstract class. "Model" of the right-hand-side terms discretization. Hold discretization scheme or algorithm to be applied on each of them. More...
struct  SweRhsData
 Aggregate (must support operator[]) More...
struct  SweRhsDataP
 Inherited aggregate (extended), add pressure term data. More...
class  Uh
 Container of nodal variables. More...
class  VS19WaveSimulator
 DamBreak simulator base class (Wave Simulator) More...

Concepts

concept  dbl_arg_type

Typedefs

using Time = float64
using valarray64_t = std::valarray<float64>
using ff12pair = std::pair<valarray64_t, valarray64_t>
using ShockSpeed = std::pair<float64, float64>
 Alias (left/right shock speed)
using PhysicalFlux = std::tuple<float64, float64, float64, float64>
 Alias (physical flux component left/right)
using float64 = double
using valr64 = NujicFluxAlgorithm::valr64

Enumerations

enum class  ePhysicalFluxType { incomplete , complete }
enum  eNodalVarComp { A = 0 , Q = 1 , H = 2 }
enum class  eNodalField { A = 0 , Q = 1 , H = 2 }
enum class  eReconstrType { None = 0 , MUSCL = 1 , ENOStencil = 2 }

Functions

template<typename E>
constexpr auto toEnumType (E enumerator) noexcept
 Take an arbitrary enumerator and return its value as a compile-time constant.
template<typename T, typename Args>
std::shared_ptr< T > factory (Args &&aArgs)
 Generic factory from an article. Forward reference can bind to factory parameters according to value categorie (preserve the lvalue/rvalue-ness of the argument that is passed to factory)
template<typename T, typename... Args>
std::shared_ptr< T > factoryCreator (Args &&...aArgs)
 Factory based on perfect-forwarding. Arguments can bind to any types (based on value categorie) to the factory parameters. Forward reference preserves the lvalue/rvalue-ness of the argument that is pass to the factory.
template<typename T, typename ... Args>
decltype(auto) create (Args &&...args)
 factory helper (works even neither coping nor moving is allowed). NOTE decltype(auto) operates by value if the expression used for initialization is an expression that create a (prvalue or temporary).
PhysicalFlux computePhysicsFlux (const Sfx::StateVector &aUL, const Sfx::StateVector &aUR)
 Compute of the flux components vector (physics at grid node)
ShockSpeed computeShockSpeed (const Sfx::StateVector &aUL, const Sfx::StateVector &aUR)
 Compute HLL shock speed.
template<typename Rng1, typename Rng2>
void HLLScheme2ndOrder (Rng1 &aFF1, Rng1 &aFF2, const Rng2 &aU1, const Rng2 &aU2) noexcept
void setFluxAlgoPrms ()
void TraitementTermeP (std::vector< float64 > &PF2, std::vector< float64 > &P2, const std::vector< float64 > &U1, const int NbSections, const float64 B=1)
 Compute pressure term (finite difference derivative)
void CalculS0 (std::vector< float64 > &S0, const std::vector< float64 > &Z, const float64 dx, const int NbSections)
 Compute bed slope term (finite difference derivative)
void TraitementTermeSource (std::vector< float64 > &S, const std::vector< float64 > &Q, const std::vector< float64 > &A, const std::vector< float64 > &Z, const std::vector< float64 > &n, const float64 dx, const int NbSections, const float64 B=1)
 Compute source term (friction and bed slope)
void TraitementTermeSource2 (std::vector< float64 > &S, const std::vector< float64 > &Q, const std::vector< float64 > &A, const std::vector< float64 > &H, const std::vector< float64 > &n, const float64 dx, const int NbSections=101, const float64 B=1.)
 Compute source term (friction and bed slope)
void CalculFFHLL (std::vector< float64 > &FF1, std::vector< float64 > &FF2, const std::vector< float64 > &U1, const std::vector< float64 > &U2, std::vector< float64 > &dU1, std::vector< float64 > &dU2, const int NbSections, float64 B)
void CalculFFHLL (std::vector< float64 > &FF1, std::vector< float64 > &FF2, const std::vector< float64 > &U1, const std::vector< float64 > &U2, float64 B)
void TreatmentSource2 (std::vector< float64 > &aS, std::vector< float64 > &&aQ, std::vector< float64 > &&aA, std::vector< float64 > &&aH, const std::vector< float64 > &n, float64 aDx, unsigned aNbSections)
void TraitementTermeSource2 (std::vector< double > &aS, std::vector< double > &&aQ, std::vector< double > &&aA, std::vector< double > &&aH, const std::vector< double > &n, double aDx, unsigned aDim=100, const float64 B=1.)
 Pass container of computational domain (DIM) and not NbSections=DIM+1.
template<typename... Ts>
std::ostream & operator<< (std::ostream &os, const std::tuple< Ts... > &theTuple)
 print tuple element (apply on a tuple)
constexpr std::string toStr (std::string aStr)
template<typename... Ts>
std::unique_ptr< Sfx::PhysicalAlgorithmmakeSfxPhysicalAlgorithm (Ts &&... params)
 factory method to create physical algorithm
template<typename FuncLimiter>
std::pair< std::valarray< float64 >, std::valarray< float64 > > computeDU12 (const std::valarray< float64 > &aU1, const std::valarray< float64 > &aU2, FuncLimiter &&aFuncLimtr)
 Slope limiter (gradient)
template<typename F, typename NumArrayType, typename = std::enable_if<std::is_same_v<NumArrayType, std::valarray<double>>>>
auto MUSCLReconstruction (const NumArrayType &aU1, const NumArrayType &aU2, F &&aSlopeLimiter)
 MUSCL reconstruction procedure of state variables at cell face.
template<typename T, typename CONT, typename std::enable_if_t<!std::is_lvalue_reference< T >::value >>
decltype(auto) MUSCLReconstrv (T &&aA, T &&aQ, CONT aListCellFaces)
 Variables extrapolation according to MUSCL algorithm.
constexpr float64 Evaluation_H_fonction_A (float64 A, float64 Z, float64 B=1.)
 Function that evaluate water level in terms section width and bathymetry.
constexpr float64 Evaluation_A_fonction_H (float64 H, float64 Z, float64 B=1.)
 Function that evaluate wetted area in terms of section parameters (H,B,Z)
template<typename UnaryFunctor>
decltype(auto) Evaluation_A_fonction_H14 (const ListSectionsFlow &aSectF, UnaryFunctor aFunctor)
template<typename Range>
std::ranges::range_value_t< Range > maxValue (Range &&aRng)
 find maximum value of a range
std::string currentDateTime ()
 date and time
std::string getDateFormat ()
 date format
std::filesystem::path createFolderAndFile ()
 folders and files with the boost file system.
std::list< cellFacecreateListGlbCellFaces ()
 global (computational domain) cell faces
template<typename T, typename ArrayType = std::valarray<T>>
void hllFluxAlgorithm (ArrayType &aFF1, ArrayType &aFF2, const ArrayType &aU1, const ArrayType &aU2, ArrayType &&dU1, ArrayType &&dU2) noexcept
 Compute numerical flux according to HLL algorithm ()
template<typename ArrayType, auto NbSections = Sfx::EMCNEILNbSections::value>
void hllFluxAlgorithm (ArrayType &aFF1, ArrayType &aFF2, const ArrayType &aU1, const ArrayType &aU2) noexcept
 Numerical algorithm using default values for function template parameters.
template<typename... Args>
void hllFluxAlgorithmFwd (Args &&... args)
 forward arguments to another function while preserving their value category (lvalue or rvalue).
template<typename Callable, typename ... Args>
decltype(auto) call (Callable &&aCalbl, Args &&... args)
 call function, member function, lambda
std::optional< float64TimeStepCondition (std::ranges::view auto aU1, std::ranges::view auto aU2, bool isSectionUnitWidth=true)
 Time step criteria stability (assume far left node is tie by b.c.).
HLLParameterStruct computeHLLParameters (const Sfx::StateVector &aUL, const Sfx::StateVector &aUR, float64 aSectionWidth=1.)
 Parameters to compute the interface flux HLL.
std::pair< float64, float64computeHLLShockSpeed (HLLParameterStruct aPrmStruct)
void computeHLLPhysicalFlux (const Sfx::StateVector &aUL, const Sfx::StateVector &aUR, float64 aSectionWidth=1.)
double CalculMatriceRoe1D (double FR, double FL, double UR, double UL)
void TraitementTermesFluxConvectionPressionRoe1D (double *F1, double *F2, double *U1, double *U2, double *dU1, double *dU2, int NbSections, double B)

Typedef Documentation

◆ ff12pair

alias

◆ float64

using dbpp::float64 = double

◆ PhysicalFlux

Alias (physical flux component left/right)

◆ ShockSpeed

using dbpp::ShockSpeed = std::pair<float64, float64>

Alias (left/right shock speed)

◆ Time

◆ valarray64_t

using dbpp::valarray64_t = std::valarray<float64>

alias

◆ valr64

Enumeration Type Documentation

◆ eNodalField

enum class dbpp::eNodalField
strong

An enum type. Nodal fields

Enumerator

Wetted area

Discharge

water level

◆ eNodalVarComp

An enum type. Nodal variables

Deprecated
to be removed in the next re-factoring
Enumerator

Wetted area

discharge

water level

◆ ePhysicalFluxType

enum class dbpp::ePhysicalFluxType
strong

An enum type. Physical flux type

Enumerator
incomplete 
complete 

◆ eReconstrType

enum class dbpp::eReconstrType
strong

An enum type. State variables reconstruction

Enumerator
None 

no reconstuction

MUSCL 

MUSCL type

ENOStencil 

ENO stencil

Function Documentation

◆ CalculFFHLL() [1/2]

void dbpp::CalculFFHLL ( std::vector< float64 > & FF1,
std::vector< float64 > & FF2,
const std::vector< float64 > & U1,
const std::vector< float64 > & U2,
float64 B )

◆ CalculFFHLL() [2/2]

void dbpp::CalculFFHLL ( std::vector< float64 > & FF1,
std::vector< float64 > & FF2,
const std::vector< float64 > & U1,
const std::vector< float64 > & U2,
std::vector< float64 > & dU1,
std::vector< float64 > & dU2,
const int NbSections,
float64 B )

◆ CalculMatriceRoe1D()

double dbpp::CalculMatriceRoe1D ( double FR,
double FL,
double UR,
double UL )

◆ CalculS0()

void dbpp::CalculS0 ( std::vector< float64 > & S0,
const std::vector< float64 > & Z,
const float64 dx,
const int NbSections )

Compute bed slope term (finite difference derivative)

Parameters
S0derivative (finite difference derivative)
Zbathymetry values
dxspatial step
NbSectionsnumber of sections

◆ call()

template<typename Callable, typename ... Args>
decltype(auto) dbpp::call ( Callable && aCalbl,
Args &&... args )

call function, member function, lambda

Template Parameters
Callable
...Argsparameters pack
Parameters
aCalblcallable
...argparameters expansion

◆ computeDU12()

template<typename FuncLimiter>
std::pair< std::valarray< float64 >, std::valarray< float64 > > dbpp::computeDU12 ( const std::valarray< float64 > & aU1,
const std::valarray< float64 > & aU2,
FuncLimiter && aFuncLimtr )

Slope limiter (gradient)

Template Parameters
FuncLimiterfunction limiter
Parameters
aU1values
aU2values
aFuncLimtrfunction limiter
Returns
gradient values

◆ computeHLLParameters()

HLLParameterStruct dbpp::computeHLLParameters ( const Sfx::StateVector & aUL,
const Sfx::StateVector & aUR,
float64 aSectionWidth = 1. )

Parameters to compute the interface flux HLL.

Parameters
aULleft state
aURright state
aSectionWidthcross-section width
Returns
HLL parameters

◆ computeHLLPhysicalFlux()

void dbpp::computeHLLPhysicalFlux ( const Sfx::StateVector & aUL,
const Sfx::StateVector & aUR,
float64 aSectionWidth = 1. )

◆ computeHLLShockSpeed()

std::pair< float64, float64 > dbpp::computeHLLShockSpeed ( HLLParameterStruct aPrmStruct)
Parameters
aPrmStruct
Returns

◆ computePhysicsFlux()

PhysicalFlux dbpp::computePhysicsFlux ( const Sfx::StateVector & aUL,
const Sfx::StateVector & aUR )

Compute of the flux components vector (physics at grid node)

Parameters
aULleft state
aURright state
Returns
tuple flux components

◆ computeShockSpeed()

ShockSpeed dbpp::computeShockSpeed ( const Sfx::StateVector & aUL,
const Sfx::StateVector & aUR )

Compute HLL shock speed.

Parameters
aULleft state
aURright state
Returns
pait left/right shock speed

◆ create()

template<typename T, typename ... Args>
decltype(auto) dbpp::create ( Args &&... args)

factory helper (works even neither coping nor moving is allowed). NOTE decltype(auto) operates by value if the expression used for initialization is an expression that create a (prvalue or temporary).

Factory helper (works even neither coping nor moving is allowed). NOTE decltype(auto) operates by value if the expression used for initialization is an expression that create a (prvalue or temporary).

Template Parameters
Ttype to create
...Argsparameter apck
Parameters
...argsparameter expansion
Returns
new type
Template Parameters
Ttype to create
...Argsparameter pack
Parameters
...argsparameter expansion
Returns
new type

◆ createFolderAndFile()

std::filesystem::path dbpp::createFolderAndFile ( )

folders and files with the boost file system.

Returns
system path

◆ createListGlbCellFaces()

std::list< cellFace > dbpp::createListGlbCellFaces ( )

global (computational domain) cell faces

Returns
list of cell faces

◆ currentDateTime()

std::string dbpp::currentDateTime ( )

date and time

Returns
date and time in string format

◆ Evaluation_A_fonction_H()

float64 dbpp::Evaluation_A_fonction_H ( float64 H,
float64 Z,
float64 B = 1. )
constexpr

Function that evaluate wetted area in terms of section parameters (H,B,Z)

Parameters
Hwater level
Zbathymetry
Bfree-surface width
Returns
wetted area

◆ Evaluation_A_fonction_H14()

template<typename UnaryFunctor>
decltype(auto) dbpp::Evaluation_A_fonction_H14 ( const ListSectionsFlow & aSectF,
UnaryFunctor aFunctor )

◆ Evaluation_H_fonction_A()

float64 dbpp::Evaluation_H_fonction_A ( float64 A,
float64 Z,
float64 B = 1. )
constexpr

Function that evaluate water level in terms section width and bathymetry.

Parameters
AFree surface wetted area
Zbathymetry
BFree surface width
Returns
Water level

◆ factory()

template<typename T, typename Args>
std::shared_ptr< T > dbpp::factory ( Args && aArgs)

Generic factory from an article. Forward reference can bind to factory parameters according to value categorie (preserve the lvalue/rvalue-ness of the argument that is passed to factory)

◆ factoryCreator()

template<typename T, typename... Args>
std::shared_ptr< T > dbpp::factoryCreator ( Args &&... aArgs)

Factory based on perfect-forwarding. Arguments can bind to any types (based on value categorie) to the factory parameters. Forward reference preserves the lvalue/rvalue-ness of the argument that is pass to the factory.

Template Parameters
Argsctor argument type
TType created
Returns
Type smart pointer (pointed-to)

◆ getDateFormat()

std::string dbpp::getDateFormat ( )

date format

Returns
date in string format

◆ hllFluxAlgorithm() [1/2]

template<typename ArrayType, auto NbSections = Sfx::EMCNEILNbSections::value>
void dbpp::hllFluxAlgorithm ( ArrayType & aFF1,
ArrayType & aFF2,
const ArrayType & aU1,
const ArrayType & aU2 )
noexcept

Numerical algorithm using default values for function template parameters.

Template Parameters
ArrayTypenumericla array
Parameters
aFF1first flux component
aFF2second flux component
aU1first state variable
aU2second state variable
Returns
numerical flux at global cell faces

◆ hllFluxAlgorithm() [2/2]

template<typename T, typename ArrayType = std::valarray<T>>
void dbpp::hllFluxAlgorithm ( ArrayType & aFF1,
ArrayType & aFF2,
const ArrayType & aU1,
const ArrayType & aU2,
ArrayType && dU1,
ArrayType && dU2 )
noexcept

Compute numerical flux according to HLL algorithm ()

Template Parameters
T???
ArrayTypenumericla array
Parameters
aFF1first flux component
aFF2second flux component
aU1first state variable
aU2second state variable
dU1gradient first state variable
dU2gradient second state variable
Returns
numerical flux at global cell faces

◆ hllFluxAlgorithmFwd()

template<typename... Args>
void dbpp::hllFluxAlgorithmFwd ( Args &&... args)

forward arguments to another function while preserving their value category (lvalue or rvalue).

Template Parameters
...Argsparameter pack
Parameters
...argsparameters expansion

◆ HLLScheme2ndOrder()

template<typename Rng1, typename Rng2>
void dbpp::HLLScheme2ndOrder ( Rng1 & aFF1,
Rng1 & aFF2,
const Rng2 & aU1,
const Rng2 & aU2 )
noexcept

◆ makeSfxPhysicalAlgorithm()

template<typename... Ts>
std::unique_ptr< Sfx::PhysicalAlgorithm > dbpp::makeSfxPhysicalAlgorithm ( Ts &&... params)

factory method to create physical algorithm

Template Parameters
...Tsparameter pack (class ctor args)
Parameters
...paramspack expansion
Returns
unique pointer on base class

◆ maxValue()

template<typename Range>
std::ranges::range_value_t< Range > dbpp::maxValue ( Range && aRng)

find maximum value of a range

Template Parameters
Rangerange type
Parameters
aRngrange to look for
Returns
maximum value

◆ MUSCLReconstruction()

template<typename F, typename NumArrayType, typename = std::enable_if<std::is_same_v<NumArrayType, std::valarray<double>>>>
auto dbpp::MUSCLReconstruction ( const NumArrayType & aU1,
const NumArrayType & aU2,
F && aSlopeLimiter )

MUSCL reconstruction procedure of state variables at cell face.

Template Parameters
NumArrayType(fast floating-point array)
Fslope limiter function
Parameters
aU1Range of (state variable)
aU2Range of (state variable)
aSlopeLimiterfunction that ... minmod
Returns
pair numerical flux at cell face j+1/2 ]0,N-1]

◆ MUSCLReconstrv()

template<typename T, typename CONT, typename std::enable_if_t<!std::is_lvalue_reference< T >::value >>
decltype(auto) dbpp::MUSCLReconstrv ( T && aA,
T && aQ,
CONT aListCellFaces )

Variables extrapolation according to MUSCL algorithm.

Template Parameters
Tarray type
enable_if_ttrait to enable only 'rvalue' as arg
CONTcontainer of cell faces
Parameters
aAstate variable
aQstate variable
aListCellFacescontainer of cell faces
Returns
map reconstructed variables (A,Q) at cell face

◆ operator<<()

template<typename... Ts>
std::ostream & dbpp::operator<< ( std::ostream & os,
const std::tuple< Ts... > & theTuple )

print tuple element (apply on a tuple)

Template Parameters
...Tsparameter pack
Parameters
osstreeam operator
theTupletuple
Returns
outpput

◆ setFluxAlgoPrms()

void dbpp::setFluxAlgoPrms ( )

◆ TimeStepCondition()

std::optional< float64 > dbpp::TimeStepCondition ( std::ranges::view auto aU1,
std::ranges::view auto aU2,
bool isSectionUnitWidth = true )

Time step criteria stability (assume far left node is tie by b.c.).

Parameters
aU1array of values (global nodal values)
aU2array of values (global nodal values)
isSectionUnitWidthsupport only unit section width
Returns
time stepping

◆ toEnumType()

template<typename E>
auto dbpp::toEnumType ( E enumerator)
constexprnoexcept

Take an arbitrary enumerator and return its value as a compile-time constant.

Template Parameters
Etype enum
Parameters
enumeratorscoped enum
Returns
enum value

◆ toStr()

std::string dbpp::toStr ( std::string aStr)
inlineconstexpr

◆ TraitementTermeP()

void dbpp::TraitementTermeP ( std::vector< float64 > & PF2,
std::vector< float64 > & P2,
const std::vector< float64 > & U1,
const int NbSections,
const float64 B = 1 )

Compute pressure term (finite difference derivative)

Parameters
PF2hydrostatic pressure values
P2pressure values
U1first state variable
NbSectionsnumber of sections
Bsection width

◆ TraitementTermesFluxConvectionPressionRoe1D()

void dbpp::TraitementTermesFluxConvectionPressionRoe1D ( double * F1,
double * F2,
double * U1,
double * U2,
double * dU1,
double * dU2,
int NbSections,
double B )

◆ TraitementTermeSource()

void dbpp::TraitementTermeSource ( std::vector< float64 > & S,
const std::vector< float64 > & Q,
const std::vector< float64 > & A,
const std::vector< float64 > & Z,
const std::vector< float64 > & n,
const float64 dx,
const int NbSections,
const float64 B = 1 )

Compute source term (friction and bed slope)

Parameters
Ssource
Qsecond state variable
Afirst state variable
Zbathymetry values
nManning coefficient
dxspatial step
NbSectionsnumber of sections
Bsection width

◆ TraitementTermeSource2() [1/2]

void dbpp::TraitementTermeSource2 ( std::vector< double > & aS,
std::vector< double > && aQ,
std::vector< double > && aA,
std::vector< double > && aH,
const std::vector< double > & n,
double aDx,
unsigned aDim = 100,
const float64 B = 1. )

Pass container of computational domain (DIM) and not NbSections=DIM+1.

Parameters
aSsource term (returned)
aQrvalue reference
aArvalue reference
aHrvalue reference
nManning coeff
aDxspatail step
aNbSectionssize
Bsection width

◆ TraitementTermeSource2() [2/2]

void dbpp::TraitementTermeSource2 ( std::vector< float64 > & S,
const std::vector< float64 > & Q,
const std::vector< float64 > & A,
const std::vector< float64 > & H,
const std::vector< float64 > & n,
const float64 dx,
const int NbSections = 101,
const float64 B = 1. )

Compute source term (friction and bed slope)

Parameters
Ssource
Qsecond state variable
Afirst state variable
Zbathymetry values
nManning coefficient
dxspatial step
NbSectionsnumber of sections
Bsection width

◆ TreatmentSource2()

void dbpp::TreatmentSource2 ( std::vector< float64 > & aS,
std::vector< float64 > && aQ,
std::vector< float64 > && aA,
std::vector< float64 > && aH,
const std::vector< float64 > & n,
float64 aDx,
unsigned aNbSections )