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

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...

#include <dbpp_Cell.h>

Public Member Functions

 Cell (short aCellIndex, short aNodeIndex)
 Ctor from cell index and node nodex.
 Cell (short aCellIndex, short aNodeIndex, const cellFace &aLeftFace, const cellFace &aRightFace)
 Ctor from cell index and node nodex and left/right face.
void setCellPair (const std::pair< cellFace, cellFace > &aPairFaces)
 Intitialize from pair of cell faces.
pairofface getPairFaces () const noexcept
 Getter.
cellFace getLeftFace () const noexcept
 Getter.
cellFace getRightFace () const noexcept
 Getter.
void setLeftFace (const cellFace &aCellF) noexcept
 Set cell left face.
void setRightFace (const cellFace &aCellF) noexcept
 Set cell right face.
void setCellNo (unsigned short aCellNo) noexcept
 Set cell index.
void setNodeNo (unsigned short aNodeNo) noexcept
 Set node index.
unsigned cellNo () const noexcept
 Getter.
unsigned nodeNo () const noexcept
 Getter.
auto operator<=> (const Cell &aOther) const =default
 spaceship operator comparison operator == and != defauted
void printCell (std::iostream &aStream)
 print cell information

Private Types

using pairofface = std::pair<cellFace, cellFace>
 Alias (pair of cell face)

Private Attributes

short m_cellIndex
short m_nodalIndex
cellFace m_leftFace
cellFace m_rightFace

Friends

std::ostream & operator<< (std::ostream &os, const Cell &aCell2Print)
 Stream operator.

Detailed Description

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;.

// solve a Riemann problem at cell face w_fluxAlgo.setLeftFace( w_muscl.getLeftState( w_cell.getLeftFace().getCellFaceI())); //UL w_fluxAlgo.setRightFace( w_muscl.getRightState( w_cell.getRightFace().getCellFaceI())); //UR

std::pair<double FL,double FR > w_leftFaceFlux = w_fluxAlgo.calculFF(w_cell.getLeftFace());

std::pair<double FL,double FR> w_rightFaceFlux = w_fluxAlgo.calculFF(w_cell.getRightFace());

Member Typedef Documentation

◆ pairofface

using dbpp::Cell::pairofface = std::pair<cellFace, cellFace>
private

Alias (pair of cell face)

Constructor & Destructor Documentation

◆ Cell() [1/2]

dbpp::Cell::Cell ( short aCellIndex,
short aNodeIndex )

Ctor from cell index and node nodex.

Parameters
aCellIndexcell index
aNodeIndexnode index

◆ Cell() [2/2]

dbpp::Cell::Cell ( short aCellIndex,
short aNodeIndex,
const cellFace & aLeftFace,
const cellFace & aRightFace )

Ctor from cell index and node nodex and left/right face.

Parameters
aCellIndexcell index
aNodeIndexnode index
aLeftFacecell left face
aRightFacecell right face

Member Function Documentation

◆ cellNo()

unsigned dbpp::Cell::cellNo ( ) const
inlinenoexcept

Getter.

Returns
cell index

◆ getLeftFace()

cellFace dbpp::Cell::getLeftFace ( ) const
inlinenoexcept

Getter.

Returns
cell face

◆ getPairFaces()

pairofface dbpp::Cell::getPairFaces ( ) const
inlinenoexcept

Getter.

Returns
pair if cell faces

◆ getRightFace()

cellFace dbpp::Cell::getRightFace ( ) const
inlinenoexcept

Getter.

Returns
cell face

◆ nodeNo()

unsigned dbpp::Cell::nodeNo ( ) const
inlinenoexcept

Getter.

Returns
node index

◆ operator<=>()

auto dbpp::Cell::operator<=> ( const Cell & aOther) const
default

spaceship operator comparison operator == and != defauted

Parameters
aOtherother object to compare with
Returns
operator category

◆ printCell()

void dbpp::Cell::printCell ( std::iostream & aStream)
inline

print cell information

Parameters
aStreamstream operator

◆ setCellNo()

void dbpp::Cell::setCellNo ( unsigned short aCellNo)
inlinenoexcept

Set cell index.

Parameters
aCellNocell index

◆ setCellPair()

void dbpp::Cell::setCellPair ( const std::pair< cellFace, cellFace > & aPairFaces)
inline

Intitialize from pair of cell faces.

Parameters
aPairFacespair cell faces

◆ setLeftFace()

void dbpp::Cell::setLeftFace ( const cellFace & aCellF)
inlinenoexcept

Set cell left face.

Parameters
aCellFcell face

◆ setNodeNo()

void dbpp::Cell::setNodeNo ( unsigned short aNodeNo)
inlinenoexcept

Set node index.

Parameters
aNodeNonode index

◆ setRightFace()

void dbpp::Cell::setRightFace ( const cellFace & aCellF)
inlinenoexcept

Set cell right face.

Parameters
aCellFcell face

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const Cell & aCell2Print )
friend

Stream operator.

Parameters
osstream operator
aCell2Printcell
Returns
output

Member Data Documentation

◆ m_cellIndex

short dbpp::Cell::m_cellIndex
private

cell index

◆ m_leftFace

cellFace dbpp::Cell::m_leftFace
private

cell left face

◆ m_nodalIndex

short dbpp::Cell::m_nodalIndex
private

node index

◆ m_rightFace

cellFace dbpp::Cell::m_rightFace
private

cell right face


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