![]() |
MFEM
v4.6.0
Finite element discretization library
|
Class for parallel meshes. More...
#include <pmesh.hpp>
Classes | |
struct | Vert3 |
struct | Vert4 |
Public Member Functions | |
ParMesh () | |
Default constructor. Create an empty ParMesh. More... | |
ParMesh (MPI_Comm comm, Mesh &mesh, int *partitioning_=NULL, int part_method=1) | |
Create a parallel mesh by partitioning a serial Mesh. More... | |
ParMesh (const ParMesh &pmesh, bool copy_nodes=true) | |
ParMesh (MPI_Comm comm, std::istream &input, bool refine=true) | |
Read a parallel mesh, each MPI rank from its own file/stream. More... | |
MFEM_DEPRECATED | ParMesh (ParMesh *orig_mesh, int ref_factor, int ref_type) |
Deprecated: see ParMesh::MakeRefined. More... | |
ParMesh (ParMesh &&mesh) | |
Move constructor. Used for named constructors. More... | |
ParMesh & | operator= (ParMesh &&mesh) |
Move assignment operator. More... | |
ParMesh & | operator= (const ParMesh &mesh)=delete |
Explicitly delete the copy assignment operator. More... | |
void | Finalize (bool refine=false, bool fix_orientation=false) override |
Finalize the construction of a general Mesh. More... | |
void | SetAttributes () override |
Determine the sets of unique attribute values in domain and boundary elements. More... | |
bool | HasBoundaryElements () const override |
Checks if any rank in the mesh has boundary elements. More... | |
MPI_Comm | GetComm () const |
int | GetNRanks () const |
int | GetMyRank () const |
int | GetLocalElementNum (long long global_element_num) const |
long long | GetGlobalElementNum (int local_element_num) const |
Map a local element number to a global element number. More... | |
void | GetGlobalVertexIndices (Array< HYPRE_BigInt > &gi) const |
AMR meshes are not supported. More... | |
void | GetGlobalEdgeIndices (Array< HYPRE_BigInt > &gi) const |
AMR meshes are not supported. More... | |
void | GetGlobalFaceIndices (Array< HYPRE_BigInt > &gi) const |
AMR meshes are not supported. More... | |
void | GetGlobalElementIndices (Array< HYPRE_BigInt > &gi) const |
AMR meshes are supported. More... | |
int | GetNGroups () const |
void | GetSharedEdgeCommunicator (GroupCommunicator &sedge_comm) const |
Get the shared edges GroupCommunicator. More... | |
void | GetSharedVertexCommunicator (GroupCommunicator &svert_comm) const |
Get the shared vertices GroupCommunicator. More... | |
void | GetSharedQuadCommunicator (GroupCommunicator &squad_comm) const |
Get the shared face quadrilaterals GroupCommunicator. More... | |
void | GetSharedTriCommunicator (GroupCommunicator &stria_comm) const |
Get the shared face triangles GroupCommunicator. More... | |
void | GenerateOffsets (int N, HYPRE_BigInt loc_sizes[], Array< HYPRE_BigInt > *offsets[]) const |
void | ExchangeFaceNbrData () |
void | ExchangeFaceNbrNodes () |
void | SetCurvature (int order, bool discont=false, int space_dim=-1, int ordering=1) override |
Set the curvature of the mesh nodes using the given polynomial degree. More... | |
void | SetNodalFESpace (FiniteElementSpace *nfes) override |
void | SetNodalFESpace (ParFiniteElementSpace *npfes) |
int | GetNFaceNeighbors () const |
int | GetNFaceNeighborElements () const |
int | GetFaceNbrGroup (int fn) const |
int | GetFaceNbrRank (int fn) const |
void | GetFaceNbrElementFaces (int i, Array< int > &fcs, Array< int > &cor) const |
Table * | GetFaceToAllElementTable () const |
FaceElementTransformations * | GetFaceElementTransformations (int FaceNo, int mask=31) override |
FaceElementTransformations * | GetSharedFaceTransformations (int sf, bool fill2=true) |
FaceElementTransformations * | GetSharedFaceTransformationsByLocalIndex (int FaceNo, bool fill2=true) |
ElementTransformation * | GetFaceNbrElementTransformation (int i) |
double | GetFaceNbrElementSize (int i, int type=0) |
int | GetNSharedFaces () const |
Return the number of shared faces (3D), edges (2D), vertices (1D) More... | |
int | GetSharedFace (int sface) const |
Return the local face index for the given shared face. More... | |
int | GetNFbyType (FaceType type) const override |
Returns the number of local faces according to the requested type, does not count master non-conforming faces. More... | |
MFEM_DEPRECATED void | ReorientTetMesh () override |
See the remarks for the serial version in mesh.hpp. More... | |
long long | ReduceInt (int value) const override |
Utility function: sum integers from all processors (Allreduce). More... | |
void | Rebalance () |
void | Rebalance (const Array< int > &partition) |
void | ParPrint (std::ostream &out) const |
Save the mesh in a parallel mesh format. More... | |
void | SetPrintShared (bool print) |
void | Print (std::ostream &out=mfem::out) const override |
void | Save (const std::string &fname, int precision=16) const override |
void | Print (adios2stream &out) const override |
void | PrintXG (std::ostream &out=mfem::out) const override |
void | PrintAsOne (std::ostream &out=mfem::out) const |
void | PrintAsSerial (std::ostream &out=mfem::out) const |
Mesh | GetSerialMesh (int save_rank) const |
void | SaveAsOne (const std::string &fname, int precision=16) const |
void | PrintAsOneXG (std::ostream &out=mfem::out) |
Old mesh format (Netgen/Truegrid) version of 'PrintAsOne'. More... | |
void | PrintVTU (std::string pathname, VTKFormat format=VTKFormat::ASCII, bool high_order_output=false, int compression_level=0, bool bdr=false) override |
void | Load (std::istream &input, int generate_edges=0, int refine=1, bool fix_orientation=true) override |
Parallel version of Mesh::Load(). More... | |
void | GetBoundingBox (Vector &p_min, Vector &p_max, int ref=2) |
void | GetCharacteristics (double &h_min, double &h_max, double &kappa_min, double &kappa_max) |
void | Swap (ParMesh &other) |
void | PrintInfo (std::ostream &out=mfem::out) override |
Print various parallel mesh stats. More... | |
int | FindPoints (DenseMatrix &point_mat, Array< int > &elem_ids, Array< IntegrationPoint > &ips, bool warn=true, InverseElementTransformation *inv_trans=NULL) override |
Find the ids of the elements that contain the given points, and their corresponding reference coordinates. More... | |
void | PrintSharedEntities (const std::string &fname_prefix) const |
Debugging method. More... | |
virtual | ~ParMesh () |
These methods require group > 0 | |
int | GroupNVertices (int group) const |
int | GroupNEdges (int group) const |
int | GroupNTriangles (int group) const |
int | GroupNQuadrilaterals (int group) const |
int | GroupVertex (int group, int i) const |
void | GroupEdge (int group, int i, int &edge, int &o) const |
void | GroupTriangle (int group, int i, int &face, int &o) const |
void | GroupQuadrilateral (int group, int i, int &face, int &o) const |
![]() | |
Mesh () | |
Mesh (const Mesh &mesh, bool copy_nodes=true) | |
Mesh (Mesh &&mesh) | |
Move constructor, useful for using a Mesh as a function return value. More... | |
Mesh & | operator= (Mesh &&mesh) |
Move assignment operator. More... | |
Mesh & | operator= (const Mesh &mesh)=delete |
Explicitly delete the copy assignment operator. More... | |
Mesh (double *vertices, int num_vertices, int *element_indices, Geometry::Type element_type, int *element_attributes, int num_elements, int *boundary_indices, Geometry::Type boundary_type, int *boundary_attributes, int num_boundary_elements, int dimension, int space_dimension=-1) | |
Construct a Mesh from the given primary data. More... | |
Mesh (int Dim_, int NVert, int NElem, int NBdrElem=0, int spaceDim_=-1) | |
Init constructor: begin the construction of a Mesh object. More... | |
Mesh (const std::string &filename, int generate_edges=0, int refine=1, bool fix_orientation=true) | |
Mesh (std::istream &input, int generate_edges=0, int refine=1, bool fix_orientation=true) | |
Mesh (Mesh *mesh_array[], int num_pieces) | |
void | Swap (Mesh &other, bool non_geometry) |
void | Clear () |
Clear the contents of the Mesh. More... | |
virtual | ~Mesh () |
Destroys Mesh. More... | |
Element * | NewElement (int geom) |
int | AddVertex (double x, double y=0.0, double z=0.0) |
int | AddVertex (const double *coords) |
int | AddVertex (const Vector &coords) |
void | AddVertexParents (int i, int p1, int p2) |
Mark vertex i as nonconforming, with parent vertices p1 and p2. More... | |
int | AddSegment (int v1, int v2, int attr=1) |
int | AddSegment (const int *vi, int attr=1) |
int | AddTriangle (int v1, int v2, int v3, int attr=1) |
int | AddTriangle (const int *vi, int attr=1) |
int | AddTri (const int *vi, int attr=1) |
int | AddQuad (int v1, int v2, int v3, int v4, int attr=1) |
int | AddQuad (const int *vi, int attr=1) |
int | AddTet (int v1, int v2, int v3, int v4, int attr=1) |
int | AddTet (const int *vi, int attr=1) |
int | AddWedge (int v1, int v2, int v3, int v4, int v5, int v6, int attr=1) |
int | AddWedge (const int *vi, int attr=1) |
int | AddPyramid (int v1, int v2, int v3, int v4, int v5, int attr=1) |
int | AddPyramid (const int *vi, int attr=1) |
int | AddHex (int v1, int v2, int v3, int v4, int v5, int v6, int v7, int v8, int attr=1) |
int | AddHex (const int *vi, int attr=1) |
void | AddHexAsTets (const int *vi, int attr=1) |
void | AddHexAsWedges (const int *vi, int attr=1) |
void | AddHexAsPyramids (const int *vi, int attr=1) |
int | AddElement (Element *elem) |
int | AddBdrElement (Element *elem) |
int | AddBdrSegment (int v1, int v2, int attr=1) |
int | AddBdrSegment (const int *vi, int attr=1) |
int | AddBdrTriangle (int v1, int v2, int v3, int attr=1) |
int | AddBdrTriangle (const int *vi, int attr=1) |
int | AddBdrQuad (int v1, int v2, int v3, int v4, int attr=1) |
int | AddBdrQuad (const int *vi, int attr=1) |
void | AddBdrQuadAsTriangles (const int *vi, int attr=1) |
int | AddBdrPoint (int v, int attr=1) |
void | GenerateBoundaryElements () |
void | FinalizeTriMesh (int generate_edges=0, int refine=0, bool fix_orientation=true) |
Finalize the construction of a triangular Mesh. More... | |
void | FinalizeQuadMesh (int generate_edges=0, int refine=0, bool fix_orientation=true) |
Finalize the construction of a quadrilateral Mesh. More... | |
void | FinalizeTetMesh (int generate_edges=0, int refine=0, bool fix_orientation=true) |
Finalize the construction of a tetrahedral Mesh. More... | |
void | FinalizeWedgeMesh (int generate_edges=0, int refine=0, bool fix_orientation=true) |
Finalize the construction of a wedge Mesh. More... | |
void | FinalizeHexMesh (int generate_edges=0, int refine=0, bool fix_orientation=true) |
Finalize the construction of a hexahedral Mesh. More... | |
void | FinalizeMesh (int refine=0, bool fix_orientation=true) |
Finalize the construction of any type of Mesh. More... | |
void | FinalizeTopology (bool generate_bdr=true) |
Finalize the construction of the secondary topology (connectivity) data of a Mesh. More... | |
int | CheckElementOrientation (bool fix_it=true) |
Check (and optionally attempt to fix) the orientation of the elements. More... | |
int | CheckBdrElementOrientation (bool fix_it=true) |
Check the orientation of the boundary elements. More... | |
void | RemoveUnusedVertices () |
Remove unused vertices and rebuild mesh connectivity. More... | |
void | RemoveInternalBoundaries () |
double | GetGeckoElementOrdering (Array< int > &ordering, int iterations=4, int window=4, int period=2, int seed=0, bool verbose=false, double time_limit=0) |
void | GetHilbertElementOrdering (Array< int > &ordering) |
void | ReorderElements (const Array< int > &ordering, bool reorder_vertices=true) |
MFEM_DEPRECATED | Mesh (int nx, int ny, int nz, Element::Type type, bool generate_edges=false, double sx=1.0, double sy=1.0, double sz=1.0, bool sfc_ordering=true) |
Deprecated: see MakeCartesian3D. More... | |
MFEM_DEPRECATED | Mesh (int nx, int ny, Element::Type type, bool generate_edges=false, double sx=1.0, double sy=1.0, bool sfc_ordering=true) |
Deprecated: see MakeCartesian2D. More... | |
MFEM_DEPRECATED | Mesh (int n, double sx=1.0) |
Deprecated: see MakeCartesian1D. More... | |
MFEM_DEPRECATED | Mesh (Mesh *orig_mesh, int ref_factor, int ref_type) |
Deprecated: see MakeRefined. More... | |
int | Dimension () const |
Dimension of the reference space used within the elements. More... | |
int | SpaceDimension () const |
Dimension of the physical space containing the mesh. More... | |
int | EulerNumber () const |
Equals 1 + num_holes - num_loops. More... | |
int | EulerNumber2D () const |
Equals 1 - num_holes. More... | |
int | MeshGenerator () |
Get the mesh generator/type. More... | |
bool | HasGeometry (Geometry::Type geom) const |
Return true iff the given geom is encountered in the mesh. Geometries of dimensions lower than Dimension() are counted as well. More... | |
int | GetNumGeometries (int dim) const |
Return the number of geometries of the given dimension present in the mesh. More... | |
void | GetGeometries (int dim, Array< Geometry::Type > &el_geoms) const |
Return all element geometries of the given dimension present in the mesh. More... | |
void | GetBoundingBox (Vector &min, Vector &max, int ref=2) |
Returns the minimum and maximum corners of the mesh bounding box. More... | |
void | GetCharacteristics (double &h_min, double &h_max, double &kappa_min, double &kappa_max, Vector *Vh=NULL, Vector *Vk=NULL) |
int | GetNV () const |
Returns number of vertices. Vertices are only at the corners of elements, where you would expect them in the lowest-order mesh. More... | |
int | GetNE () const |
Returns number of elements. More... | |
int | GetNBE () const |
Returns number of boundary elements. More... | |
int | GetNEdges () const |
Return the number of edges. More... | |
int | GetNFaces () const |
Return the number of faces in a 3D mesh. More... | |
int | GetNumFaces () const |
Return the number of faces (3D), edges (2D) or vertices (1D). More... | |
int | GetNumFacesWithGhost () const |
Return the number of faces (3D), edges (2D) or vertices (1D) including ghost faces. More... | |
long long | GetGlobalNE () const |
Return the total (global) number of elements. More... | |
const double * | GetVertex (int i) const |
Return pointer to vertex i's coordinates. More... | |
double * | GetVertex (int i) |
Return pointer to vertex i's coordinates. More... | |
const Element * | GetElement (int i) const |
Return pointer to the i'th element object. More... | |
Element * | GetElement (int i) |
Return pointer to the i'th element object. More... | |
const Element * | GetBdrElement (int i) const |
Return pointer to the i'th boundary element object. More... | |
Element * | GetBdrElement (int i) |
Return pointer to the i'th boundary element object. More... | |
const Element * | GetFace (int i) const |
const Element *const * | GetElementsArray () const |
void | GetElementData (int geom, Array< int > &elem_vtx, Array< int > &attr) const |
void | GetBdrElementData (int geom, Array< int > &bdr_elem_vtx, Array< int > &bdr_attr) const |
int | GetAttribute (int i) const |
Return the attribute of element i. More... | |
void | SetAttribute (int i, int attr) |
Set the attribute of element i. More... | |
int | GetBdrAttribute (int i) const |
Return the attribute of boundary element i. More... | |
void | SetBdrAttribute (int i, int attr) |
Set the attribute of boundary element i. More... | |
int | GetPatchAttribute (int i) const |
Return the attribute of patch i, for a NURBS mesh. More... | |
void | SetPatchAttribute (int i, int attr) |
Set the attribute of patch i, for a NURBS mesh. More... | |
int | GetPatchBdrAttribute (int i) const |
Return the attribute of patch boundary element i, for a NURBS mesh. More... | |
void | SetPatchBdrAttribute (int i, int attr) |
Set the attribute of patch boundary element i, for a NURBS mesh. More... | |
Element::Type | GetElementType (int i) const |
Returns the type of element i. More... | |
Element::Type | GetBdrElementType (int i) const |
Returns the type of boundary element i. More... | |
MFEM_DEPRECATED Geometry::Type | GetFaceGeometryType (int Face) const |
Deprecated in favor of Mesh::GetFaceGeometry. More... | |
Element::Type | GetFaceElementType (int Face) const |
Geometry::Type | GetFaceGeometry (int i) const |
Return the Geometry::Type associated with face i. More... | |
Geometry::Type | GetElementGeometry (int i) const |
Geometry::Type | GetBdrElementGeometry (int i) const |
MFEM_DEPRECATED Geometry::Type | GetFaceBaseGeometry (int i) const |
Deprecated in favor of Mesh::GetFaceGeometry. More... | |
Geometry::Type | GetElementBaseGeometry (int i) const |
Geometry::Type | GetBdrElementBaseGeometry (int i) const |
bool | FaceIsInterior (int FaceNo) const |
Return true if the given face is interior. More... | |
double | GetElementSize (int i, int type=0) |
Get the size of the i-th element relative to the perfect reference element. More... | |
double | GetElementSize (int i, const Vector &dir) |
double | GetElementVolume (int i) |
void | GetElementCenter (int i, Vector ¢er) |
void | GetElementJacobian (int i, DenseMatrix &J, const IntegrationPoint *ip=NULL) |
void | GetElementVertices (int i, Array< int > &v) const |
Returns the indices of the vertices of element i. More... | |
void | GetBdrElementVertices (int i, Array< int > &v) const |
Returns the indices of the vertices of boundary element i. More... | |
void | GetElementEdges (int i, Array< int > &edges, Array< int > &cor) const |
Return the indices and the orientations of all edges of element i. More... | |
void | GetBdrElementEdges (int i, Array< int > &edges, Array< int > &cor) const |
Return the indices and the orientations of all edges of bdr element i. More... | |
void | GetFaceEdges (int i, Array< int > &edges, Array< int > &o) const |
void | GetFaceVertices (int i, Array< int > &vert) const |
Returns the indices of the vertices of face i. More... | |
void | GetEdgeVertices (int i, Array< int > &vert) const |
Returns the indices of the vertices of edge i. More... | |
void | GetElementFaces (int i, Array< int > &faces, Array< int > &ori) const |
Return the indices and the orientations of all faces of element i. More... | |
Array< int > | FindFaceNeighbors (const int elem) const |
Returns the sorted, unique indices of elements sharing a face with element elem, including elem. More... | |
void | GetBdrElementFace (int i, int *f, int *o) const |
Return the index and the orientation of the face of bdr element i. (3D) More... | |
int | GetBdrElementEdgeIndex (int i) const |
void | GetBdrElementAdjacentElement (int bdr_el, int &el, int &info) const |
For the given boundary element, bdr_el, return its adjacent element and its info, i.e. 64*local_bdr_index+bdr_orientation. More... | |
void | GetBdrElementAdjacentElement2 (int bdr_el, int &el, int &info) const |
For the given boundary element, bdr_el, return its adjacent element and its info, i.e. 64*local_bdr_index+inverse_bdr_orientation. More... | |
int | GetBdrFace (int BdrElemNo) const |
Return the local face index for the given boundary face. More... | |
Table * | GetVertexToElementTable () |
The returned Table should be deleted by the caller. More... | |
Table * | GetFaceToElementTable () const |
Table * | GetFaceEdgeTable () const |
Table * | GetEdgeVertexTable () const |
void | GetVertexToVertexTable (DSTable &) const |
const Table & | ElementToElementTable () |
const Table & | ElementToFaceTable () const |
const Table & | ElementToEdgeTable () const |
Array< int > | GetFaceToBdrElMap () const |
void | GetElementTransformation (int i, IsoparametricTransformation *ElTr) |
ElementTransformation * | GetElementTransformation (int i) |
void | GetElementTransformation (int i, const Vector &nodes, IsoparametricTransformation *ElTr) |
ElementTransformation * | GetBdrElementTransformation (int i) |
void | GetBdrElementTransformation (int i, IsoparametricTransformation *ElTr) |
void | GetFaceTransformation (int i, IsoparametricTransformation *FTr) |
void | GetLocalFaceTransformation (int face_type, int elem_type, IsoparametricTransformation &Transf, int info) |
A helper method that constructs a transformation from the reference space of a face to the reference space of an element. More... | |
ElementTransformation * | GetFaceTransformation (int FaceNo) |
void | GetEdgeTransformation (int i, IsoparametricTransformation *EdTr) |
ElementTransformation * | GetEdgeTransformation (int EdgeNo) |
FaceElementTransformations * | GetInteriorFaceTransformations (int FaceNo) |
FaceElementTransformations * | GetBdrFaceTransformations (int BdrElemNo) |
const GeometricFactors * | GetGeometricFactors (const IntegrationRule &ir, const int flags, MemoryType d_mt=MemoryType::DEFAULT) |
Return the mesh geometric factors corresponding to the given integration rule. More... | |
const FaceGeometricFactors * | GetFaceGeometricFactors (const IntegrationRule &ir, const int flags, FaceType type, MemoryType d_mt=MemoryType::DEFAULT) |
Return the mesh geometric factors for the faces corresponding to the given integration rule. More... | |
void | DeleteGeometricFactors () |
Destroy all GeometricFactors stored by the Mesh. More... | |
void | GetPointMatrix (int i, DenseMatrix &pointmat) const |
void | GetBdrPointMatrix (int i, DenseMatrix &pointmat) const |
FaceInformation | GetFaceInformation (int f) const |
void | GetFaceElements (int Face, int *Elem1, int *Elem2) const |
void | GetFaceInfos (int Face, int *Inf1, int *Inf2) const |
void | GetFaceInfos (int Face, int *Inf1, int *Inf2, int *NCFace) const |
int * | CartesianPartitioning (int nxyz[]) |
int * | GeneratePartitioning (int nparts, int part_method=1) |
void | CheckPartitioning (int *partitioning_) |
void | MoveVertices (const Vector &displacements) |
void | GetVertices (Vector &vert_coord) const |
void | SetVertices (const Vector &vert_coord) |
void | ChangeVertexDataOwnership (double *vertices, int len_vertices, bool zerocopy=false) |
Set the internal Vertex array to point to the given vertices array without assuming ownership of the pointer. More... | |
void | GetNode (int i, double *coord) const |
void | SetNode (int i, const double *coord) |
void | MoveNodes (const Vector &displacements) |
void | GetNodes (Vector &node_coord) const |
void | SetNodes (const Vector &node_coord) |
Updates the vertex/node locations. Invokes NodesUpdated(). More... | |
void | ScaleSubdomains (double sf) |
void | ScaleElements (double sf) |
void | Transform (void(*f)(const Vector &, Vector &)) |
void | Transform (VectorCoefficient &deformation) |
void | NodesUpdated () |
This function should be called after the mesh node coordinates have been updated externally, e.g. by modifying the internal nodal GridFunction returned by GetNodes(). More... | |
GridFunction * | GetNodes () |
Return a pointer to the internal node GridFunction (may be NULL). More... | |
const GridFunction * | GetNodes () const |
bool | OwnsNodes () const |
Return the mesh nodes ownership flag. More... | |
void | SetNodesOwner (bool nodes_owner) |
Set the mesh nodes ownership flag. More... | |
void | NewNodes (GridFunction &nodes, bool make_owner=false) |
Replace the internal node GridFunction with the given GridFunction. More... | |
void | SwapNodes (GridFunction *&nodes, int &own_nodes_) |
Swap the internal node GridFunction pointer and ownership flag members with the given ones. More... | |
void | GetNodes (GridFunction &nodes) const |
Return the mesh nodes/vertices projected on the given GridFunction. More... | |
void | SetNodalGridFunction (GridFunction *nodes, bool make_owner=false) |
const FiniteElementSpace * | GetNodalFESpace () const |
void | EnsureNodes () |
Make sure that the mesh has valid nodes, i.e. its geometry is described by a vector finite element grid function (even if it is a low-order mesh with straight edges). More... | |
void | UniformRefinement (int ref_algo=0) |
Refine all mesh elements. More... | |
void | GeneralRefinement (const Array< Refinement > &refinements, int nonconforming=-1, int nc_limit=0) |
void | GeneralRefinement (const Array< int > &el_to_refine, int nonconforming=-1, int nc_limit=0) |
void | RandomRefinement (double prob, bool aniso=false, int nonconforming=-1, int nc_limit=0) |
Refine each element with given probability. Uses GeneralRefinement. More... | |
void | RefineAtVertex (const Vertex &vert, double eps=0.0, int nonconforming=-1) |
Refine elements sharing the specified vertex. Uses GeneralRefinement. More... | |
bool | RefineByError (const Array< double > &elem_error, double threshold, int nonconforming=-1, int nc_limit=0) |
bool | RefineByError (const Vector &elem_error, double threshold, int nonconforming=-1, int nc_limit=0) |
bool | DerefineByError (Array< double > &elem_error, double threshold, int nc_limit=0, int op=1) |
bool | DerefineByError (const Vector &elem_error, double threshold, int nc_limit=0, int op=1) |
Same as DerefineByError for an error vector. More... | |
void | EnsureNCMesh (bool simplices_nonconforming=false) |
bool | Conforming () const |
bool | Nonconforming () const |
const CoarseFineTransformations & | GetRefinementTransforms () |
Operation | GetLastOperation () const |
Return type of last modification of the mesh. More... | |
long | GetSequence () const |
void | RefineNURBSFromFile (std::string ref_file) |
void | KnotInsert (Array< KnotVector *> &kv) |
void | KnotInsert (Array< Vector *> &kv) |
void | DegreeElevate (int rel_degree, int degree=16) |
std::vector< int > | CreatePeriodicVertexMapping (const std::vector< Vector > &translations, double tol=1e-8) const |
Creates a mapping v2v from the vertex indices of the mesh such that coincident vertices under the given translations are identified. More... | |
void | GetGeometricParametersFromJacobian (const DenseMatrix &J, double &volume, Vector &aspr, Vector &skew, Vector &ori) const |
Computes geometric parameters associated with a Jacobian matrix in 2D/3D. These parameters are (1) Area/Volume, (2) Aspect-ratio (1 in 2D, and 2 non-dimensional and 2 dimensional parameters in 3D. Dimensional parameters are used for target construction in TMOP), (3) skewness (1 in 2D and 3 in 3D), and finally (4) orientation (1 in 2D and 3 in 3D). More... | |
void | GetElementColoring (Array< int > &colors, int el0=0) |
void | MesquiteSmooth (const int mesquite_option=0) |
void | CheckDisplacements (const Vector &displacements, double &tmax) |
void | PrintVTK (std::ostream &os) |
void | PrintVTK (std::ostream &os, int ref, int field_data=0) |
void | PrintVTU (std::ostream &os, int ref=1, VTKFormat format=VTKFormat::ASCII, bool high_order_output=false, int compression_level=0, bool bdr_elements=false) |
void | PrintBdrVTU (std::string fname, VTKFormat format=VTKFormat::ASCII, bool high_order_output=false, int compression_level=0) |
void | PrintWithPartitioning (int *partitioning, std::ostream &os, int elem_attr=0) const |
Prints the mesh with boundary elements given by the boundary of the subdomains, so that the boundary of subdomain i has boundary attribute i+1. More... | |
void | PrintElementsWithPartitioning (int *partitioning, std::ostream &out, int interior_faces=0) |
void | PrintSurfaces (const Table &Aface_face, std::ostream &out) const |
Print set of disjoint surfaces: More... | |
void | PrintCharacteristics (Vector *Vh=NULL, Vector *Vk=NULL, std::ostream &os=mfem::out) |
Compute and print mesh characteristics such as number of vertices, number of elements, number of boundary elements, minimal and maximal element sizes, minimal and maximal element aspect ratios, etc. More... | |
void | DebugDump (std::ostream &out) const |
Output an NCMesh-compatible debug dump. More... | |
Static Public Member Functions | |
static ParMesh | MakeRefined (ParMesh &orig_mesh, int ref_factor, int ref_type) |
Create a uniformly refined (by any factor) version of orig_mesh. More... | |
static ParMesh | MakeSimplicial (ParMesh &orig_mesh) |
![]() | |
static FiniteElement * | GetTransformationFEforElementType (Element::Type) |
Return FiniteElement for reference element of the specified type. More... | |
static Mesh | LoadFromFile (const std::string &filename, int generate_edges=0, int refine=1, bool fix_orientation=true) |
static Mesh | MakeCartesian1D (int n, double sx=1.0) |
static Mesh | MakeCartesian2D (int nx, int ny, Element::Type type, bool generate_edges=false, double sx=1.0, double sy=1.0, bool sfc_ordering=true) |
static Mesh | MakeCartesian3D (int nx, int ny, int nz, Element::Type type, double sx=1.0, double sy=1.0, double sz=1.0, bool sfc_ordering=true) |
static Mesh | MakeRefined (Mesh &orig_mesh, int ref_factor, int ref_type) |
Create a refined (by any factor) version of orig_mesh. More... | |
static Mesh | MakeRefined (Mesh &orig_mesh, const Array< int > &ref_factors, int ref_type) |
refined ref_factors[i] times in each dimension. More... | |
static Mesh | MakeSimplicial (const Mesh &orig_mesh) |
static Mesh | MakePeriodic (const Mesh &orig_mesh, const std::vector< int > &v2v) |
Create a periodic mesh by identifying vertices of orig_mesh. More... | |
static void | PrintElementsByGeometry (int dim, const Array< int > &num_elems_by_geom, std::ostream &out) |
Auxiliary method used by PrintCharacteristics(). More... | |
Public Attributes | |
GroupTopology | gtopo |
bool | have_face_nbr_data |
Array< int > | face_nbr_group |
Array< int > | face_nbr_elements_offset |
Array< int > | face_nbr_vertices_offset |
Array< Element * > | face_nbr_elements |
Array< Vertex > | face_nbr_vertices |
Table | send_face_nbr_elements |
Table | send_face_nbr_vertices |
ParNCMesh * | pncmesh |
int * | partitioning_cache = nullptr |
![]() | |
Array< int > | attributes |
A list of all unique element attributes used by the Mesh. More... | |
Array< int > | bdr_attributes |
A list of all unique boundary attributes used by the Mesh. More... | |
NURBSExtension * | NURBSext |
Optional NURBS mesh extension. More... | |
NCMesh * | ncmesh |
Optional nonconforming mesh extension. More... | |
Array< GeometricFactors * > | geom_factors |
Optional geometric factors. More... | |
Array< FaceGeometricFactors * > | face_geom_factors |
Protected Member Functions | |
void | ComputeGlobalElementOffset () const |
ParMesh (const ParNCMesh &pncmesh) | |
Create from a nonconforming mesh. More... | |
void | ReduceMeshGen () |
void | FinalizeParTopo () |
void | MarkTetMeshForRefinement (DSTable &v_to_v) override |
int | GetEdgeSplittings (Element *edge, const DSTable &v_to_v, int *middle) |
Return a number(0-1) identifying how the given edge has been split. More... | |
void | GetFaceSplittings (const int *fv, const HashTable< Hashed2 > &v_to_v, Array< unsigned > &codes) |
Append codes identifying how the given face has been split to codes. More... | |
bool | DecodeFaceSplittings (HashTable< Hashed2 > &v_to_v, const int *v, const Array< unsigned > &codes, int &pos) |
STable3D * | GetFaceNbrElementToFaceTable (int ret_ftbl=0) |
void | GetFaceNbrElementTransformation (int i, IsoparametricTransformation *ElTr) |
void | GetGhostFaceTransformation (FaceElementTransformations *FETr, Element::Type face_type, Geometry::Type face_geom) |
void | RefineGroups (const DSTable &v_to_v, int *middle) |
Update the groups after triangle refinement. More... | |
void | RefineGroups (int old_nv, const HashTable< Hashed2 > &v_to_v) |
Update the groups after tetrahedron refinement. More... | |
void | UniformRefineGroups2D (int old_nv) |
void | UniformRefineGroups3D (int old_nv, int old_nedges, const DSTable &old_v_to_v, const STable3D &old_faces, Array< int > *f2qf) |
void | ExchangeFaceNbrData (Table *gr_sface, int *s2l_face) |
void | UniformRefinement2D () override |
Refine a mixed 2D mesh uniformly. More... | |
void | UniformRefinement3D () override |
Refine a mixed 3D mesh uniformly. More... | |
void | NURBSUniformRefinement () override |
Refine NURBS mesh. More... | |
void | LocalRefinement (const Array< int > &marked_el, int type=3) override |
This function is not public anymore. Use GeneralRefinement instead. More... | |
void | NonconformingRefinement (const Array< Refinement > &refinements, int nc_limit=0) override |
This function is not public anymore. Use GeneralRefinement instead. More... | |
bool | NonconformingDerefinement (Array< double > &elem_error, double threshold, int nc_limit=0, int op=1) override |
NC version of GeneralDerefinement. More... | |
void | RebalanceImpl (const Array< int > *partition) |
void | DeleteFaceNbrData () |
bool | WantSkipSharedMaster (const NCMesh::Master &master) const |
int | BuildLocalVertices (const Mesh &global_mesh, const int *partitioning, Array< int > &vert_global_local) |
Fills out partitioned Mesh::vertices. More... | |
int | BuildLocalElements (const Mesh &global_mesh, const int *partitioning, const Array< int > &vert_global_local) |
Fills out partitioned Mesh::elements. More... | |
int | BuildLocalBoundary (const Mesh &global_mesh, const int *partitioning, const Array< int > &vert_global_local, Array< bool > &activeBdrElem, Table *&edge_element) |
Fills out partitioned Mesh::boundary. More... | |
void | FindSharedFaces (const Mesh &mesh, const int *partition, Array< int > &face_group, ListOfIntegerSets &groups) |
int | FindSharedEdges (const Mesh &mesh, const int *partition, Table *&edge_element, ListOfIntegerSets &groups) |
int | FindSharedVertices (const int *partition, Table *vertex_element, ListOfIntegerSets &groups) |
void | BuildFaceGroup (int ngroups, const Mesh &mesh, const Array< int > &face_group, int &nstria, int &nsquad) |
void | BuildEdgeGroup (int ngroups, const Table &edge_element) |
void | BuildVertexGroup (int ngroups, const Table &vert_element) |
void | BuildSharedFaceElems (int ntri_faces, int nquad_faces, const Mesh &mesh, int *partitioning, const STable3D *faces_tbl, const Array< int > &face_group, const Array< int > &vert_global_local) |
void | BuildSharedEdgeElems (int nedges, Mesh &mesh, const Array< int > &vert_global_local, const Table *edge_element) |
void | BuildSharedVertMapping (int nvert, const Table *vert_element, const Array< int > &vert_global_local) |
void | GetSharedEdgeCommunicator (int ordering, GroupCommunicator &sedge_comm) const |
Get the shared edges GroupCommunicator. More... | |
void | GetSharedVertexCommunicator (int ordering, GroupCommunicator &svert_comm) const |
Get the shared vertices GroupCommunicator. More... | |
void | GetSharedQuadCommunicator (int ordering, GroupCommunicator &squad_comm) const |
Get the shared face quadrilaterals GroupCommunicator. More... | |
void | GetSharedTriCommunicator (int ordering, GroupCommunicator &stria_comm) const |
Get the shared face triangles GroupCommunicator. More... | |
STable3D * | GetSharedFacesTable () |
void | DistributeAttributes (Array< int > &attr) |
Ensure that bdr_attributes and attributes agree across processors. More... | |
void | LoadSharedEntities (std::istream &input) |
void | EnsureParNodes () |
If the mesh is curved, make sure 'Nodes' is ParGridFunction. More... | |
void | MakeRefined_ (ParMesh &orig_mesh, int ref_factor, int ref_type) |
Internal function used in ParMesh::MakeRefined (and related constructor) More... | |
void | Destroy () |
void | Swap (Mesh &other, bool non_geometry) |
![]() | |
void | Init () |
void | InitTables () |
void | SetEmpty () |
void | DestroyTables () |
void | DeleteTables () |
void | DestroyPointers () |
void | Destroy () |
void | ResetLazyData () |
Element * | ReadElementWithoutAttr (std::istream &) |
Element * | ReadElement (std::istream &) |
void | ReadMFEMMesh (std::istream &input, int version, int &curved) |
void | ReadLineMesh (std::istream &input) |
void | ReadNetgen2DMesh (std::istream &input, int &curved) |
void | ReadNetgen3DMesh (std::istream &input) |
void | ReadTrueGridMesh (std::istream &input) |
void | CreateVTKMesh (const Vector &points, const Array< int > &cell_data, const Array< int > &cell_offsets, const Array< int > &cell_types, const Array< int > &cell_attributes, int &curved, int &read_gf, bool &finalize_topo) |
void | ReadVTKMesh (std::istream &input, int &curved, int &read_gf, bool &finalize_topo) |
void | ReadXML_VTKMesh (std::istream &input, int &curved, int &read_gf, bool &finalize_topo, const std::string &xml_prefix="") |
void | ReadNURBSMesh (std::istream &input, int &curved, int &read_gf) |
void | ReadInlineMesh (std::istream &input, bool generate_edges=false) |
void | ReadGmshMesh (std::istream &input, int &curved, int &read_gf) |
void | ReadCubit (const char *filename, int &curved, int &read_gf) |
void | SetMeshGen () |
Determine the mesh generator bitmask meshgen, see MeshGenerator(). More... | |
double | GetLength (int i, int j) const |
Return the length of the segment from node i to node j. More... | |
void | MarkForRefinement () |
void | MarkTriMeshForRefinement () |
void | GetEdgeOrdering (DSTable &v_to_v, Array< int > &order) |
void | PrepareNodeReorder (DSTable **old_v_to_v, Table **old_elem_vert) |
void | DoNodeReorder (DSTable *old_v_to_v, Table *old_elem_vert) |
STable3D * | GetFacesTable () |
STable3D * | GetElementToFaceTable (int ret_ftbl=0) |
void | RedRefinement (int i, const DSTable &v_to_v, int *edge1, int *edge2, int *middle) |
void | GreenRefinement (int i, const DSTable &v_to_v, int *edge1, int *edge2, int *middle) |
void | Bisection (int i, const DSTable &, int *, int *, int *) |
Bisect a triangle: element with index i is bisected. More... | |
void | Bisection (int i, HashTable< Hashed2 > &) |
Bisect a tetrahedron: element with index i is bisected. More... | |
void | BdrBisection (int i, const HashTable< Hashed2 > &) |
Bisect a boundary triangle: boundary element with index i is bisected. More... | |
void | UniformRefinement (int i, const DSTable &, int *, int *, int *) |
void | AverageVertices (const int *indexes, int n, int result) |
Averages the vertices with given indexes and saves the result in vertices[result]. More... | |
void | InitRefinementTransforms () |
int | FindCoarseElement (int i) |
void | UpdateNodes () |
Update the nodes of a curved mesh after the topological part of a Mesh::Operation, such as refinement, has been performed. More... | |
void | SetVerticesFromNodes (const GridFunction *nodes) |
Helper to set vertex coordinates given a high-order curvature function. More... | |
void | UniformRefinement2D_base (bool update_nodes=true) |
void | UniformRefinement3D_base (Array< int > *f2qf=NULL, DSTable *v_to_v_p=NULL, bool update_nodes=true) |
double | AggregateError (const Array< double > &elem_error, const int *fine, int nfine, int op) |
Derefinement helper. More... | |
void | LoadPatchTopo (std::istream &input, Array< int > &edge_to_knot) |
Read NURBS patch/macro-element mesh. More... | |
void | UpdateNURBS () |
void | PrintTopo (std::ostream &out, const Array< int > &e_to_k) const |
void | GetLocalPtToSegTransformation (IsoparametricTransformation &, int) |
Used in GetFaceElementTransformations (...) More... | |
void | GetLocalSegToTriTransformation (IsoparametricTransformation &loc, int i) |
void | GetLocalSegToQuadTransformation (IsoparametricTransformation &loc, int i) |
void | GetLocalTriToTetTransformation (IsoparametricTransformation &loc, int i) |
Used in GetFaceElementTransformations (...) More... | |
void | GetLocalTriToWdgTransformation (IsoparametricTransformation &loc, int i) |
Used in GetFaceElementTransformations (...) More... | |
void | GetLocalTriToPyrTransformation (IsoparametricTransformation &loc, int i) |
Used in GetFaceElementTransformations (...) More... | |
void | GetLocalQuadToHexTransformation (IsoparametricTransformation &loc, int i) |
Used in GetFaceElementTransformations (...) More... | |
void | GetLocalQuadToWdgTransformation (IsoparametricTransformation &loc, int i) |
Used in GetFaceElementTransformations (...) More... | |
void | GetLocalQuadToPyrTransformation (IsoparametricTransformation &loc, int i) |
Used in GetFaceElementTransformations (...) More... | |
void | ApplyLocalSlaveTransformation (FaceElementTransformations &FT, const FaceInfo &fi, bool is_ghost) |
bool | IsSlaveFace (const FaceInfo &fi) const |
int | GetElementToEdgeTable (Table &, Array< int > &) |
void | AddPointFaceElement (int lf, int gf, int el) |
Used in GenerateFaces() More... | |
void | AddSegmentFaceElement (int lf, int gf, int el, int v0, int v1) |
void | AddTriangleFaceElement (int lf, int gf, int el, int v0, int v1, int v2) |
void | AddQuadFaceElement (int lf, int gf, int el, int v0, int v1, int v2, int v3) |
bool | FaceIsTrueInterior (int FaceNo) const |
void | FreeElement (Element *E) |
void | GenerateFaces () |
void | GenerateNCFaceInfo () |
void | InitMesh (int Dim_, int spaceDim_, int NVert, int NElem, int NBdrElem) |
Begin construction of a mesh. More... | |
void | FinalizeCheck () |
void | Loader (std::istream &input, int generate_edges=0, std::string parse_tag="") |
void | Printer (std::ostream &out=mfem::out, std::string section_delimiter="") const |
void | Make3D (int nx, int ny, int nz, Element::Type type, double sx, double sy, double sz, bool sfc_ordering) |
void | Make2D (int nx, int ny, Element::Type type, double sx, double sy, bool generate_edges, bool sfc_ordering) |
void | Make1D (int n, double sx=1.0) |
Creates a 1D mesh for the interval [0,sx] divided into n equal intervals. More... | |
void | MakeRefined_ (Mesh &orig_mesh, const Array< int > ref_factors, int ref_type) |
Internal function used in Mesh::MakeRefined. More... | |
void | InitFromNCMesh (const NCMesh &ncmesh) |
Initialize vertices/elements/boundary/tables from a nonconforming mesh. More... | |
Mesh (const NCMesh &ncmesh) | |
Create from a nonconforming mesh. More... | |
void | GetElementData (const Array< Element *> &elem_array, int geom, Array< int > &elem_vtx, Array< int > &attr) const |
double | GetElementSize (ElementTransformation *T, int type=0) |
void | MakeSimplicial_ (const Mesh &orig_mesh, int *vglobal) |
Friends | |
class | ParSubMesh |
class | ParNCMesh |
class | ParPumiMesh |
class | adios2stream |
|
protected |
|
inline |
mfem::ParMesh::ParMesh | ( | MPI_Comm | comm, |
Mesh & | mesh, | ||
int * | partitioning_ = NULL , |
||
int | part_method = 1 |
||
) |
Create a parallel mesh by partitioning a serial Mesh.
The mesh is partitioned automatically or using external partitioning data (the optional parameter 'partitioning_[i]' contains the desired MPI rank for element 'i'). Automatic partitioning uses METIS for conforming meshes and quick space-filling curve equipartitioning for nonconforming meshes (elements of nonconforming meshes should ideally be ordered as a sequence of face-neighbors).
|
explicit |
mfem::ParMesh::ParMesh | ( | MPI_Comm | comm, |
std::istream & | input, | ||
bool | refine = true |
||
) |
Read a parallel mesh, each MPI rank from its own file/stream.
The refine parameter is passed to the method Mesh::Finalize().
mfem::ParMesh::ParMesh | ( | ParMesh * | orig_mesh, |
int | ref_factor, | ||
int | ref_type | ||
) |
Deprecated: see ParMesh::MakeRefined.
mfem::ParMesh::ParMesh | ( | ParMesh && | mesh | ) |
|
protected |
|
protected |
Fills out partitioned Mesh::boundary.
|
protected |
Fills out partitioned Mesh::elements.
|
protected |
Fills out partitioned Mesh::vertices.
|
protected |
|
protected |
|
protected |
|
protected |
If the mesh is curved, make sure 'Nodes' is ParGridFunction.
Note that this method is not related to the public 'Mesh::EnsureNodes`.
|
protected |
|
overridevirtual |
Finalize the construction of a general Mesh.
This method will:
[in] | refine | If true, prepare the Mesh for conforming refinement of triangular or tetrahedral meshes. |
[in] | fix_orientation | If true, fix the orientation of inverted mesh elements by permuting their vertices. |
Reimplemented from mfem::Mesh.
|
overridevirtual |
Find the ids of the elements that contain the given points, and their corresponding reference coordinates.
The DenseMatrix point_mat describes the given points - one point for each column; it should have SpaceDimension() rows.
The InverseElementTransformation object, inv_trans, is used to attempt the element transformation inversion. If NULL pointer is given, the method will use a default constructed InverseElementTransformation. Note that the algorithms in the base class InverseElementTransformation can be completely overwritten by deriving custom classes that override the Transform() method.
If no element is found for the i-th point, elem_ids[i] is set to -1.
In the ParMesh implementation, the point_mat is expected to be the same on all ranks. If the i-th point is found by multiple ranks, only one of them will mark that point as found, i.e. set its elem_ids[i] to a non-negative number; the other ranks will set their elem_ids[i] to -2 to indicate that the point was found but assigned to another rank.
Reimplemented from mfem::Mesh.
|
protected |
|
protected |
|
protected |
void mfem::ParMesh::GenerateOffsets | ( | int | N, |
HYPRE_BigInt | loc_sizes[], | ||
Array< HYPRE_BigInt > * | offsets[] | ||
) | const |
void mfem::ParMesh::GetCharacteristics | ( | double & | h_min, |
double & | h_max, | ||
double & | kappa_min, | ||
double & | kappa_max | ||
) |
|
overridevirtual |
Returns (a pointer to an object containing) the following data:
1) Elem1No - the index of the first element that contains this face this is the element that has the same outward unit normal vector as the face;
2) Elem2No - the index of the second element that contains this face this element has outward unit normal vector as the face multiplied with -1;
3) Elem1, Elem2 - pointers to the ElementTransformation's of the first and the second element respectively;
4) Face - pointer to the ElementTransformation of the face;
5) Loc1, Loc2 - IntegrationPointTransformation's mapping the face coordinate system to the element coordinate system (both in their reference elements). Used to transform IntegrationPoints from face to element. More formally, let: TL1, TL2 be the transformations represented by Loc1, Loc2, TE1, TE2 - the transformations represented by Elem1, Elem2, TF - the transformation represented by Face, then TF(x) = TE1(TL1(x)) = TE2(TL2(x)) for all x in the reference face.
6) FaceGeom - the base geometry for the face.
The mask specifies which fields in the structure to return: mask & 1 - Elem1, mask & 2 - Elem2 mask & 4 - Loc1, mask & 8 - Loc2, mask & 16 - Face. These mask values are defined in the ConfigMasks enum type as part of the FaceElementTransformations class in fem/eltrans.hpp.
Reimplemented from mfem::Mesh.
Similar to Mesh::GetElementFaces
double mfem::ParMesh::GetFaceNbrElementSize | ( | int | i, |
int | type = 0 |
||
) |
|
protected |
|
protected |
|
inline |
Returns a pointer to the transformation defining the i-th face neighbor.
Table * mfem::ParMesh::GetFaceToAllElementTable | ( | ) | const |
Similar to Mesh::GetFaceToElementTable with added face-neighbor elements with indices offset by the local number of elements.
|
protected |
void mfem::ParMesh::GetGlobalEdgeIndices | ( | Array< HYPRE_BigInt > & | gi | ) | const |
void mfem::ParMesh::GetGlobalElementIndices | ( | Array< HYPRE_BigInt > & | gi | ) | const |
long long mfem::ParMesh::GetGlobalElementNum | ( | int | local_element_num | ) | const |
void mfem::ParMesh::GetGlobalFaceIndices | ( | Array< HYPRE_BigInt > & | gi | ) | const |
void mfem::ParMesh::GetGlobalVertexIndices | ( | Array< HYPRE_BigInt > & | gi | ) | const |
int mfem::ParMesh::GetLocalElementNum | ( | long long | global_element_num | ) | const |
|
inline |
|
overridevirtual |
Returns the number of local faces according to the requested type, does not count master non-conforming faces.
If type==Boundary returns only the number of true boundary faces contrary to GetNBE() that returns all "boundary" elements which may include actual interior faces. Similarly, if type==Interior, only the true interior faces (including shared faces) are counted excluding all master non-conforming faces.
Reimplemented from mfem::Mesh.
int mfem::ParMesh::GetNSharedFaces | ( | ) | const |
Mesh mfem::ParMesh::GetSerialMesh | ( | int | save_rank | ) | const |
|
protected |
Get the shared edges GroupCommunicator.
The output of the shared edges is chosen by the ordering parameter with the following options 0: Internal ordering. Not exposed to public interfaces. 1: Contiguous ordering.
[in] | ordering | Ordering for the shared edges. |
[out] | sedge_comm |
|
inline |
Get the shared edges GroupCommunicator.
[out] | sedge_comm |
int mfem::ParMesh::GetSharedFace | ( | int | sface | ) | const |
|
protected |
FaceElementTransformations * mfem::ParMesh::GetSharedFaceTransformations | ( | int | sf, |
bool | fill2 = true |
||
) |
Get the FaceElementTransformations for the given shared face (edge 2D) using the shared face index sf. fill2 specify if the information for elem2 of the face should be computed or not. In the returned object, 1 and 2 refer to the local and the neighbor elements, respectively.
FaceElementTransformations * mfem::ParMesh::GetSharedFaceTransformationsByLocalIndex | ( | int | FaceNo, |
bool | fill2 = true |
||
) |
Get the FaceElementTransformations for the given shared face (edge 2D) using the face index FaceNo. fill2 specify if the information for elem2 of the face should be computed or not. In the returned object, 1 and 2 refer to the local and the neighbor elements, respectively.
|
protected |
Get the shared face quadrilaterals GroupCommunicator.
The output of the shared face quadrilaterals is chosen by the ordering parameter with the following options 0: Internal ordering. Not exposed to public interfaces. 1: Contiguous ordering.
[in] | ordering | |
[out] | squad_comm |
|
inline |
Get the shared face quadrilaterals GroupCommunicator.
[out] | squad_comm |
|
protected |
Get the shared face triangles GroupCommunicator.
The output of the shared face triangles is chosen by the ordering parameter with the following options 0: Internal ordering. Not exposed to public interfaces. 1: Contiguous ordering.
[in] | ordering | |
[out] | stria_comm |
|
inline |
Get the shared face triangles GroupCommunicator.
[out] | stria_comm |
|
protected |
Get the shared vertices GroupCommunicator.
The output of the shared vertices is chosen by the ordering parameter with the following options 0: Internal ordering. Not exposed to public interfaces. 1: Contiguous ordering.
[in] | ordering | |
[out] | svert_comm |
|
inline |
Get the shared vertices GroupCommunicator.
[out] | svert_comm |
void mfem::ParMesh::GroupEdge | ( | int | group, |
int | i, | ||
int & | edge, | ||
int & | o | ||
) | const |
|
inline |
|
inline |
|
inline |
void mfem::ParMesh::GroupQuadrilateral | ( | int | group, |
int | i, | ||
int & | face, | ||
int & | o | ||
) | const |
void mfem::ParMesh::GroupTriangle | ( | int | group, |
int | i, | ||
int & | face, | ||
int & | o | ||
) | const |
|
inline |
|
overridevirtual |
Checks if any rank in the mesh has boundary elements.
Reimplemented from mfem::Mesh.
|
overridevirtual |
Parallel version of Mesh::Load().
Reimplemented from mfem::Mesh.
|
protected |
|
overrideprotectedvirtual |
This function is not public anymore. Use GeneralRefinement instead.
Reimplemented from mfem::Mesh.
Create a uniformly refined (by any factor) version of orig_mesh.
[in] | orig_mesh | The starting coarse mesh. |
[in] | ref_factor | The refinement factor, an integer > 1. |
[in] | ref_type | Specify the positions of the new vertices. The options are BasisType::ClosedUniform or BasisType::GaussLobatto. |
The refinement data which can be accessed with GetRefinementTransforms() is set to reflect the performed refinements.
|
protected |
Internal function used in ParMesh::MakeRefined (and related constructor)
Create a mesh by splitting each element of orig_mesh into simplices. See Mesh::MakeSimplicial for more details.
|
overrideprotectedvirtual |
Reimplemented from mfem::Mesh.
|
overrideprotectedvirtual |
NC version of GeneralDerefinement.
Reimplemented from mfem::Mesh.
|
overrideprotectedvirtual |
This function is not public anymore. Use GeneralRefinement instead.
Reimplemented from mfem::Mesh.
|
overrideprotectedvirtual |
Explicitly delete the copy assignment operator.
void mfem::ParMesh::ParPrint | ( | std::ostream & | out | ) | const |
|
overridevirtual |
Print the part of the mesh in the calling processor using the mfem v1.0 format. Depending on SetPrintShared(), the parallel interface can be added as boundary for visualization (true by default) .
Reimplemented from mfem::Mesh.
|
overridevirtual |
Print the part of the mesh in the calling processor using adios2 bp format.
Reimplemented from mfem::Mesh.
void mfem::ParMesh::PrintAsOne | ( | std::ostream & | out = mfem::out | ) | const |
void mfem::ParMesh::PrintAsOneXG | ( | std::ostream & | out = mfem::out | ) |
void mfem::ParMesh::PrintAsSerial | ( | std::ostream & | out = mfem::out | ) | const |
|
overridevirtual |
Print various parallel mesh stats.
Reimplemented from mfem::Mesh.
void mfem::ParMesh::PrintSharedEntities | ( | const std::string & | fname_prefix | ) | const |
|
overridevirtual |
Print the mesh in parallel PVTU format. The PVTU and VTU files will be stored in the directory specified by pathname. If the directory does not exist, it will be created.
Reimplemented from mfem::Mesh.
|
overridevirtual |
Print the part of the mesh in the calling processor adding the interface as boundary (for visualization purposes) using Netgen/Truegrid format .
Reimplemented from mfem::Mesh.
void mfem::ParMesh::Rebalance | ( | ) |
void mfem::ParMesh::Rebalance | ( | const Array< int > & | partition | ) |
|
protected |
|
overridevirtual |
Utility function: sum integers from all processors (Allreduce).
Reimplemented from mfem::Mesh.
|
protected |
|
overridevirtual |
See the remarks for the serial version in mesh.hpp.
Reimplemented from mfem::Mesh.
|
overridevirtual |
Save the ParMesh to files (one for each MPI rank). The files will be given suffixes according to the MPI rank. The mesh will be written to the files using ParMesh::Print. The given precision will be used for ASCII output.
Reimplemented from mfem::Mesh.
void mfem::ParMesh::SaveAsOne | ( | const std::string & | fname, |
int | precision = 16 |
||
) | const |
Save the mesh as a single file (using ParMesh::PrintAsOne). The given precision is used for ASCII output.
|
overridevirtual |
Determine the sets of unique attribute values in domain and boundary elements.
Separately scan the domain and boundary elements to generate unique, sorted sets of the element attribute values present in the mesh and store these in the Mesh::attributes and Mesh::bdr_attributes arrays.
Reimplemented from mfem::Mesh.
|
overridevirtual |
Set the curvature of the mesh nodes using the given polynomial degree.
Creates a nodal GridFunction if one doesn't already exist.
[in] | order | Polynomial degree of the nodal FE space. |
[in] | discont | Whether to use a discontinuous or continuous finite element space (continuous is default). |
[in] | space_dim | The space dimension (optional). |
[in] | ordering | The Ordering of the finite element space (Ordering::byVDIM is the default). |
Reimplemented from mfem::Mesh.
|
overridevirtual |
Replace the internal node GridFunction with a new GridFunction defined on the given FiniteElementSpace. The new node coordinates are projected (derived) from the current nodes/vertices.
Reimplemented from mfem::Mesh.
void mfem::ParMesh::SetNodalFESpace | ( | ParFiniteElementSpace * | npfes | ) |
|
protected |
void mfem::ParMesh::Swap | ( | ParMesh & | other | ) |
Swaps internal data with another ParMesh, including non-geometry members. See Mesh::Swap
|
protected |
|
overrideprotectedvirtual |
Refine a mixed 2D mesh uniformly.
Reimplemented from mfem::Mesh.
|
overrideprotectedvirtual |
Refine a mixed 3D mesh uniformly.
Reimplemented from mfem::Mesh.
|
protected |
|
friend |
|
friend |
|
friend |
|
protected |
|
protected |
GroupTopology mfem::ParMesh::gtopo |
|
protected |