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

"Model of Explicit scheme with time integration algorithm. Finite difference model a numerical representation of the math equations More...

#include <dbpp_FiniteDifferenceModel.h>

Public Member Functions

 FiniteDifferenceModel (std::string aName, SweRhsAlgorithm *aRhsAlgo)
 Ctor from rhs algorithm.
void advance (const std::shared_ptr< FiniteVolumeDiscretization > &aGblDiscr, Time aFrom, Time aTo, float64 aNts) const
 Step through time (depending on the step condition)

Private Types

using Time = double

Detailed Description

"Model of Explicit scheme with time integration algorithm. Finite difference model a numerical representation of the math equations

" U(n+1) = U(n) - lambda*{ F(i+1/2) - F(i-1/2)} + SourceTerms + Pressure Term The last equation can be put in an operator form as follow: U(n+1;j) = H(U(n); t) where "H" is called discretization operator.

Design Note: responsible to evaluate the following model: U(n+1) = U(n) -lambda*F - dt*S advance through time.

where F is the numerical flux at the interface (j+1/2), it is the derivative (F=F_i-F_i-1), S is the source term. Default stepping is the Euler integrator.

User can change the time stepping and flux algorithm.

Member Typedef Documentation

◆ Time

using dbpp::FiniteDifferenceModel::Time = double
private

Constructor & Destructor Documentation

◆ FiniteDifferenceModel()

dbpp::FiniteDifferenceModel::FiniteDifferenceModel ( std::string aName,
SweRhsAlgorithm * aRhsAlgo )
inline

Ctor from rhs algorithm.

Parameters
aNamename of the algporithm
aRhsAlgorhs algorithm

Member Function Documentation

◆ advance()

void dbpp::FiniteDifferenceModel::advance ( const std::shared_ptr< FiniteVolumeDiscretization > & aGblDiscr,
Time aFrom,
Time aTo,
float64 aNts ) const
inline

Step through time (depending on the step condition)

Parameters
aGblDiscrfinite volume discretization
aFromstart time
aTostop time
aNtsnumber time steps

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