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

Sole responsibility is to provide wave profile at initial start up based on DamBreakData. More...

#include <Sfx_DamBreakInitialCnd.h>

Public Member Functions

 DamBreakInitialCnd (const DamBreakData &aDbData)
 ctor from data
 ~DamBreakInitialCnd ()
 dtor
 DamBreakInitialCnd (const DamBreakInitialCnd &aOther)
 copy ctor
DamBreakInitialCndoperator= (const DamBreakInitialCnd &aOther)
 Assignment ctor.
 DamBreakInitialCnd (DamBreakInitialCnd &&aOther) noexcept
 move copy ctor
DamBreakInitialCndoperator= (DamBreakInitialCnd &&aOther) noexcept
 move assignment
void setIC (DamBreakData aData)
 Set initial condition for the DAM-BREAK Problem.
bool isUsingFlatBed () const noexcept
 considering no variable bathymetry
bool isFrictionLess () const noexcept
 considering friction
bool isSectionUnitWidth () const noexcept
 considering unit section width
void save2File ()
 Save initial condition in a file (scenario concept)
std::vector< float64 > xcoordVector () const
 Domain spatial x-coord.
std::vector< float64 > ncoefVector () const
 node friction coefficient
std::vector< float64 > zbathyVector () const
 node bathymetry or topography (bottom)
std::vector< float64 > Xcoord () const noexcept
 x-coordinate
std::vector< float64 > Zvalues () const
 bathymetry values
std::vector< float64 > U1values () const
 first state variable
std::vector< float64 > U2values () const
 second state variable
std::vector< float64 > Hvalues () const
 water level values
std::vector< float64 > nValues () const
 Manning friction codefficient.
void setManningCoefficients (const std::vector< float64 > &aNvec)
 values at each node (but first need to call initMcNeil1D)
void setBathyValues (const std::vector< float64 > &aNvec)
 Bathymetry values.
Sfx::StateVectorField setIC ()
 set initial condition
template<typename T, typename CONT = std::vector<T>>
void setIC (CONT aContOfObj)
 set initial condition (Not implemented yet)
std::unique_ptr< scalarField1D > setH ()
 water level (height)
DamBreakData::eDataTypes getICtype () const
 Initial condition type (not completed)

Private Types

using wavfuncptr = std::shared_ptr<Sfx::WaveFunc>

Private Member Functions

void initMcNeil1D ()
 E. McNeil initial cnd.
void freeDiscrParams ()
 memory de-allocation
void allocateDiscrParams ()
 memory allocation

Private Attributes

DamBreakData m_dbData
bool m_flatBed {true}
bool m_frictionLess { true }
bool m_sectionUnit { true }
wavfuncptr m_z
wavfuncptr m_h
float64 * U1
float64 * U2
float64 * X
float64 * H
float64 * h
float64 * Z
float64 * n
int32 NbSections
float64 B
float64 dx
float64 m_shockLocation
float64 S0am
float64 S0av

Detailed Description

Sole responsibility is to provide wave profile at initial start up based on DamBreakData.

Member Typedef Documentation

◆ wavfuncptr

using Sfx::DamBreakInitialCnd::wavfuncptr = std::shared_ptr<Sfx::WaveFunc>
private

Alias code clarity

Constructor & Destructor Documentation

◆ DamBreakInitialCnd() [1/3]

Sfx::DamBreakInitialCnd::DamBreakInitialCnd ( const DamBreakData & aDbData)

ctor from data

Parameters
aDbDatadam break data

<

◆ ~DamBreakInitialCnd()

Sfx::DamBreakInitialCnd::~DamBreakInitialCnd ( )

dtor

◆ DamBreakInitialCnd() [2/3]

Sfx::DamBreakInitialCnd::DamBreakInitialCnd ( const DamBreakInitialCnd & aOther)

copy ctor

Parameters
aOtherto copy from

<

◆ DamBreakInitialCnd() [3/3]

Sfx::DamBreakInitialCnd::DamBreakInitialCnd ( DamBreakInitialCnd && aOther)
noexcept

move copy ctor

Parameters
aOtherobject to move from

<

Member Function Documentation

◆ allocateDiscrParams()

void Sfx::DamBreakInitialCnd::allocateDiscrParams ( )
private

memory allocation

◆ freeDiscrParams()

void Sfx::DamBreakInitialCnd::freeDiscrParams ( )
private

memory de-allocation

◆ getICtype()

DamBreakData::eDataTypes Sfx::DamBreakInitialCnd::getICtype ( ) const
inline

Initial condition type (not completed)

Returns
data type

◆ Hvalues()

std::vector< float64 > Sfx::DamBreakInitialCnd::Hvalues ( ) const
inline

water level values

Returns
vector of values

◆ initMcNeil1D()

void Sfx::DamBreakInitialCnd::initMcNeil1D ( )
private

E. McNeil initial cnd.

◆ isFrictionLess()

bool Sfx::DamBreakInitialCnd::isFrictionLess ( ) const
inlinenoexcept

considering friction

Returns
true/false

◆ isSectionUnitWidth()

bool Sfx::DamBreakInitialCnd::isSectionUnitWidth ( ) const
inlinenoexcept

considering unit section width

Returns
true/false

◆ isUsingFlatBed()

