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

Belongs two-step integrator Runge-Kutta family. More...

#include <dbpp_NujicIntegrator.h>

Public Types

enum class  eIntegratorStep { predictor =0 , corrector =1 }
 Enumeration integrator steps. More...

Public Member Functions

 NujicIntegrator ()
 Default ctor.
 NujicIntegrator (std::size_t aNbGridPts, float64 aSpatialStep)
 Ctor from number of mesh grid points and mesh spatoial step.
void step (dbpp::SweRhsData< float64, std::valarray< float64 > > &&aRhs, float64 aDt)
 Step algorithm.
void TwoInOneStep (dbpp::SweRhsAlgorithm *aRhsAlgo, const float64 aDt)
 Step algorithm.
template<typename Range>
void initialSolution (const Range &aRng1, const Range &aRng2)
 Initial solution.
void setInitialState (StateVector aField)
 Initial state.
StateVector getCurrentState () const
 Getter.
StateVector getMidState () const
 Getter.
slnpairvarray getSolutionAsVarray () const
 solution of the integration step
slnpairvector getSolutionAsVector () const
 Getter.
StateVector getSolutionAsField () const noexcept
 Getter.
void setStep (float64 aStep) noexcept
 Set time step.
float64 getStep () const noexcept
 Getter.
void setIntegratorStep (const eIntegratorStep aIntegratorStep)
 Set integrator algorithm step.
eIntegratorStep getIntegratorStep () const noexcept
 Getter.
void setPhysicalBoundaryCnd ()
 Not implemented.
void setLeftNodeBCValues (const std::pair< float64, float64 > &aPairLeftBC)
 Left node (far left computational domain)

Protected Member Functions

void predictor (dbpp::SweRhsData< float64, std::valarray< float64 > > &&aRhs, float64 aDt)
 predictor algorithm
void corrector (dbpp::SweRhsData< float64, std::valarray< float64 > > &&aRhs, float64 aDt)
 corrector algorithm

Private Types

using slnpairvarray = std::pair<std::valarray<float64>, std::valarray<float64>>
 Alias (pair of numerical array fast floating)
using slnpairvector = std::pair<std::vector<float64>, std::vector<float64>>
 Alias (pair of vector)

Private Member Functions

void allocField ()
 memory allocation

Private Attributes

std::size_t m_numOfGridPts
float64 m_step
float64 m_spatialStep
std::pair< float64, float64m_leftBCValues
eIntegratorStep m_integratorStep
std::valarray< float64m_prevU1Values
std::valarray< float64m_prevU2Values
StateVector m_prevState
std::valarray< float64m_currU1Values
std::valarray< float64m_currU2Values
StateVector m_currState

Detailed Description

Belongs two-step integrator Runge-Kutta family.

Member Typedef Documentation

◆ slnpairvarray

using dbpp::NujicIntegrator::slnpairvarray = std::pair<std::valarray<float64>, std::valarray<float64>>
private

Alias (pair of numerical array fast floating)

◆ slnpairvector

using dbpp::NujicIntegrator::slnpairvector = std::pair<std::vector<float64>, std::vector<float64>>
private

Alias (pair of vector)

Member Enumeration Documentation

◆ eIntegratorStep

Enumeration integrator steps.

Enumerator
predictor 

predictor step

corrector 

corrector step

Constructor & Destructor Documentation

◆ NujicIntegrator() [1/2]

dbpp::NujicIntegrator::NujicIntegrator ( )

Default ctor.

◆ NujicIntegrator() [2/2]

dbpp::NujicIntegrator::NujicIntegrator ( std::size_t aNbGridPts,
float64 aSpatialStep )

Ctor from number of mesh grid points and mesh spatoial step.

Parameters
aNbGridPtsnumber of mesh grid points
aSpatialStepmesh spatoial step
Deprecated
to be removed in the next re-factoring

Member Function Documentation

◆ allocField()

void dbpp::NujicIntegrator::allocField ( )
private

memory allocation

◆ corrector()

void dbpp::NujicIntegrator::corrector ( dbpp::SweRhsData< float64, std::valarray< float64 > > && aRhs,
float64 aDt )
protected

corrector algorithm

Parameters
aRhsrhs data
aDttime step

◆ getCurrentState()

StateVector dbpp::NujicIntegrator::getCurrentState ( ) const
inline

Getter.

Returns
State vector

◆ getIntegratorStep()

