PetIBM 0.5.4
Toolbox and applications of the immersed-boundary method for distributed-memory architectures
User-defined types in PetIBM

Useful user-defined types in PetIBM. More...

Collaboration diagram for User-defined types in PetIBM:

Namespaces

namespace  petibm::type
 Frequently used types, structures, and enums.
 

Classes

struct  petibm::type::GhostPointInfo
 A data structure for a single ghost point. More...
 
struct  petibm::type::RowModifier
 A struct holding information about which row in a matrix should be modified based on BCs. More...
 

Typedefs

typedef std::vector< PetscInt > petibm::type::IntVec1D
 1D std::vector holding PetscInt. More...
 
typedef std::vector< IntVec1Dpetibm::type::IntVec2D
 2D std::vector holding PetscInt. More...
 
typedef std::vector< IntVec2Dpetibm::type::IntVec3D
 3D std::vector holding PetscInt. More...
 
typedef std::vector< PetscReal > petibm::type::RealVec1D
 1D std::vector holding PetscReal. More...
 
typedef std::vector< RealVec1Dpetibm::type::RealVec2D
 2D std::vector holding PetscReal. More...
 
typedef std::vector< RealVec2Dpetibm::type::RealVec3D
 3D std::vector holding PetscReal. More...
 
typedef std::vector< PetscBool > petibm::type::BoolVec1D
 1D std::vector holding PetscBool. More...
 
typedef std::vector< BoolVec1Dpetibm::type::BoolVec2D
 2D std::vector holding PetscBool. More...
 
typedef std::vector< BoolVec2Dpetibm::type::BoolVec3D
 3D std::vector holding PetscBool. More...
 
typedef std::vector< PetscReal * > petibm::type::GhostedVec2D
 a vector of pointers to mimic ghosted 1D vectors. More...
 
typedef std::map< MatStencil, GhostPointInfopetibm::type::GhostPointsList
 A map between MatStencil and GhostPointInfo. More...
 
typedef std::vector< std::map< MatStencil, RowModifier > > petibm::type::MatrixModifier
 A type that holds necessary info for a matrix modifier that modifies matrix coefficient based on BCs. More...
 

Enumerations

enum  petibm::type::Dir { petibm::type::x = 0 , petibm::type::y , petibm::type::z }
 Legal physical directions. More...
 
enum  petibm::type::Field { petibm::type::u = 0 , petibm::type::v , petibm::type::w , petibm::type::p , petibm::type::vertex }
 Legal fields. More...
 
enum  petibm::type::BCType { petibm::type::NOBC = 0 , petibm::type::PERIODIC , petibm::type::DIRICHLET , petibm::type::NEUMANN , petibm::type::CONVECTIVE }
 Type of boundary conditions. More...
 
enum  petibm::type::BCLoc { petibm::type::XMINUS = 0 , petibm::type::XPLUS , petibm::type::YMINUS , petibm::type::YPLUS , petibm::type::ZMINUS , petibm::type::ZPLUS }
 Location of a boundary. More...
 
enum  petibm::type::ProbeType { petibm::type::POINT = 0 , petibm::type::LINE , petibm::type::SURFACE , petibm::type::VOLUME }
 Type of probe for monitoring solution. More...
 

Variables

std::map< std::string, Dirpetibm::type::str2dir {{"x", x}, {"y", y}, {"z", z}}
 Mapping between std::string and Dir. More...
 
std::map< Dir, std::string > petibm::type::dir2str {{x, "x"}, {y, "y"}, {z, "z"}}
 Mapping between Dir and std::string. More...
 
std::map< std::string, Fieldpetibm::type::str2fd
 Mapping between std::string and Field. More...
 
std::map< Field, std::string > petibm::type::fd2str
 Mapping between Field and std::string. More...
 
std::map< std::string, BCTypepetibm::type::str2bt
 Mapping between std::string and BCType. More...
 
std::map< BCType, std::string > petibm::type::bt2str
 mapping between BCType and std::string. More...
 
std::map< std::string, BCLocpetibm::type::str2bl
 Mapping between std::string and BCLoc. More...
 
std::map< BCLoc, std::string > petibm::type::bl2str
 Mapping between BCLoc and std::string. More...
 
std::map< std::string, ProbeTypepetibm::type::str2ProbeType
 Mapping between std::string and ProbeType. More...
 

Detailed Description

Useful user-defined types in PetIBM.

User-defined types to simplify the source code.

PETSc also has its own type definitions. Here are information of some PETSc types we use in PetIBM:

Typedef Documentation

◆ BoolVec1D

typedef std::vector<PetscBool> petibm::type::BoolVec1D

1D std::vector holding PetscBool.

Definition at line 147 of file type.h.

◆ BoolVec2D

typedef std::vector<BoolVec1D> petibm::type::BoolVec2D

2D std::vector holding PetscBool.

Definition at line 149 of file type.h.

◆ BoolVec3D

typedef std::vector<BoolVec2D> petibm::type::BoolVec3D

3D std::vector holding PetscBool.

Definition at line 151 of file type.h.

◆ GhostedVec2D

typedef std::vector<PetscReal*> petibm::type::GhostedVec2D

a vector of pointers to mimic ghosted 1D vectors.

Definition at line 154 of file type.h.

◆ GhostPointsList

typedef std::map<MatStencil, GhostPointInfo> petibm::type::GhostPointsList

A map between MatStencil and GhostPointInfo.

Definition at line 177 of file type.h.

◆ IntVec1D

typedef std::vector<PetscInt> petibm::type::IntVec1D

1D std::vector holding PetscInt.

Definition at line 133 of file type.h.

◆ IntVec2D

typedef std::vector<IntVec1D> petibm::type::IntVec2D

