To partition a finite element mesh into balanced submeshes. More...
#include <Partition.h>
Public Member Functions | |
Partition () | |
Default constructor. | |
Partition (Mesh &mesh, size_t n) | |
Constructor to partition a mesh into submeshes. More... | |
Partition (Mesh &mesh, int n, vector< int > &epart) | |
Constructor using already created submeshes. More... | |
~Partition () | |
Destructor. | |
size_t | getNbSubMeshes () const |
Return number of submeshes. | |
size_t | getNbNodes (size_t i) const |
Return number of nodes in given submesh. | |
size_t | getNbElements (size_t i) const |
Return number of elements in given submesh. | |
Mesh * | getMesh () |
Return the global Mesh instance. | |
Mesh * | getMesh (size_t i) |
Return the submesh of label i | |
size_t | getNodeLabelInSubMesh (size_t sm, size_t label) const |
Return node label in subdomain by giving its label in initial mesh. More... | |
size_t | getElementLabelInSubMesh (size_t sm, size_t label) const |
Return element label in subdomain by giving its label in initial mesh. | |
size_t | getNodeLabelInMesh (size_t sm, size_t label) const |
Return node label in initial mesh by giving its label in submesh. More... | |
size_t | getElementLabelInMesh (size_t sm, size_t label) const |
Return element label in initial mesh by giving its label in submesh. | |
size_t | getNbInterfaceSides (size_t sm) const |
Return Number of interface sides for a given sub-mesh. | |
size_t | getSubMesh (size_t sm, size_t i) const |
Return index of submesh that contains the i -th side label in sub-mesh sm More... | |
Mesh & | getSubMesh (size_t i) const |
Return reference to submesh. More... | |
size_t | getFirstSideLabel (size_t sm, size_t i) const |
Return i-th side label in a given submesh. More... | |
size_t | getSecondSideLabel (size_t sm, size_t i) const |
Return side label in the neighbouring submesh corresponding to i -th side label in sub-mesh sm More... | |
int | getNbConnectInSubMesh (int n, int s) const |
Get number of connected nodes in a submesh. More... | |
int | getNbConnectOutSubMesh (int n, int s) const |
Get number of connected nodes out of a submesh. More... | |
void | put (size_t n, string file) const |
Save a submesh in file. More... | |
void | set (Mesh &mesh, size_t n) |
Set Mesh instance. | |
Detailed Description
To partition a finite element mesh into balanced submeshes.
Class Partition enables partitioning a given mesh into a given number of submeshes with a minimal connectivity. Partition uses the well known metis
library that is included in the OFELI library. A more detailed description of metis can be found in the web site:
http://www.csit.fsu.edu/~burkardt/c_src/metis/metis.html
- Copyright
- GNU Lesser Public License
Constructor & Destructor Documentation
◆ Partition() [1/2]
Constructor to partition a mesh into submeshes.
- Parameters
-
[in] mesh Mesh instance [in] n Number of submeshes
◆ Partition() [2/2]
Constructor using already created submeshes.
- Parameters
-
[in] mesh Mesh instance [in] n Number of submeshes [in] epart Vector containing for each element its submesh label (Running from 0 to n-1
Member Function Documentation
◆ getFirstSideLabel()
size_t getFirstSideLabel | ( | size_t | sm, |
size_t | i | ||
) | const |
Return i-th side label in a given submesh.
- Parameters
-
[in] sm Index of submesh [in] i Label of side
◆ getNbConnectInSubMesh()
int getNbConnectInSubMesh | ( | int | n, |
int | s | ||
) | const |
Get number of connected nodes in a submesh.
- Parameters
-
[in] n Label of node for which connections are counted [in] s Label of submesh (starting from 0)
◆ getNbConnectOutSubMesh()
int getNbConnectOutSubMesh | ( | int | n, |
int | s | ||
) | const |
Get number of connected nodes out of a submesh.
- Parameters
-
[in] n Label of node for which connections are counted [in] s Label of submesh (starting from 0)
◆ getNodeLabelInMesh()
size_t getNodeLabelInMesh | ( | size_t | sm, |
size_t | label | ||
) | const |
Return node label in initial mesh by giving its label in submesh.
- Parameters
-
[in] sm Label of submesh [in] label Node label
◆ getNodeLabelInSubMesh()
size_t getNodeLabelInSubMesh | ( | size_t | sm, |
size_t | label | ||
) | const |
Return node label in subdomain by giving its label in initial mesh.
- Parameters
-
[in] sm Label of submesh [in] label Label of node in initial mesh
◆ getSecondSideLabel()
size_t getSecondSideLabel | ( | size_t | sm, |
size_t | i | ||
) | const |
Return side label in the neighbouring submesh corresponding to i
-th side label in sub-mesh sm
- Parameters
-
[in] sm Label of submesh [in] i Side label
◆ getSubMesh() [1/2]
Mesh & getSubMesh | ( | size_t | i | ) | const |
Return reference to submesh.
- Parameters
-
[in] i Submesh index
- Returns
- Reference to corresponding Mesh instance
◆ getSubMesh() [2/2]
size_t getSubMesh | ( | size_t | sm, |
size_t | i | ||
) | const |
Return index of submesh that contains the i
-th side label in sub-mesh sm
- Parameters
-
[in] sm Submesh index [in] i Side label
- Returns
- Index of submesh
◆ put()
void put | ( | size_t | n, |
string | file | ||
) | const |
Save a submesh in file.
- Parameters
-
[in] n Label of submesh [in] file Name of file in which submesh is saved