bool Sfx::DamBreakInitialCnd::isUsingFlatBed ( ) const
inlinenoexcept

considering no variable bathymetry

Returns
true/false

◆ ncoefVector()

std::vector< float64 > Sfx::DamBreakInitialCnd::ncoefVector ( ) const
inline

node friction coefficient

Returns
vector

◆ nValues()

std::vector< float64 > Sfx::DamBreakInitialCnd::nValues ( ) const
inline

Manning friction codefficient.

Returns
vector of values

◆ operator=() [1/2]

DamBreakInitialCnd & Sfx::DamBreakInitialCnd::operator= ( const DamBreakInitialCnd & aOther)

Assignment ctor.

Parameters
aOtherto assign from
Returns
this

◆ operator=() [2/2]

DamBreakInitialCnd & Sfx::DamBreakInitialCnd::operator= ( DamBreakInitialCnd && aOther)
noexcept

move assignment

Parameters
aOtherobject to move from
Returns
this

◆ save2File()

void Sfx::DamBreakInitialCnd::save2File ( )
inline

Save initial condition in a file (scenario concept)

◆ setBathyValues()

void Sfx::DamBreakInitialCnd::setBathyValues ( const std::vector< float64 > & aNvec)

Bathymetry values.

Parameters
aNvecvector values

◆ setH()

std::unique_ptr< scalarField1D > Sfx::DamBreakInitialCnd::setH ( )

water level (height)

Returns
smart pointer scalar field

◆ setIC() [1/3]

Sfx::StateVectorField Sfx::DamBreakInitialCnd::setIC ( )

set initial condition

Returns
State vector

◆ setIC() [2/3]

template<typename T, typename CONT = std::vector<T>>
void Sfx::DamBreakInitialCnd::setIC ( CONT aContOfObj)
inline

set initial condition (Not implemented yet)

Template Parameters
Tbase type
CONTcontainer
Parameters
aContOfObjcontainer of values

◆ setIC() [3/3]

void Sfx::DamBreakInitialCnd::setIC ( DamBreakData aData)

Set initial condition for the DAM-BREAK Problem.

Parameters
aDatatype of dam break data

◆ setManningCoefficients()

void Sfx::DamBreakInitialCnd::setManningCoefficients ( const std::vector< float64 > & aNvec)

values at each node (but first need to call initMcNeil1D)

Parameters
aNvec

◆ U1values()

std::vector< float64 > Sfx::DamBreakInitialCnd::U1values ( ) const
inline

first state variable

Returns
vector of values

◆ U2values()

std::vector< float64 > Sfx::DamBreakInitialCnd::U2values ( ) const
inline

second state variable

Returns
vector of values

◆ Xcoord()

std::vector< float64 > Sfx::DamBreakInitialCnd::Xcoord ( ) const
inlinenoexcept

x-coordinate

Returns
vector of values

◆ xcoordVector()

std::vector< float64 > Sfx::DamBreakInitialCnd::xcoordVector ( ) const
inline

Domain spatial x-coord.

Returns
vector

◆ zbathyVector()

std::vector< float64 > Sfx::DamBreakInitialCnd::zbathyVector ( ) const
inline

node bathymetry or topography (bottom)

Returns
vector

◆ Zvalues()

std::vector< float64 > Sfx::DamBreakInitialCnd::Zvalues ( ) const
inline

bathymetry values

Returns
vector of values

Member Data Documentation

◆ B

float64 Sfx::DamBreakInitialCnd::B
private

section width (surface)

◆ dx

float64 Sfx::DamBreakInitialCnd::dx
private

spatial step

◆ H

float64* Sfx::DamBreakInitialCnd::H
private

water height

◆ h

float64* Sfx::DamBreakInitialCnd::h
private

water depth

◆ m_dbData

DamBreakData Sfx::DamBreakInitialCnd::m_dbData
private

Dam Break data type

◆ m_flatBed

bool Sfx::DamBreakInitialCnd::m_flatBed {true}
private

not variable topgraphy

◆ m_frictionLess

bool Sfx::DamBreakInitialCnd::m_frictionLess { true }
private

no friction

◆ m_h

wavfuncptr Sfx::DamBreakInitialCnd::m_h
private

◆ m_sectionUnit

bool Sfx::DamBreakInitialCnd::m_sectionUnit { true }
private

section unit width

◆ m_shockLocation

float64 Sfx::DamBreakInitialCnd::m_shockLocation
private

shock location

◆ m_z

wavfuncptr Sfx::DamBreakInitialCnd::m_z
private

flat bed bathymetry

◆ n

float64 * Sfx::DamBreakInitialCnd::n
private

◆ NbSections

int32 Sfx::DamBreakInitialCnd::NbSections
private

number of sections

◆ S0am

float64 Sfx::DamBreakInitialCnd::S0am
private

bed slope upstream

◆ S0av

float64 Sfx::DamBreakInitialCnd::S0av
private

bed slope downstream

◆ U1

float64* Sfx::DamBreakInitialCnd::U1
private

first state variable

◆ U2

float64* Sfx::DamBreakInitialCnd::U2
private

second state variable

◆ X

float64* Sfx::DamBreakInitialCnd::X
private

x coordinate

◆ Z

float64* Sfx::DamBreakInitialCnd::Z
private

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