PetIBM 0.5.4
Toolbox and applications of the immersed-boundary method for distributed-memory architectures
|
Objects related to immersed-boundary bodies. More...
Namespaces | |
namespace | petibm::body |
A namespace for objects and functions related to immersed-boundary bodies. | |
Classes | |
class | petibm::body::BodyPackBase |
Base (abstract) class for a pack of bodies. More... | |
class | petibm::body::SingleBodyBase |
Base (abstract) class for a single body. More... | |
class | petibm::body::SingleBodyPoints |
An implementation of body::SingleBodyBase that uses point data as input. More... | |
Typedefs | |
typedef std::shared_ptr< body::BodyPackBase > | petibm::type::BodyPack |
Definition of type::BodyPack. More... | |
typedef std::shared_ptr< body::SingleBodyBase > | petibm::type::SingleBody |
Definition of type::SingleBody. More... | |
Functions | |
PetscErrorCode | petibm::body::createBodyPack (const MPI_Comm &comm, const PetscInt &dim, const YAML::Node &node, type::BodyPack &bodies) |
Factory function to create a pack of bodies. More... | |
PetscErrorCode | petibm::body::createSingleBody (const MPI_Comm &comm, const PetscInt &dim, const std::string &type, const std::string &name, const std::string &filePath, type::SingleBody &body) |
Factory function to create a single body. More... | |
Objects related to immersed-boundary bodies.
This module contains objects related to immersed-boundary bodies and factory functions.
A petibm::type::SingleBody is an object holding information of a single body, including coordinates of Lagrangian points, and the indices of relevant background Eulerian mesh points, etc. It also has member functions regarding to a single body. For example, to update the indices of relevant Eulerian mesh points, I/O, calculating forces, etc. A petibm::type::SingleBody is distributed to all MPI processes regardless the decomposition of the background Eulerian mesh. It also handles the indexing of Lagrangian points in a parallel PETSc Vec.
A petibm::type::BodyPack is just a collection of all petibm::type::SingleBody in the domain for the purpose of easy coding. A member function in a petibm::type::BodyPack is generally just calling the corresponding function inside each single body. petibm::type::BodyPack also works even there is only one single body. It also handles the indexing of Lagrangian points in a packed parallel PETSc Vec.
Users should use petibm::body::createBodyPack to create an instance. Although it's not encouraged, users can also use petibm::body::createSingleBody if there is only one body in their application code.
typedef std::shared_ptr<body::BodyPackBase> petibm::type::BodyPack |
Definition of type::BodyPack.
Definition at line 262 of file bodypack.h.
typedef std::shared_ptr<body::SingleBodyBase> petibm::type::SingleBody |
Definition of type::SingleBody.
Definition at line 206 of file singlebody.h.
PetscErrorCode petibm::body::createBodyPack | ( | const MPI_Comm & | comm, |
const PetscInt & | dim, | ||
const YAML::Node & | node, | ||
type::BodyPack & | bodies | ||
) |
Factory function to create a pack of bodies.
comm | [in] MPI communicator. |
dim | [in] Number of dimensions. |
node | [in] YAML configuration node. |
bodies | [out] Bodies data object. |
Definition at line 326 of file bodypack.cpp.
PetscErrorCode petibm::body::createSingleBody | ( | const MPI_Comm & | comm, |
const PetscInt & | dim, | ||
const std::string & | type, | ||
const std::string & | name, | ||
const std::string & | filePath, | ||
type::SingleBody & | body | ||
) |
Factory function to create a single body.
comm | [in] MPI communicator. |
dim | [in] Number of dimensions. |
type | [in] Type of file (currently only accept "point"). |
name | [in] Name of the body. |
filePath | [in] Path of the file with the coordinates. |
bodies | [out] SingleBody data object. |
Definition at line 83 of file singlebody.cpp.