2D std::vector holding PetscInt.

Definition at line 135 of file type.h.

◆ IntVec3D

typedef std::vector<IntVec2D> petibm::type::IntVec3D

3D std::vector holding PetscInt.

Definition at line 137 of file type.h.

◆ MatrixModifier

typedef std::vector<std::map<MatStencil, RowModifier> > petibm::type::MatrixModifier

A type that holds necessary info for a matrix modifier that modifies matrix coefficient based on BCs.

Definition at line 195 of file type.h.

◆ RealVec1D

typedef std::vector<PetscReal> petibm::type::RealVec1D

1D std::vector holding PetscReal.

Definition at line 140 of file type.h.

◆ RealVec2D

typedef std::vector<RealVec1D> petibm::type::RealVec2D

2D std::vector holding PetscReal.

Definition at line 142 of file type.h.

◆ RealVec3D

typedef std::vector<RealVec2D> petibm::type::RealVec3D

3D std::vector holding PetscReal.

Definition at line 144 of file type.h.

Enumeration Type Documentation

◆ BCLoc

Location of a boundary.

Enumerator
XMINUS 
XPLUS 
YMINUS 
YPLUS 
ZMINUS 
ZPLUS 

Definition at line 107 of file type.h.

◆ BCType

Type of boundary conditions.

Enumerator
NOBC 
PERIODIC 
DIRICHLET 
NEUMANN 
CONVECTIVE 

Definition at line 93 of file type.h.

◆ Dir

Legal physical directions.

Enumerator

Definition at line 67 of file type.h.

◆ Field

Legal fields.

Enumerator
vertex 

Definition at line 79 of file type.h.

◆ ProbeType

Type of probe for monitoring solution.

Enumerator
POINT 
LINE 
SURFACE 
VOLUME 

Definition at line 122 of file type.h.

Variable Documentation

◆ bl2str

std::map< BCLoc, std::string > petibm::type::bl2str
Initial value:
{{XMINUS, "xMinus"}, {XPLUS, "xPlus"},
{YMINUS, "yMinus"}, {YPLUS, "yPlus"},
{ZMINUS, "zMinus"}, {ZPLUS, "zPlus"}}
@ ZMINUS
Definition: type.h:113
@ XMINUS
Definition: type.h:109
@ YMINUS
Definition: type.h:111

Mapping between BCLoc and std::string.

Definition at line 48 of file type.cpp.

◆ bt2str

std::map< BCType, std::string > petibm::type::bt2str
Initial value:
{{NOBC, "NOBC"},
{DIRICHLET, "DIRICHLET"},
{NEUMANN, "NEUMANN"},
{CONVECTIVE, "CONVECTIVE"},
{PERIODIC, "PERIODIC"}}
@ PERIODIC
Definition: type.h:96
@ CONVECTIVE
Definition: type.h:99
@ NOBC
Definition: type.h:95
@ DIRICHLET
Definition: type.h:97
@ NEUMANN
Definition: type.h:98

mapping between BCType and std::string.

Definition at line 34 of file type.cpp.

◆ dir2str

std::map< Dir, std::string > petibm::type::dir2str {{x, "x"}, {y, "y"}, {z, "z"}}

Mapping between Dir and std::string.

Definition at line 18 of file type.cpp.

◆ fd2str

std::map< Field, std::string > petibm::type::fd2str
Initial value:
{
{u, "u"}, {v, "v"}, {w, "w"}, {p, "p"}, {vertex, "vertex"}}
@ vertex
Definition: type.h:85

Mapping between Field and std::string.

Definition at line 24 of file type.cpp.

◆ str2bl

std::map< std::string, BCLoc > petibm::type::str2bl
Initial value:
{
{"left", XMINUS}, {"right", XPLUS}, {"bottom", YMINUS}, {"top", YPLUS},
{"back", ZMINUS}, {"front", ZPLUS}, {"xMinus", XMINUS}, {"xPlus", XPLUS},
{"yMinus", YMINUS}, {"yPlus", YPLUS}, {"zMinus", ZMINUS}, {"zPlus", ZPLUS},
{"XMINUS", XMINUS}, {"XPLUS", XPLUS}, {"YMINUS", YMINUS}, {"YPLUS", YPLUS},
{"ZMINUS", ZMINUS}, {"ZPLUS", ZPLUS}}

Mapping between std::string and BCLoc.

Definition at line 41 of file type.cpp.

◆ str2bt

std::map< std::string, BCType > petibm::type::str2bt
Initial value:
{{"NOBC", NOBC},
{"DIRICHLET", DIRICHLET},
{"NEUMANN", NEUMANN},
{"CONVECTIVE", CONVECTIVE},
{"PERIODIC", PERIODIC}}

Mapping between std::string and BCType.

Definition at line 28 of file type.cpp.

◆ str2dir

std::map< std::string, Dir > petibm::type::str2dir {{"x", x}, {"y", y}, {"z", z}}

Mapping between std::string and Dir.

Definition at line 16 of file type.cpp.

◆ str2fd

std::map< std::string, Field > petibm::type::str2fd
Initial value:
{
{"u", u}, {"v", v}, {"w", w}, {"p", p}, {"vertex", vertex}}

Mapping between std::string and Field.

Definition at line 21 of file type.cpp.

◆ str2ProbeType

std::map< std::string, ProbeType > petibm::type::str2ProbeType
Initial value:
{
{"POINT", POINT}, {"LINE", LINE},
{"SURFACE", SURFACE}, {"VOLUME", VOLUME}}
@ VOLUME
Definition: type.h:127
@ SURFACE
Definition: type.h:126

Mapping between std::string and ProbeType.

Definition at line 53 of file type.cpp.