MFEM v2.0
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
ParMesh Class Reference

Class for parallel meshes. More...

#include <pmesh.hpp>

Inheritance diagram for ParMesh:
Inheritance graph
[legend]
Collaboration diagram for ParMesh:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ParMesh (MPI_Comm comm, Mesh &mesh, int *partitioning_=NULL, int part_method=1)
MPI_Comm GetComm ()
int GetNRanks ()
int GetMyRank ()
int GetNGroups ()
int GroupNVertices (int group)
int GroupNEdges (int group)
int GroupNFaces (int group)
int GroupVertex (int group, int i)
void GroupEdge (int group, int i, int &edge, int &o)
void GroupFace (int group, int i, int &face, int &o)
virtual void ReorientTetMesh ()
 See the remarks for the serial version in mesh.hpp.
virtual void LocalRefinement (const Array< int > &marked_el, int type=3)
 Refine the marked elements.
void RefineGroups (const DSTable &v_to_v, int *middle)
 Update the groups after tet refinement.
virtual void Print (ostream &out=cout) const
virtual void PrintXG (ostream &out=cout) const
void PrintAsOne (ostream &out=cout)
void PrintAsOneXG (ostream &out=cout)
 Old mesh format (Netgen/Truegrid) version of 'PrintAsOne'.
void PrintInfo (ostream &out=cout)
 Print various parallel mesh stats.
virtual ~ParMesh ()

Public Attributes

GroupTopology gtopo

Private Member Functions

int GetEdgeSplittings (Element *edge, const DSTable &v_to_v, int *middle)
 Return a number(0-1) identifying how the given edge has been split.
int GetFaceSplittings (Element *face, const DSTable &v_to_v, int *middle)
 Return a number(0-4) identifying how the given face has been split.
virtual void QuadUniformRefinement ()
 Refine quadrilateral mesh.
virtual void HexUniformRefinement ()
 Refine a hexahedral mesh.
virtual void NURBSUniformRefinement ()
 Refine NURBS mesh.

Private Attributes

MPI_Comm MyComm
int NRanks
int MyRank
Array< Element * > shared_edges
Array< Element * > shared_faces
Table group_svert
 Shared objects in each group.
Table group_sedge
Table group_sface
Array< int > svert_lvert
 Shared to local index mapping.
Array< int > sedge_ledge
Array< int > sface_lface

Detailed Description

Class for parallel meshes.

Definition at line 16 of file pmesh.hpp.


Constructor & Destructor Documentation

ParMesh::ParMesh ( MPI_Comm  comm,
Mesh mesh,
int *  partitioning_ = NULL,
int  part_method = 1 
)
virtual ParMesh::~ParMesh ( ) [virtual]

Member Function Documentation

MPI_Comm ParMesh::GetComm ( ) [inline]

Definition at line 52 of file pmesh.hpp.

References MyComm.

int ParMesh::GetEdgeSplittings ( Element edge,
const DSTable v_to_v,
int *  middle 
) [private]

Return a number(0-1) identifying how the given edge has been split.

int ParMesh::GetFaceSplittings ( Element face,
const DSTable v_to_v,
int *  middle 
) [private]

Return a number(0-4) identifying how the given face has been split.

int ParMesh::GetMyRank ( ) [inline]

Definition at line 54 of file pmesh.hpp.

References MyRank.

int ParMesh::GetNGroups ( ) [inline]

Definition at line 58 of file pmesh.hpp.

References gtopo, and GroupTopology::NGroups().

int ParMesh::GetNRanks ( ) [inline]

Definition at line 53 of file pmesh.hpp.

References NRanks.

void ParMesh::GroupEdge ( int  group,
int  i,
int &  edge,
int &  o 
)
void ParMesh::GroupFace ( int  group,
int  i,
int &  face,
int &  o 
)
int ParMesh::GroupNEdges ( int  group) [inline]

Definition at line 62 of file pmesh.hpp.

References group_sedge, and Table::RowSize().

int ParMesh::GroupNFaces ( int  group) [inline]

Definition at line 63 of file pmesh.hpp.

References group_sface, and Table::RowSize().

int ParMesh::GroupNVertices ( int  group) [inline]

Definition at line 61 of file pmesh.hpp.

References group_svert, and Table::RowSize().

int ParMesh::GroupVertex ( int  group,
int  i 
) [inline]

Definition at line 65 of file pmesh.hpp.

References Table::GetI(), Table::GetJ(), group_svert, and svert_lvert.

virtual void ParMesh::HexUniformRefinement ( ) [private, virtual]

Refine a hexahedral mesh.

Reimplemented from Mesh.

virtual void ParMesh::LocalRefinement ( const Array< int > &  marked_el,
int  type = 3 
) [virtual]

Refine the marked elements.

Reimplemented from Mesh.

virtual void ParMesh::NURBSUniformRefinement ( ) [private, virtual]

Refine NURBS mesh.

Reimplemented from Mesh.

virtual void ParMesh::Print ( ostream &  out = cout) const [virtual]

Print the part of the mesh in the calling processor adding the interface as boundary (for visualization purposes) using the default format.

Reimplemented from Mesh.

Referenced by main().

void ParMesh::PrintAsOne ( ostream &  out = cout)

Write the mesh to the stream 'out' on Process 0 in a form suitable for visualization: the mesh is written as a disjoint mesh and the shared boundary is added to the actual boundary; both the element and boundary attributes are set to the precessor number.

void ParMesh::PrintAsOneXG ( ostream &  out = cout)

Old mesh format (Netgen/Truegrid) version of 'PrintAsOne'.

void ParMesh::PrintInfo ( ostream &  out = cout)

Print various parallel mesh stats.

virtual void ParMesh::PrintXG ( ostream &  out = cout) const [virtual]

Print the part of the mesh in the calling processor adding the interface as boundary (for visualization purposes) using Netgen/Truegrid format .

Reimplemented from Mesh.

virtual void ParMesh::QuadUniformRefinement ( ) [private, virtual]

Refine quadrilateral mesh.

Reimplemented from Mesh.

void ParMesh::RefineGroups ( const DSTable v_to_v,
int *  middle 
)

Update the groups after tet refinement.

virtual void ParMesh::ReorientTetMesh ( ) [virtual]

See the remarks for the serial version in mesh.hpp.

Reimplemented from Mesh.

Referenced by main().


Member Data Documentation

Definition at line 27 of file pmesh.hpp.

Referenced by GroupNEdges().

Definition at line 28 of file pmesh.hpp.

Referenced by GroupNFaces().

Shared objects in each group.

Definition at line 26 of file pmesh.hpp.

Referenced by GroupNVertices(), and GroupVertex().

Definition at line 56 of file pmesh.hpp.

Referenced by ParFiniteElementSpace::GetGroupTopo(), and GetNGroups().

MPI_Comm ParMesh::MyComm [private]

Definition at line 19 of file pmesh.hpp.

Referenced by GetComm().

int ParMesh::MyRank [private]

Definition at line 20 of file pmesh.hpp.

Referenced by GetMyRank().

int ParMesh::NRanks [private]

Definition at line 20 of file pmesh.hpp.

Referenced by GetNRanks().

Array<int> ParMesh::sedge_ledge [private]

Definition at line 32 of file pmesh.hpp.

Array<int> ParMesh::sface_lface [private]

Definition at line 33 of file pmesh.hpp.

Definition at line 22 of file pmesh.hpp.

Definition at line 23 of file pmesh.hpp.

Array<int> ParMesh::svert_lvert [private]

Shared to local index mapping.

Definition at line 31 of file pmesh.hpp.

Referenced by GroupVertex().


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines