MFEM
v3.4
Finite element discretization library
|
A parallel extension of the NCMesh class. More...
#include <pncmesh.hpp>
Classes | |
class | ElementSet |
class | ElementValueMessage |
class | NeighborDerefinementMessage |
class | NeighborElementRankMessage |
class | NeighborRefinementMessage |
class | RebalanceDofMessage |
class | RebalanceMessage |
Public Types | |
typedef short | GroupId |
typedef std::vector< int > | CommGroup |
Public Member Functions | |
ParNCMesh (MPI_Comm comm, const NCMesh &ncmesh) | |
virtual | ~ParNCMesh () |
virtual void | Refine (const Array< Refinement > &refinements) |
virtual void | LimitNCLevel (int max_nc_level) |
Parallel version of NCMesh::LimitNCLevel. More... | |
virtual void | CheckDerefinementNCLevel (const Table &deref_table, Array< int > &level_ok, int max_nc_level) |
virtual void | Derefine (const Array< int > &derefs) |
void | Rebalance () |
int | GetNElements () const |
int | GetNGhostVertices () const |
int | GetNGhostEdges () const |
int | GetNGhostFaces () const |
int | GetNGhostElements () const |
const NCList & | GetSharedVertices () |
const NCList & | GetSharedEdges () |
const NCList & | GetSharedFaces () |
const NCList & | GetSharedList (int entity) |
Helper to get shared vertices/edges/faces ('entity' == 0/1/2 resp.). More... | |
int | GetFaceOrientation (int index) const |
Return (shared) face orientation relative to its owner element. More... | |
GroupId | GetOwnerId (int entity, int index) const |
Return vertex/edge/face ('entity' == 0/1/2, resp.) owner. More... | |
GroupId | GetGroupId (int entity, int index) const |
Return the communication group ID for a vertex/edge/face. More... | |
const CommGroup & | GetGroup (GroupId id) const |
Return a list of ranks contained in the group of the given ID. More... | |
bool | GroupContains (GroupId id, int rank) const |
Return true if group 'id' contains the given rank. More... | |
void | AugmentMasterGroups () |
bool | IsGhost (int entity, int index) const |
Return true if the specified vertex/edge/face is a ghost. More... | |
int | ElementRank (int index) const |
void | GetFaceNeighbors (class ParMesh &pmesh) |
int | GetMyRank () const |
void | SendRebalanceDofs (int old_ndofs, const Table &old_element_dofs, long old_global_offset, FiniteElementSpace *space) |
Use the communication pattern from last Rebalance() to send element DOFs. More... | |
void | RecvRebalanceDofs (Array< int > &elements, Array< long > &dofs) |
Receive element DOFs sent by SendRebalanceDofs(). More... | |
const Array< int > & | GetRebalanceOldIndex () const |
const Array< int > & | GetDerefineOldRanks () const |
template<typename Type > | |
void | SynchronizeDerefinementData (Array< Type > &elem_data, const Table &deref_table) |
virtual void | GetBoundaryClosure (const Array< int > &bdr_attr_is_ess, Array< int > &bdr_vertices, Array< int > &bdr_edges) |
virtual void | Trim () |
Save memory by releasing all non-essential and cached data. More... | |
long | MemoryUsage (bool with_base=true) const |
Return total number of bytes allocated. More... | |
int | PrintMemoryDetail (bool with_base=true) const |
void | GetDebugMesh (Mesh &debug_mesh) const |
Public Member Functions inherited from mfem::NCMesh | |
NCMesh (const Mesh *mesh, std::istream *vertex_parents=NULL) | |
NCMesh (const NCMesh &other) | |
virtual | ~NCMesh () |
int | Dimension () const |
int | SpaceDimension () const |
int | GetNVertices () const |
int | GetNEdges () const |
int | GetNFaces () const |
const Table & | GetDerefinementTable () |
const NCList & | GetFaceList () |
Return the current list of conforming and nonconforming faces. More... | |
const NCList & | GetEdgeList () |
Return the current list of conforming and nonconforming edges. More... | |
const NCList & | GetVertexList () |
const NCList & | GetNCList (int entity) |
Return vertex/edge/face list (entity = 0/1/2, respectively). More... | |
void | MarkCoarseLevel () |
const CoarseFineTransformations & | GetRefinementTransforms () |
const CoarseFineTransformations & | GetDerefinementTransforms () |
void | ClearTransforms () |
Free all internal data created by the above three functions. More... | |
void | GetEdgeVertices (const MeshId &edge_id, int vert_index[2]) const |
Return Mesh vertex indices of an edge identified by 'edge_id'. More... | |
int | GetEdgeNCOrientation (const MeshId &edge_id) const |
void | GetFaceVerticesEdges (const MeshId &face_id, int vert_index[4], int edge_index[4], int edge_orientation[4]) const |
Return Mesh vertex and edge indices of a face identified by 'face_id'. More... | |
int | GetEdgeMaster (int v1, int v2) const |
int | GetElementGeometry () const |
Return the type of elements in the mesh. More... | |
int | GetFaceGeometry () const |
int | GetElementDepth (int i) const |
Return the distance of leaf 'i' from the root. More... | |
void | PrintVertexParents (std::ostream &out) const |
I/O: Print the "vertex_parents" section of the mesh file (ver. >= 1.1). More... | |
void | PrintCoarseElements (std::ostream &out) const |
I/O: Print the "coarse_elements" section of the mesh file (ver. >= 1.1). More... | |
void | LoadVertexParents (std::istream &input) |
void | LoadCoarseElements (std::istream &input) |
I/O: Load the element refinement hierarchy from a mesh file. More... | |
void | SetVertexPositions (const Array< mfem::Vertex > &vertices) |
I/O: Set positions of all vertices (used by mesh loader). More... | |
long | MemoryUsage () const |
Return total number of bytes allocated. More... | |
int | PrintMemoryDetail () const |
void | PrintStats (std::ostream &out=mfem::out) const |
void | DebugDump (std::ostream &out) const |
Protected Types | |
typedef std::vector< CommGroup > | GroupList |
typedef std::map< CommGroup, GroupId > | GroupMap |
Protected Types inherited from mfem::NCMesh | |
typedef HashTable< Node >::iterator | node_iterator |
typedef HashTable< Face >::iterator | face_iterator |
typedef HashTable< Node > ::const_iterator | node_const_iterator |
typedef HashTable< Face > ::const_iterator | face_const_iterator |
typedef BlockArray< Element > ::iterator | elem_iterator |
typedef std::map< std::string, int > | RefPathMap |
Protected Member Functions | |
virtual void | Update () |
virtual bool | IsGhost (const Element &el) const |
virtual int | GetNumGhostElements () const |
virtual int | GetNumGhostVertices () const |
int | Partition (long index, long total_elements) const |
Return the processor number for a global element number. More... | |
int | InitialPartition (int index) const |
Helper to get the partitioning when the serial mesh gets split initially. More... | |
long | PartitionFirstIndex (int rank, long total_elements) const |
Return the global index of the first element owned by processor 'rank'. More... | |
virtual void | UpdateVertices () |
update Vertex::index and vertex_nodeId More... | |
virtual void | AssignLeafIndices () |
virtual void | OnMeshUpdated (Mesh *mesh) |
GroupId | GetGroupId (const CommGroup &group) |
GroupId | JoinGroups (GroupId g1, GroupId g2) |
GroupId | GetSingletonGroup (int rank) |
virtual void | BuildFaceList () |
virtual void | BuildEdgeList () |
virtual void | BuildVertexList () |
virtual void | ElementSharesFace (int elem, int face) |
virtual void | ElementSharesEdge (int elem, int enode) |
virtual void | ElementSharesVertex (int elem, int vnode) |
void | InitOwners (int num, Array< GroupId > &entity_owner) |
void | InitGroups (int num, Array< GroupId > &entity_group) |
void | BuildSharedVertices () |
void | CalcFaceOrientations () |
void | UpdateLayers () |
void | AddMasterSlaveConnections (int nitems, const NCList &list) |
void | AddMasterSlaveConnections (const NCList &list, int entity) |
void | GetGroupShared (Array< bool > &group_shared) |
void | MakeShared (const Array< GroupId > &entity_group, const NCList &list, NCList &shared) |
void | AdjustMeshIds (Array< MeshId > ids[], int rank) |
void | ChangeVertexMeshIdElement (NCMesh::MeshId &id, int elem) |
void | ChangeEdgeMeshIdElement (NCMesh::MeshId &id, int elem) |
void | ChangeRemainingMeshIds (Array< MeshId > &ids, int pos, const Array< Pair< int, int > > &find) |
void | EncodeMeshIds (std::ostream &os, Array< MeshId > ids[]) |
void | DecodeMeshIds (std::istream &is, Array< MeshId > ids[]) |
void | EncodeGroups (std::ostream &os, const Array< GroupId > &ids) |
void | DecodeGroups (std::istream &is, Array< GroupId > &ids) |
bool | CheckElementType (int elem, int type) |
void | ElementNeighborProcessors (int elem, Array< int > &ranks) |
void | NeighborProcessors (Array< int > &neighbors) |
void | Prune () |
bool | PruneTree (int elem) |
Internal. Recursive part of Prune(). More... | |
void | RedistributeElements (Array< int > &new_ranks, int target_elements, bool record_comm) |
void | ClearAuxPM () |
long | GroupsMemoryUsage () const |
Protected Member Functions inherited from mfem::NCMesh | |
void | GetMeshComponents (Array< mfem::Vertex > &mvertices, Array< mfem::Element * > &melements, Array< mfem::Element * > &mboundary) const |
Return the basic Mesh arrays for the current finest level. More... | |
void | CollectLeafElements (int elem, int state) |
void | UpdateLeafElements () |
void | RefineElement (int elem, char ref_type) |
void | DerefineElement (int elem) |
int | AddElement (const Element &el) |
void | FreeElement (int id) |
int | NewHexahedron (int n0, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int attr, int fattr0, int fattr1, int fattr2, int fattr3, int fattr4, int fattr5) |
int | NewQuadrilateral (int n0, int n1, int n2, int n3, int attr, int eattr0, int eattr1, int eattr2, int eattr3) |
int | NewTriangle (int n0, int n1, int n2, int attr, int eattr0, int eattr1, int eattr2) |
mfem::Element * | NewMeshElement (int geom) const |
int | GetMidEdgeNode (int vn1, int vn2) |
int | GetMidFaceNode (int en1, int en2, int en3, int en4) |
int | FaceSplitType (int v1, int v2, int v3, int v4, int mid[4]=NULL) const |
void | ForceRefinement (int vn1, int vn2, int vn3, int vn4) |
void | CheckAnisoFace (int vn1, int vn2, int vn3, int vn4, int mid12, int mid34, int level=0) |
void | CheckIsoFace (int vn1, int vn2, int vn3, int vn4, int en1, int en2, int en3, int en4, int midf) |
void | RefElement (int elem) |
void | UnrefElement (int elem, Array< int > &elemFaces) |
Face * | GetFace (Element &elem, int face_no) |
void | RegisterFaces (int elem, int *fattr=NULL) |
void | DeleteUnusedFaces (const Array< int > &elemFaces) |
int | FindAltParents (int node1, int node2) |
bool | NodeSetX1 (int node, int *n) |
bool | NodeSetX2 (int node, int *n) |
bool | NodeSetY1 (int node, int *n) |
bool | NodeSetY2 (int node, int *n) |
bool | NodeSetZ1 (int node, int *n) |
bool | NodeSetZ2 (int node, int *n) |
void | CollectDerefinements (int elem, Array< Connection > &list) |
int | ReorderFacePointMat (int v0, int v1, int v2, int v3, int elem, DenseMatrix &mat) const |
void | TraverseFace (int vn0, int vn1, int vn2, int vn3, const PointMatrix &pm, int level) |
void | TraverseEdge (int vn0, int vn1, double t0, double t1, int flags, int level) |
void | FindSetNeighbors (const Array< char > &elem_set, Array< int > *neighbors, Array< char > *neighbor_set=NULL) |
void | FindNeighbors (int elem, Array< int > &neighbors, const Array< int > *search_set=NULL) |
void | NeighborExpand (const Array< int > &elems, Array< int > &expanded, const Array< int > *search_set=NULL) |
void | CollectEdgeVertices (int v0, int v1, Array< int > &indices) |
void | CollectFaceVertices (int v0, int v1, int v2, int v3, Array< int > &indices) |
void | BuildElementToVertexTable () |
void | UpdateElementToVertexTable () |
void | GetPointMatrix (int geom, const char *ref_path, DenseMatrix &matrix) |
void | TraverseRefinements (int elem, int coarse_index, std::string &ref_path, RefPathMap &map) |
void | InitDerefTransforms () |
void | SetDerefMatrixCodes (int parent, Array< int > &fine_coarse) |
const double * | CalcVertexPos (int node) const |
int | GetEdgeMaster (int node) const |
void | FindFaceNodes (int face, int node[4]) |
int | EdgeSplitLevel (int vn1, int vn2) const |
void | FaceSplitLevel (int vn1, int vn2, int vn3, int vn4, int &h_level, int &v_level) const |
void | CountSplits (int elem, int splits[3]) const |
void | GetLimitRefinements (Array< Refinement > &refinements, int max_level) |
int | PrintElements (std::ostream &out, int elem, int &coarse_id) const |
void | CopyElements (int elem, const BlockArray< Element > &tmp_elements, Array< int > &index_map) |
Static Protected Member Functions | |
static int | get_face_orientation (Face &face, Element &e1, Element &e2, int local[2]=NULL) |
static bool | compare_ranks_indices (const Element *a, const Element *b) |
Static Protected Member Functions inherited from mfem::NCMesh | |
static int | find_node (const Element &el, int node) |
static int | find_element_edge (const Element &el, int vn0, int vn1) |
static int | find_hex_face (int a, int b, int c) |
static const PointMatrix & | GetGeomIdentity (int geom) |
Friends | |
class | ParMesh |
class | NeighborRowMessage |
Additional Inherited Members | |
Static Protected Attributes inherited from mfem::NCMesh | |
static PointMatrix | pm_tri_identity |
static PointMatrix | pm_quad_identity |
static PointMatrix | pm_hex_identity |
static GeomInfo | GI [Geometry::NumGeom] |
static GeomInfo & | gi_hex = NCMesh::GI[Geometry::CUBE] |
static GeomInfo & | gi_quad = NCMesh::GI[Geometry::SQUARE] |
static GeomInfo & | gi_tri = NCMesh::GI[Geometry::TRIANGLE] |
A parallel extension of the NCMesh class.
The basic idea (and assumption) is that all processors share the coarsest layer ("root elements"). This has the advantage that refinements can easily be exchanged between processors when rebalancing since individual elements can be uniquely identified by the index of the root element and a path in the refinement tree.
Each leaf element is owned by one of the processors (NCMesh::Element::rank). The underlying NCMesh stores not only elements for the current ('MyRank') processor, but also a minimal layer of adjacent "ghost" elements owned by other processors. The ghost layer is synchronized after refinement.
The ghost layer contains all vertex-, edge- and face-neighbors of the current processor's region. It is used to determine constraining relations and ownership of DOFs on the processor boundary. Ghost elements are never seen by the rest of MFEM as they are skipped when a Mesh is created from the NCMesh.
The processor that owns a vertex, edge or a face (and in turn its DOFs) is currently defined to be the one with the lowest rank in the group of processors that share the entity.
Vertices, edges and faces that are not owned by this ('MyRank') processor are ghosts, and are numbered after all real vertices/edges/faces, i.e., they have indices greater than NVertices, NEdges, NFaces, respectively.
A shared vertex/edge/face is identified in an interprocessor message by a pair of numbers. The first number specifies an element in an ElementSet (typically sent at the beginning of the message) that contains the v/e/f. The second number is the local index of the v/e/f in that element.
Definition at line 61 of file pncmesh.hpp.
typedef std::vector<int> mfem::ParNCMesh::CommGroup |
Definition at line 150 of file pncmesh.hpp.
typedef short mfem::ParNCMesh::GroupId |
Definition at line 149 of file pncmesh.hpp.
|
protected |
Definition at line 264 of file pncmesh.hpp.
|
protected |
Definition at line 265 of file pncmesh.hpp.
mfem::ParNCMesh::ParNCMesh | ( | MPI_Comm | comm, |
const NCMesh & | ncmesh | ||
) |
Definition at line 28 of file pncmesh.cpp.
|
virtual |
Definition at line 49 of file pncmesh.cpp.
|
protected |
Definition at line 434 of file pncmesh.cpp.
|
protected |
Adjust some of the MeshIds before encoding for recipient 'rank', so that they only reference elements that exist in the recipient's ref. tree.
Definition at line 2013 of file pncmesh.cpp.
|
protectedvirtual |
Reimplemented from mfem::NCMesh.
Definition at line 76 of file pncmesh.cpp.
void mfem::ParNCMesh::AugmentMasterGroups | ( | ) |
Make sure comm groups of master edges and faces contain all ranks necessary to communicate master DOFs correctly.
Definition at line 513 of file pncmesh.cpp.
|
protectedvirtual |
Reimplemented from mfem::NCMesh.
Definition at line 255 of file pncmesh.cpp.
|
protectedvirtual |
Reimplemented from mfem::NCMesh.
Definition at line 215 of file pncmesh.cpp.
|
protected |
|
protectedvirtual |
Reimplemented from mfem::NCMesh.
Definition at line 291 of file pncmesh.cpp.
|
protected |
Definition at line 643 of file pncmesh.cpp.
|
protected |
Definition at line 2114 of file pncmesh.cpp.
|
protected |
Definition at line 2140 of file pncmesh.cpp.
|
protected |
Definition at line 2096 of file pncmesh.cpp.
|
virtual |
Parallel version of NCMesh::CheckDerefinementNCLevel.
Reimplemented from mfem::NCMesh.
Definition at line 1484 of file pncmesh.cpp.
|
protected |
Definition at line 732 of file pncmesh.cpp.
|
protected |
Definition at line 1059 of file pncmesh.cpp.
|
staticprotected |
Definition at line 793 of file pncmesh.cpp.
Definition at line 2294 of file pncmesh.cpp.
Definition at line 2195 of file pncmesh.cpp.
|
virtual |
Parallel reimplementation of NCMesh::Derefine, keeps ghost layers in sync. The interface is identical.
Reimplemented from mfem::NCMesh.
Definition at line 1232 of file pncmesh.cpp.
|
protected |
Return a list of processors that own elements in the immediate neighborhood of 'elem' (i.e., vertex, edge and face neighbors), and are not 'MyRank'.
Definition at line 749 of file pncmesh.cpp.
|
inline |
Returns owner processor for element 'index'. This is normally MyRank but for index >= NElements (i.e., for ghosts) it may be something else.
Definition at line 200 of file pncmesh.hpp.
|
protectedvirtual |
Reimplemented from mfem::NCMesh.
Definition at line 240 of file pncmesh.cpp.
|
protectedvirtual |
Reimplemented from mfem::NCMesh.
Definition at line 202 of file pncmesh.cpp.
|
protectedvirtual |
Reimplemented from mfem::NCMesh.
Definition at line 278 of file pncmesh.cpp.
Definition at line 2252 of file pncmesh.cpp.
Definition at line 2152 of file pncmesh.cpp.
|
staticprotected |
Definition at line 617 of file pncmesh.cpp.
|
virtual |
Extension of NCMesh::GetBoundaryClosure. Filters out ghost vertices and ghost edges from 'bdr_vertices' and 'bdr_edges'.
Reimplemented from mfem::NCMesh.
Definition at line 669 of file pncmesh.cpp.
void mfem::ParNCMesh::GetDebugMesh | ( | Mesh & | debug_mesh | ) | const |
Extract a debugging Mesh containing all leaf elements, including ghosts. The debug mesh will have element attributes set to element rank + 1.
Definition at line 2458 of file pncmesh.cpp.
|
inline |
Get previous (pre-Derefine) fine element ranks. This complements the CoarseFineTransformations::embeddings array in parallel.
Definition at line 230 of file pncmesh.hpp.
void mfem::ParNCMesh::GetFaceNeighbors | ( | class ParMesh & | pmesh | ) |
Populate face neighbor members of ParMesh from the ghost layer, without communication.
Definition at line 799 of file pncmesh.cpp.
|
inline |
Return (shared) face orientation relative to its owner element.
Definition at line 144 of file pncmesh.hpp.
Return a list of ranks contained in the group of the given ID.
Definition at line 175 of file pncmesh.hpp.
|
inline |
Return the communication group ID for a vertex/edge/face.
Definition at line 164 of file pncmesh.hpp.
|
protected |
Definition at line 336 of file pncmesh.cpp.
|
protected |
Definition at line 562 of file pncmesh.cpp.
|
inline |
Definition at line 215 of file pncmesh.hpp.
|
inline |
Definition at line 91 of file pncmesh.hpp.
|
inline |
Definition at line 94 of file pncmesh.hpp.
|
inline |
Definition at line 96 of file pncmesh.hpp.
|
inline |
Definition at line 95 of file pncmesh.hpp.
|
inline |
Definition at line 93 of file pncmesh.hpp.
|
inlineprotectedvirtual |
Reimplemented from mfem::NCMesh.
Definition at line 299 of file pncmesh.hpp.
|
inlineprotectedvirtual |
Reimplemented from mfem::NCMesh.
Definition at line 300 of file pncmesh.hpp.
|
inline |
Return vertex/edge/face ('entity' == 0/1/2, resp.) owner.
Definition at line 153 of file pncmesh.hpp.
|
inline |
Get previous indices (pre-Rebalance) of current elements. Index of -1 indicates that an element didn't exist in the mesh before.
Definition at line 226 of file pncmesh.hpp.
|
inline |
Return a list of edges shared by this processor and at least one other processor. (NOTE: this is a subset of the NCMesh::edge_list; slaves are empty.)
Definition at line 112 of file pncmesh.hpp.
|
inline |
Return a list of faces shared by this processor and another processor. (NOTE: this is a subset of NCMesh::face_list; slaves are empty.)
Definition at line 123 of file pncmesh.hpp.
|
inline |
Helper to get shared vertices/edges/faces ('entity' == 0/1/2 resp.).
Definition at line 133 of file pncmesh.hpp.
|
inline |
Return a list of vertices shared by this processor and at least one other processor. (NOTE: only NCList::conforming will be set.)
Definition at line 100 of file pncmesh.hpp.
|
protected |
Definition at line 369 of file pncmesh.cpp.
bool mfem::ParNCMesh::GroupContains | ( | GroupId | id, |
int | rank | ||
) | const |
Return true if group 'id' contains the given rank.
Definition at line 378 of file pncmesh.cpp.
|
protected |
Definition at line 2509 of file pncmesh.cpp.
Definition at line 398 of file pncmesh.cpp.
|
inlineprotected |
Helper to get the partitioning when the serial mesh gets split initially.
Definition at line 307 of file pncmesh.hpp.
Definition at line 389 of file pncmesh.cpp.
|
inline |
Return true if the specified vertex/edge/face is a ghost.
Definition at line 188 of file pncmesh.hpp.
|
inlineprotectedvirtual |
Reimplemented from mfem::NCMesh.
Definition at line 296 of file pncmesh.hpp.
|
protected |
Definition at line 352 of file pncmesh.cpp.
|
virtual |
Parallel version of NCMesh::LimitNCLevel.
Reimplemented from mfem::NCMesh.
Definition at line 1214 of file pncmesh.cpp.
|
protected |
Definition at line 586 of file pncmesh.cpp.
long mfem::ParNCMesh::MemoryUsage | ( | bool | with_base = true | ) | const |
Return total number of bytes allocated.
Definition at line 2521 of file pncmesh.cpp.
|
protected |
Get a list of ranks that own elements in the neighborhood of our region. NOTE: MyRank is not included.
Definition at line 781 of file pncmesh.cpp.
|
protectedvirtual |
Get edge and face numbering from 'mesh' (i.e., set all Edge::index and Face::index) after a new mesh was created from us.
Reimplemented from mfem::NCMesh.
Definition at line 156 of file pncmesh.cpp.
|
inlineprotected |
Return the processor number for a global element number.
Definition at line 303 of file pncmesh.hpp.
|
inlineprotected |
Return the global index of the first element owned by processor 'rank'.
Definition at line 311 of file pncmesh.hpp.
int mfem::ParNCMesh::PrintMemoryDetail | ( | bool | with_base = true | ) | const |
Definition at line 2548 of file pncmesh.cpp.
|
protected |
Traverse the (local) refinement tree and determine which subtrees are no longer needed, i.e., their leaves are not owned by us nor are they our ghosts. These subtrees are then derefined.
Definition at line 1108 of file pncmesh.cpp.
|
protected |
Internal. Recursive part of Prune().
Definition at line 1071 of file pncmesh.cpp.
void mfem::ParNCMesh::Rebalance | ( | ) |
Migrate leaf elements of the global refinement hierarchy (including ghost elements) so that each processor owns the same number of leaves (+-1).
Definition at line 1542 of file pncmesh.cpp.
Receive element DOFs sent by SendRebalanceDofs().
Definition at line 1821 of file pncmesh.cpp.
|
protected |
Assign new Element::rank to leaf elements and send them to their new owners, keeping the ghost layer up to date. Used by Rebalance() and Derefine().
Definition at line 1600 of file pncmesh.cpp.
|
virtual |
An override of NCMesh::Refine, which is called eventually, after making sure that refinements that occur on the processor boundary are sent to the neighbor processors so they can keep their ghost layers up to date.
Reimplemented from mfem::NCMesh.
Definition at line 1142 of file pncmesh.cpp.
void mfem::ParNCMesh::SendRebalanceDofs | ( | int | old_ndofs, |
const Table & | old_element_dofs, | ||
long | old_global_offset, | ||
FiniteElementSpace * | space | ||
) |
Use the communication pattern from last Rebalance() to send element DOFs.
Definition at line 1788 of file pncmesh.cpp.
template void mfem::ParNCMesh::SynchronizeDerefinementData< double > | ( | Array< Type > & | elem_data, |
const Table & | deref_table | ||
) |
Exchange element data for derefinements that straddle processor boundaries. 'elem_data' is enlarged and filled with ghost values.
Definition at line 1404 of file pncmesh.cpp.
|
virtual |
Save memory by releasing all non-essential and cached data.
Reimplemented from mfem::NCMesh.
Definition at line 2475 of file pncmesh.cpp.
|
protectedvirtual |
Apart from the primary data structure, which is the element/node/face hierarchy, there is secondary data that is derived from the primary data and needs to be updated when the primary data changes. Update() takes care of that and needs to be called after refinement and derefinement.
Reimplemented from mfem::NCMesh.
Definition at line 54 of file pncmesh.cpp.
|
protected |
Definition at line 694 of file pncmesh.cpp.
|
protectedvirtual |
update Vertex::index and vertex_nodeId
Reimplemented from mfem::NCMesh.
Definition at line 110 of file pncmesh.cpp.
|
friend |
Definition at line 541 of file pncmesh.hpp.
|
friend |
Definition at line 540 of file pncmesh.hpp.
|
protected |
Stores modified point matrices created by GetFaceNeighbors.
Definition at line 533 of file pncmesh.hpp.
|
protected |
list of type 3 elements
Definition at line 292 of file pncmesh.hpp.
Definition at line 271 of file pncmesh.hpp.
Definition at line 272 of file pncmesh.hpp.
|
protected |
Type of each leaf element: 1 - our element (rank == MyRank), 3 - our element, and neighbor to the ghost layer, 2 - ghost layer element (existing element, but rank != MyRank), 0 - element beyond the ghost layer, may not be a real element. Note: indexed by Element::index. See also UpdateLayers().
Definition at line 289 of file pncmesh.hpp.
Definition at line 271 of file pncmesh.hpp.
|
protected |
Definition at line 279 of file pncmesh.hpp.
Definition at line 272 of file pncmesh.hpp.
|
protected |
list of elements whose 'element_type' == 2.
Definition at line 291 of file pncmesh.hpp.
|
protected |
Definition at line 268 of file pncmesh.hpp.
|
protected |
Definition at line 267 of file pncmesh.hpp.
|
protected |
Definition at line 281 of file pncmesh.hpp.
|
protected |
Definition at line 342 of file pncmesh.hpp.
|
protected |
Definition at line 258 of file pncmesh.hpp.
|
protected |
Definition at line 259 of file pncmesh.hpp.
|
protected |
Definition at line 262 of file pncmesh.hpp.
|
protected |
Definition at line 261 of file pncmesh.hpp.
|
protected |
Definition at line 262 of file pncmesh.hpp.
|
protected |
Definition at line 261 of file pncmesh.hpp.
|
protected |
Definition at line 261 of file pncmesh.hpp.
|
protected |
Definition at line 259 of file pncmesh.hpp.
|
protected |
After Rebalance, this array holds the old element indices, or -1 if an element didn't exist in the mesh previously. After Derefine, it holds the ranks of the old (potentially non-existent) fine elements.
Definition at line 530 of file pncmesh.hpp.
|
protected |
Definition at line 525 of file pncmesh.hpp.
|
protected |
Recorded communication pattern from last Rebalance. Used by Send/RecvRebalanceDofs to ship element DOFs.
Definition at line 524 of file pncmesh.hpp.
|
protected |
Definition at line 276 of file pncmesh.hpp.
|
protected |
Definition at line 277 of file pncmesh.hpp.
|
protected |
Definition at line 275 of file pncmesh.hpp.
|
protected |
Definition at line 404 of file pncmesh.hpp.
|
protected |
Definition at line 341 of file pncmesh.hpp.
Definition at line 271 of file pncmesh.hpp.
Definition at line 272 of file pncmesh.hpp.