(9)

To partition a finite element mesh into balanced submeshes. More...

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.
 
MeshgetMesh ()
 Return the global Mesh instance.
 
MeshgetMesh (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...
 
MeshgetSubMesh (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.
 

Friends

ostream & operator<< (ostream &s, const Partition &p)
 Output class information.
 

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

Author
Rachid Touzani

Constructor & Destructor Documentation

◆ Partition() [1/2]

Partition ( Mesh mesh,
size_t  n 
)

Constructor to partition a mesh into submeshes.

Parameters
[in]meshMesh instance
[in]nNumber of submeshes

◆ Partition() [2/2]

Partition ( Mesh mesh,
int  n,
vector< int > &  epart 
)

Constructor using already created submeshes.

Parameters
[in]meshMesh instance
[in]nNumber of submeshes
[in]epartVector 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]smIndex of submesh
[in]iLabel of side

◆ getNbConnectInSubMesh()

int getNbConnectInSubMesh ( int  n,
int  s 
) const

Get number of connected nodes in a submesh.

Parameters
[in]nLabel of node for which connections are counted
[in]sLabel of submesh (starting from 0)

◆ getNbConnectOutSubMesh()

int getNbConnectOutSubMesh ( int  n,
int  s 
) const

Get number of connected nodes out of a submesh.

Parameters
[in]nLabel of node for which connections are counted
[in]sLabel 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]smLabel of submesh
[in]labelNode 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]smLabel of submesh
[in]labelLabel 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]smLabel of submesh
[in]iSide label

◆ getSubMesh() [1/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]smSubmesh index
[in]iSide label
Returns
Index of submesh

◆ getSubMesh() [2/2]

Mesh& getSubMesh ( size_t  i) const

Return reference to submesh.

Parameters
[in]iSubmesh index
Returns
Reference to corresponding Mesh instance

◆ put()

void put ( size_t  n,
string  file 
) const

Save a submesh in file.

Parameters
[in]nLabel of submesh
[in]fileName of file in which submesh is saved