PetIBM 0.5.4
Toolbox and applications of the immersed-boundary method for distributed-memory architectures
boundarysimple.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <vector>
11
12#include <petscvec.h>
13
14#include <petibm/boundary.h>
15
16namespace petibm
17{
18namespace boundary
19{
26{
27public:
30 BoundarySimple(const type::Mesh &mesh, const YAML::Node &node);
31
33 virtual ~BoundarySimple() = default;
34
35 // implementation of BoundaryBase::setGhostICs
36 virtual PetscErrorCode setGhostICs(const type::Solution &soln);
37
38 // implementation of BoundaryBase::updateEqs
39 virtual PetscErrorCode updateEqs(const type::Solution &soln,
40 const PetscReal &dt);
41
42 // implementation of BoundaryBase::updateGhostValues
43 virtual PetscErrorCode updateGhostValues(const type::Solution &soln);
44
45 // implementation of BoundaryBase::copyValues2LocalVecs
46 virtual PetscErrorCode copyValues2LocalVecs(
47 std::vector<Vec> &lclVecs) const;
48
49protected:
50 // implementation of BoundaryBase::init
51 virtual PetscErrorCode init(const type::Mesh &mesh, const YAML::Node &node);
52
53}; // BoundarySimple
54
55} // end of namespace boundary
56
57} // end of namespace petibm
boundary::BoundaryBase, type::Boundary, and factory function.
Base (abstract) class for the whole boundary.
Definition: boundary.h:79
type::Mesh mesh
A shared_ptr to underlying mesh.
Definition: boundary.h:159
An implementation of petibm::boundary::BoundaryBase.
BoundarySimple(const type::Mesh &mesh, const YAML::Node &node)
Construct a boundary object based on a given mesh object.
virtual PetscErrorCode copyValues2LocalVecs(std::vector< Vec > &lclVecs) const
Copy values of ghost points to a vector of local PETSc Vec objects.
virtual ~BoundarySimple()=default
Default destructor.
virtual PetscErrorCode init(const type::Mesh &mesh, const YAML::Node &node)
Underlying initialization function.
virtual PetscErrorCode updateGhostValues(const type::Solution &soln)
Update the values of ghost points.
virtual PetscErrorCode setGhostICs(const type::Solution &soln)
Set the initial values of ghost points.
virtual PetscErrorCode updateEqs(const type::Solution &soln, const PetscReal &dt)
Update the equations between ghost and boundary points.
std::shared_ptr< mesh::MeshBase > Mesh
Type definition of Mesh.
Definition: mesh.h:348
std::shared_ptr< solution::SolutionBase > Solution
Type definition of solution object.
Definition: solution.h:210
A toolbox for building flow solvers.
Definition: bodypack.h:52