eIntegratorStep dbpp::NujicIntegrator::getIntegratorStep ( ) const
inlinenoexcept

Getter.

Returns
integrator algorithm step

◆ getMidState()

StateVector dbpp::NujicIntegrator::getMidState ( ) const
inline

Getter.

Returns
current state
Deprecated
to be removed in the next re-factoring

◆ getSolutionAsField()

StateVector dbpp::NujicIntegrator::getSolutionAsField ( ) const
inlinenoexcept

Getter.

Returns
state vector

◆ getSolutionAsVarray()

slnpairvarray dbpp::NujicIntegrator::getSolutionAsVarray ( ) const
inline

solution of the integration step

Returns
pair of numerical array

◆ getSolutionAsVector()

slnpairvector dbpp::NujicIntegrator::getSolutionAsVector ( ) const
inline

Getter.

Returns
pair of vector (two state variables)

◆ getStep()

float64 dbpp::NujicIntegrator::getStep ( ) const
inlinenoexcept

Getter.

Returns
step value

◆ initialSolution()

template<typename Range>
void dbpp::NujicIntegrator::initialSolution ( const Range & aRng1,
const Range & aRng2 )
inline

Initial solution.

Template Parameters
RangeRange type
Parameters
aRng1first range (first state variable)
aRng2second range (second state variable)

◆ predictor()

void dbpp::NujicIntegrator::predictor ( dbpp::SweRhsData< float64, std::valarray< float64 > > && aRhs,
float64 aDt )
protected

predictor algorithm

Parameters
aRhsrhs data
aDtstime step

◆ setInitialState()

void dbpp::NujicIntegrator::setInitialState ( StateVector aField)

Initial state.

Parameters
aFieldState vector
Deprecated
to be removed in the next re-factoring

◆ setIntegratorStep()

void dbpp::NujicIntegrator::setIntegratorStep ( const eIntegratorStep aIntegratorStep)
inline

Set integrator algorithm step.

Parameters
aIntegratorStep

◆ setLeftNodeBCValues()

void dbpp::NujicIntegrator::setLeftNodeBCValues ( const std::pair< float64, float64 > & aPairLeftBC)
inline

Left node (far left computational domain)

Parameters
aPairLeftBCB.C. values

◆ setPhysicalBoundaryCnd()

void dbpp::NujicIntegrator::setPhysicalBoundaryCnd ( )
inline

Not implemented.

◆ setStep()

void dbpp::NujicIntegrator::setStep ( float64 aStep)
inlinenoexcept

Set time step.

Parameters
aStepstep value

◆ step()

void dbpp::NujicIntegrator::step ( dbpp::SweRhsData< float64, std::valarray< float64 > > && aRhs,
float64 aDt )

Step algorithm.

Parameters
aRhsright hand side discretization values
aDttime step

◆ TwoInOneStep()

void dbpp::NujicIntegrator::TwoInOneStep ( dbpp::SweRhsAlgorithm * aRhsAlgo,
const float64 aDt )

Step algorithm.

Parameters
aRhsAlgoright hand side discretization algorithm
aDttime step

Member Data Documentation

◆ m_currState

StateVector dbpp::NujicIntegrator::m_currState
private

deprecated!!

◆ m_currU1Values

std::valarray<float64> dbpp::NujicIntegrator::m_currU1Values
private

values at current step

◆ m_currU2Values

std::valarray<float64> dbpp::NujicIntegrator::m_currU2Values
private

values at current step

◆ m_integratorStep

eIntegratorStep dbpp::NujicIntegrator::m_integratorStep
private

integrator step type

◆ m_leftBCValues

std::pair<float64, float64> dbpp::NujicIntegrator::m_leftBCValues
private

boundary values of left node

◆ m_numOfGridPts

std::size_t dbpp::NujicIntegrator::m_numOfGridPts
private

deprecated!!

◆ m_prevState

StateVector dbpp::NujicIntegrator::m_prevState
private

deprecated!!

◆ m_prevU1Values

std::valarray<float64> dbpp::NujicIntegrator::m_prevU1Values
private

values at previous step

◆ m_prevU2Values

std::valarray<float64> dbpp::NujicIntegrator::m_prevU2Values
private

values at previous step

◆ m_spatialStep

float64 dbpp::NujicIntegrator::m_spatialStep
private

deprecated!!

◆ m_step

float64 dbpp::NujicIntegrator::m_step
private

deprecated!!


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