PetIBM 0.5.4
Toolbox and applications of the immersed-boundary method for distributed-memory architectures
petibm::boundary::BoundaryBase Class Referenceabstract

Base (abstract) class for the whole boundary. More...

#include <boundary.h>

Inheritance diagram for petibm::boundary::BoundaryBase:
[legend]

Public Member Functions

 BoundaryBase ()=default
 Default constructor. More...
 
 BoundaryBase (const type::Mesh &mesh, const YAML::Node &node)
 Construct a boundary object based on a given mesh object. More...
 
virtual ~BoundaryBase ()
 Default destructor. More...
 
virtual PetscErrorCode destroy ()
 Manually destroy data.
More...
 
virtual PetscErrorCode setGhostICs (const type::Solution &soln)=0
 Set the initial values of ghost points. More...
 
virtual PetscErrorCode updateEqs (const type::Solution &soln, const PetscReal &dt)=0
 Update the equations between ghost and boundary points. More...
 
virtual PetscErrorCode updateGhostValues (const type::Solution &soln)=0
 Update the values of ghost points. More...
 
virtual PetscErrorCode copyValues2LocalVecs (std::vector< Vec > &lclVecs) const =0
 Copy values of ghost points to a vector of local PETSc Vec objects. More...
 

Public Attributes

PetscInt dim
 Dimension. More...
 
std::vector< std::vector< type::SingleBoundary > > bds
 A 2D vector holding all single boundaries. More...
 

Protected Member Functions

virtual PetscErrorCode init (const type::Mesh &mesh, const YAML::Node &node)=0
 Underlying initialization function. More...
 

Protected Attributes

MPI_Comm comm
 MPI communicator. More...
 
PetscMPIInt mpiSize
 Size of MPI communicator. More...
 
PetscMPIInt mpiRank
 The rank of this process. More...
 
type::Mesh mesh
 A shared_ptr to underlying mesh. More...
 

Detailed Description

Base (abstract) class for the whole boundary.

See also
Boundaries and boundary conditions, petibm::type::SingleBoundary, petibm::boundary::createBoundary

Definition at line 78 of file boundary.h.

Constructor & Destructor Documentation

◆ BoundaryBase() [1/2]

petibm::boundary::BoundaryBase::BoundaryBase ( )
default

Default constructor.

◆ BoundaryBase() [2/2]

petibm::boundary::BoundaryBase::BoundaryBase ( const type::Mesh mesh,
const YAML::Node &  node 
)

Construct a boundary object based on a given mesh object.

Parameters
mesh[in] Structured Cartesian mesh object.
node[in] YAML configurations.

◆ ~BoundaryBase()

petibm::boundary::BoundaryBase::~BoundaryBase ( )
virtual

Default destructor.

Definition at line 16 of file boundary.cpp.

Member Function Documentation

◆ copyValues2LocalVecs()

virtual PetscErrorCode petibm::boundary::BoundaryBase::copyValues2LocalVecs ( std::vector< Vec > &  lclVecs) const
pure virtual

Copy values of ghost points to a vector of local PETSc Vec objects.

Parameters
lclVecs[in] a std::vector<Vec> object.

Implemented in petibm::boundary::BoundarySimple.

◆ destroy()

PetscErrorCode petibm::boundary::BoundaryBase::destroy ( )
virtual

Manually destroy data.

Definition at line 28 of file boundary.cpp.

◆ init()

virtual PetscErrorCode petibm::boundary::BoundaryBase::init ( const type::Mesh mesh,
const YAML::Node &  node 
)
protectedpure virtual

Underlying initialization function.

Parameters
mesh[in] Structured Cartesian mesh object.
node[in] YAML configurations.

Implemented in petibm::boundary::BoundarySimple.

◆ setGhostICs()

virtual PetscErrorCode petibm::boundary::BoundaryBase::setGhostICs ( const type::Solution soln)
pure virtual

Set the initial values of ghost points.

Parameters
soln[in] Solution object used to calculate the field solutions.

Implemented in petibm::boundary::BoundarySimple.

◆ updateEqs()

virtual PetscErrorCode petibm::boundary::BoundaryBase::updateEqs ( const type::Solution soln,
const PetscReal &  dt 
)
pure virtual

Update the equations between ghost and boundary points.

Parameters
soln[in] Data object for the Eulerian field solutions.
dt[in] Time-step size.

Some kinds of boundary conditions will require changing equation coefficients.

Implemented in petibm::boundary::BoundarySimple.

◆ updateGhostValues()

virtual PetscErrorCode petibm::boundary::BoundaryBase::updateGhostValues ( const type::Solution soln)
pure virtual

Update the values of ghost points.

Parameters
soln[in] Data object for the Eulerian field solutions.

Implemented in petibm::boundary::BoundarySimple.

Member Data Documentation

◆ bds

std::vector<std::vector<type::SingleBoundary> > petibm::boundary::BoundaryBase::bds

A 2D vector holding all single boundaries.

Definition at line 85 of file boundary.h.

◆ comm

MPI_Comm petibm::boundary::BoundaryBase::comm
protected

MPI communicator.

Definition at line 150 of file boundary.h.

◆ dim

PetscInt petibm::boundary::BoundaryBase::dim

Dimension.

Definition at line 82 of file boundary.h.

◆ mesh

type::Mesh petibm::boundary::BoundaryBase::mesh
protected

A shared_ptr to underlying mesh.

Definition at line 159 of file boundary.h.

◆ mpiRank

PetscMPIInt petibm::boundary::BoundaryBase::mpiRank
protected

The rank of this process.

Definition at line 156 of file boundary.h.

◆ mpiSize

PetscMPIInt petibm::boundary::BoundaryBase::mpiSize
protected

Size of MPI communicator.

Definition at line 153 of file boundary.h.


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