67 const PetscReal &
value);
79 virtual PetscErrorCode
destroy();
99 PetscErrorCode
updateEqs(
const Vec &vec,
const PetscReal &dt);
131 const PetscReal &bcValue);
201 const PetscReal &value,
Base (abstract) class for ghost points & BC on a single boundary.
type::BCType type
The type of boundary conditions.
PetscErrorCode updateEqs(const Vec &vec, const PetscReal &dt)
Modify the coefficients in the equation of ghost points.
virtual PetscErrorCode destroy()
Manually destroy data.
type::GhostPointsList points
The list of ghost points on this boundary and at this field.
virtual PetscErrorCode updateEqsKernel(const PetscReal &targetValue, const PetscReal &dt, type::GhostPointInfo &p)=0
Underlying kernel for updating the coefficients of the equation.
PetscBool onThisProc
Indicate if this process holds part of this boundary.
type::Field field
The field of which the ghost points represent.
SingleBoundaryBase()=default
Default constructor.
PetscErrorCode init(const type::Mesh &mesh, const type::BCLoc &loc, const type::Field &field, const type::BCType &type, const PetscReal &bcValue)
Underlying initialization function.
PetscErrorCode setGhostICs(const Vec &vec)
Set up the initial values of the ghost points.
PetscErrorCode updateGhostValues(const Vec &vec)
Update the values of ghost points using the equation.
PetscReal normal
The direction of normal vector.
type::BCLoc loc
The location of this boundary.
type::Mesh mesh
The corresponding Mesh object.
PetscReal value
A constant value representing BC value.
PetscMPIInt mpiSize
The size of the MPI communicator.
virtual PetscErrorCode setGhostICsKernel(const PetscReal &targetValue, type::GhostPointInfo &p)=0
The underlying kernel for setting initial values and equations.
MPI_Comm comm
MPI communicator.
virtual ~SingleBoundaryBase()
Default destructor.
PetscErrorCode copyValues2LocalVec(Vec &lclVec)
Copy the values of ghost points to a local Vec.
PetscMPIInt mpiRank
The rank of this process.
std::shared_ptr< boundary::SingleBoundaryBase > SingleBoundary
Definition of type petibm::type::SingleBoundary.
PetscErrorCode createSingleBoundary(const type::Mesh &mesh, const type::BCLoc &loc, const type::Field &field, const PetscReal &value, const type::BCType &bcType, type::SingleBoundary &singleBd)
Factory function for creating a SingleBoundary object.
std::shared_ptr< mesh::MeshBase > Mesh
Type definition of Mesh.
BCType
Type of boundary conditions.
std::map< MatStencil, GhostPointInfo > GhostPointsList
A map between MatStencil and GhostPointInfo.
BCLoc
Location of a boundary.
Prototype of mesh::MeshBase, type::Mesh, and factory function.
A toolbox for building flow solvers.
A data structure for a single ghost point.
Definition of user-defined types for convenience.