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

An implementation of petibm::boundary::BoundaryBase. More...

#include <boundarysimple.h>

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

Public Member Functions

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

Constructor & Destructor Documentation

◆ BoundarySimple()

petibm::boundary::BoundarySimple::BoundarySimple ( 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.

Definition at line 19 of file boundarysimple.cpp.

◆ ~BoundarySimple()

virtual petibm::boundary::BoundarySimple::~BoundarySimple ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ copyValues2LocalVecs()

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

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

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

Implements petibm::boundary::BoundaryBase.

Definition at line 128 of file boundarysimple.cpp.

◆ destroy()

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

Manually destroy data.

Definition at line 28 of file boundary.cpp.

◆ init()

PetscErrorCode petibm::boundary::BoundarySimple::init ( const type::Mesh mesh,
const YAML::Node &  node 
)
protectedvirtual

Underlying initialization function.

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

Implements petibm::boundary::BoundaryBase.

Definition at line 25 of file boundarysimple.cpp.

◆ setGhostICs()

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

Set the initial values of ghost points.

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

Implements petibm::boundary::BoundaryBase.

Definition at line 67 of file boundarysimple.cpp.

◆ updateEqs()

PetscErrorCode petibm::boundary::BoundarySimple::updateEqs ( const type::Solution soln,
const PetscReal &  dt 
)
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.

Implements petibm::boundary::BoundaryBase.

Definition at line 87 of file boundarysimple.cpp.

◆ updateGhostValues()

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

Update the values of ghost points.

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

Implements petibm::boundary::BoundaryBase.

Definition at line 108 of file boundarysimple.cpp.

Member Data Documentation

◆ bds

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

A 2D vector holding all single boundaries.

Definition at line 85 of file boundary.h.

◆ comm

MPI_Comm petibm::boundary::BoundaryBase::comm
protectedinherited

MPI communicator.

Definition at line 150 of file boundary.h.

◆ dim

PetscInt petibm::boundary::BoundaryBase::dim
inherited

Dimension.

Definition at line 82 of file boundary.h.

◆ mesh

type::Mesh petibm::boundary::BoundaryBase::mesh
protectedinherited

A shared_ptr to underlying mesh.

Definition at line 159 of file boundary.h.

◆ mpiRank

PetscMPIInt petibm::boundary::BoundaryBase::mpiRank
protectedinherited

The rank of this process.

Definition at line 156 of file boundary.h.

◆ mpiSize

PetscMPIInt petibm::boundary::BoundaryBase::mpiSize
protectedinherited

Size of MPI communicator.

Definition at line 153 of file boundary.h.


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