PanNDE
All Classes Namespaces Functions Pages
Public Member Functions | List of all members
PanNDE::MeshFactory Class Referenceabstract

#include "modules/PanNDE/include/Mesh.hpp"

Inheritance diagram for PanNDE::MeshFactory:
HostData::HexMeshFactory

Public Member Functions

virtual PanNDE::Mesh::Node makeNode (double coord[3], int64_t global_id, int32_t owner=0)=0
 
virtual PanNDE::Mesh::Cell makeCell (int32_t *nodes, int32_t Nnodes, int64_t global_id, int32_t owner=0)=0
 
virtual std::shared_ptr< PanNDE::MeshmakeManagedMesh (PanNDE::Mesh::Node *nodes, int64_t Nnodes, PanNDE::Mesh::Cell *cells, int64_t Ncells, int32_t partition=0)=0
 
virtual std::shared_ptr< PanNDE::MeshmakeManagedMesh (std::shared_ptr< PanNDE::Array< PanNDE::Mesh::Node >> nodes, std::shared_ptr< PanNDE::Array< PanNDE::Mesh::Cell >> cells, int32_t partition=0)=0
 
virtual PanNDE::MeshnewMesh (PanNDE::Mesh::Node *nodes, int64_t Nnodes, PanNDE::Mesh::Cell *cells, int64_t Ncells, int32_t partition=0)=0
 
virtual PanNDE::MeshnewMesh (std::shared_ptr< PanNDE::Array< PanNDE::Mesh::Node >> nodes, std::shared_ptr< PanNDE::Array< PanNDE::Mesh::Cell >> cells, int32_t partition=0)=0
 
virtual void deleteMesh (PanNDE::Mesh *mesh)=0
 
virtual std::shared_ptr< PanNDE::Array< std::shared_ptr< PanNDE::Mesh > > > makeManagedMeshArray ()=0
 

Detailed Description

Defines a factory class to create a Mesh object

Member Function Documentation

◆ deleteMesh()

virtual void PanNDE::MeshFactory::deleteMesh ( PanNDE::Mesh mesh)
pure virtual

delete meshes created using newMesh()

Parameters
meshmesh to be deleted

Implemented in HostData::HexMeshFactory.

◆ makeCell()

virtual PanNDE::Mesh::Cell PanNDE::MeshFactory::makeCell ( int32_t *  nodes,
int32_t  Nnodes,
int64_t  global_id,
int32_t  owner = 0 
)
pure virtual

make a cell

Parameters
nodesnodal indicies which form the corners of the cell
Nnodesnumber of nodes which define the cell (e.g. 8 for hexes, 4 for tets)
global_idthe global identifier of the cell
ownerwhich mesh partition the cell belongs to

Implemented in HostData::HexMeshFactory.

◆ makeManagedMesh() [1/2]

virtual std::shared_ptr<PanNDE::Mesh> PanNDE::MeshFactory::makeManagedMesh ( PanNDE::Mesh::Node nodes,
int64_t  Nnodes,
PanNDE::Mesh::Cell cells,
int64_t  Ncells,
int32_t  partition = 0 
)
pure virtual

create a shared mesh

Parameters
nodesa C-style array (not preferred) of Node structs
Nnodesthe length of the nodes array
cellsa C-style array (not preferred) of cell structs
Ncellsthe length of the cells array
partitionthe partition identifier of the mesh to be created

Implemented in HostData::HexMeshFactory.

◆ makeManagedMesh() [2/2]

virtual std::shared_ptr<PanNDE::Mesh> PanNDE::MeshFactory::makeManagedMesh ( std::shared_ptr< PanNDE::Array< PanNDE::Mesh::Node >>  nodes,
std::shared_ptr< PanNDE::Array< PanNDE::Mesh::Cell >>  cells,
int32_t  partition = 0 
)
pure virtual

create a shared mesh

Parameters
nodesa PanNDE array of Node structs
cellsa PanNDE array of cell structs
partitionthe partition identifier of the mesh to be created

◆ makeManagedMeshArray()

virtual std::shared_ptr<PanNDE::Array<std::shared_ptr<PanNDE::Mesh> > > PanNDE::MeshFactory::makeManagedMeshArray ( )
pure virtual

create a mesh array

Implemented in HostData::HexMeshFactory.

◆ makeNode()

virtual PanNDE::Mesh::Node PanNDE::MeshFactory::makeNode ( double  coord[3],
int64_t  global_id,
int32_t  owner = 0 
)
pure virtual

make a node

Parameters
coord[3]nodal cartesian coordinates
global_idthe global identifier of the node
ownerwhich mesh partition the node belongs to

Implemented in HostData::HexMeshFactory.

◆ newMesh() [1/2]

virtual PanNDE::Mesh* PanNDE::MeshFactory::newMesh ( PanNDE::Mesh::Node nodes,
int64_t  Nnodes,
PanNDE::Mesh::Cell cells,
int64_t  Ncells,
int32_t  partition = 0 
)
pure virtual

create a mesh on a raw pointer. not recommended, call deleteMesh() if used.

Parameters
nodesa C-style array (not preferred) of Node structs
Nnodesthe length of the nodes array
cellsa C-style array (not preferred) of cell structs
Ncellsthe length of the cells array
partitionthe partition identifier of the mesh to be created

Implemented in HostData::HexMeshFactory.

◆ newMesh() [2/2]

virtual PanNDE::Mesh* PanNDE::MeshFactory::newMesh ( std::shared_ptr< PanNDE::Array< PanNDE::Mesh::Node >>  nodes,
std::shared_ptr< PanNDE::Array< PanNDE::Mesh::Cell >>  cells,
int32_t  partition = 0 
)
pure virtual

create a mesh on a raw pointer. not recommended, call deleteMesh() if used.

Parameters
nodesa PanNDE array of Node structs
cellsa PanNDE array of cell structs
partitionthe partition identifier of the mesh to be created

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