![]() |
MFEM
v4.2.0
Finite element discretization library
|
A class for non-conforming AMR on higher-order hexahedral, prismatic, quadrilateral or triangular meshes. More...
#include <ncmesh.hpp>
Classes | |
struct | Element |
struct | Face |
struct | GeomInfo |
struct | Master |
struct | MeshId |
Identifies a vertex/edge/face in both Mesh and NCMesh. More... | |
struct | NCList |
Lists all edges/faces in the nonconforming mesh. More... | |
struct | Node |
struct | Point |
struct | PointMatrix |
struct | Slave |
Nonconforming edge/face within a bigger edge/face. More... | |
struct | TmpVertex |
Public Types | |
typedef int64_t | RefCoord |
Public Member Functions | |
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 |
virtual void | Refine (const Array< Refinement > &refinements) |
virtual void | LimitNCLevel (int max_nc_level) |
const Table & | GetDerefinementTable () |
virtual void | CheckDerefinementNCLevel (const Table &deref_table, Array< int > &level_ok, int max_nc_level) |
virtual void | Derefine (const Array< int > &derefs) |
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], bool oriented=true) const |
Return Mesh vertex indices of an edge identified by 'edge_id'. More... | |
int | GetEdgeNCOrientation (const MeshId &edge_id) const |
int | GetFaceVerticesEdges (const MeshId &face_id, int vert_index[4], int edge_index[4], int edge_orientation[4]) const |
int | GetEdgeMaster (int v1, int v2) const |
virtual void | GetBoundaryClosure (const Array< int > &bdr_attr_is_ess, Array< int > &bdr_vertices, Array< int > &bdr_edges) |
Geometry::Type | GetElementGeometry (int index) const |
Return element geometry type. index is the Mesh element number. More... | |
Geometry::Type | GetFaceGeometry (int index) const |
Return face geometry type. index is the Mesh face number. More... | |
int | GetNumRootElements () |
Return the number of root elements. More... | |
int | GetElementDepth (int i) const |
Return the distance of leaf 'i' from the root. More... | |
int | GetElementSizeReduction (int i) const |
void | GetElementFacesAttributes (int i, Array< int > &faces, Array< int > &fattr) const |
Return the faces and face attributes of leaf element 'i'. 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... | |
virtual void | Trim () |
Save memory by releasing all non-essential and cached data. More... | |
long | MemoryUsage () const |
Return total number of bytes allocated. More... | |
int | PrintMemoryDetail () const |
void | PrintStats (std::ostream &out=mfem::out) const |
void | DebugLeafOrder (std::ostream &out) const |
void | DebugDump (std::ostream &out) const |
Static Public Member Functions | |
static void | GridSfcOrdering2D (int width, int height, Array< int > &coords) |
static void | GridSfcOrdering3D (int width, int height, int depth, Array< int > &coords) |
Protected Types | |
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 | |
void | GetMeshComponents (Mesh &mesh) const |
Fill Mesh::{vertices,elements,boundary} for the current finest level. More... | |
virtual void | OnMeshUpdated (Mesh *mesh) |
virtual void | Update () |
virtual void | UpdateVertices () |
update Vertex::index and vertex_nodeId More... | |
void | CollectLeafElements (int elem, int state) |
void | UpdateLeafElements () |
virtual void | AssignLeafIndices () |
void | InitRootState (int root_count) |
virtual bool | IsGhost (const Element &el) const |
virtual int | GetNumGhostElements () const |
virtual int | GetNumGhostVertices () const |
void | InitGeomFlags () |
bool | HavePrisms () const |
bool | HaveTets () const |
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 | NewWedge (int n0, int n1, int n2, int n3, int n4, int n5, int attr, int fattr0, int fattr1, int fattr2, int fattr3, int fattr4) |
int | NewTetrahedron (int n0, int n1, int n2, int n3, int attr, int fattr0, int fattr1, int fattr2, int fattr3) |
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 | QuadFaceSplitType (int v1, int v2, int v3, int v4, int mid[5]=NULL) const |
bool | TriFaceSplit (int v1, int v2, int v3, int mid[3]=NULL) const |
void | ForceRefinement (int vn1, int vn2, int vn3, int vn4) |
void | FindEdgeElements (int vn1, int vn2, int vn3, int vn4, Array< MeshId > &prisms) const |
void | CheckAnisoPrism (int vn1, int vn2, int vn3, int vn4, const Refinement *refs, int nref) |
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 | ReparentNode (int node, int new_p1, int new_p2) |
int | FindMidEdgeNode (int node1, int node2) const |
int | GetMidEdgeNode (int node1, int node2) |
int | GetMidFaceNode (int en1, int en2, int en3, int en4) |
void | ReferenceElement (int elem) |
void | UnreferenceElement (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) |
void | CollectDerefinements (int elem, Array< Connection > &list) |
int | RetrieveNode (const Element &el, int index) |
Return el.node[index] correctly, even if the element is refined. More... | |
int | FindNodeExt (const Element &el, int node, bool abort=true) |
Extended version of find_node: works if 'el' is refined. More... | |
int | ReorderFacePointMat (int v0, int v1, int v2, int v3, int elem, const PointMatrix &pm, PointMatrix &reordered) const |
void | TraverseQuadFace (int vn0, int vn1, int vn2, int vn3, const PointMatrix &pm, int level, Face *eface[4], MatrixMap &matrix_map) |
bool | TraverseTriFace (int vn0, int vn1, int vn2, const PointMatrix &pm, int level, MatrixMap &matrix_map) |
void | TraverseTetEdge (int vn0, int vn1, const Point &p0, const Point &p1, MatrixMap &matrix_map) |
void | TraverseEdge (int vn0, int vn1, double t0, double t1, int flags, int level, MatrixMap &matrix_map) |
virtual void | BuildFaceList () |
virtual void | BuildEdgeList () |
virtual void | BuildVertexList () |
virtual void | ElementSharesFace (int elem, int local, int face) |
virtual void | ElementSharesEdge (int elem, int local, int enode) |
virtual void | ElementSharesVertex (int elem, int local, int vnode) |
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 | CollectTriFaceVertices (int v0, int v1, int v2, Array< int > &indices) |
void | CollectQuadFaceVertices (int v0, int v1, int v2, int v3, Array< int > &indices) |
void | BuildElementToVertexTable () |
void | UpdateElementToVertexTable () |
int | GetVertexRootCoord (int elem, RefCoord coord[3]) const |
void | CollectIncidentElements (int elem, const RefCoord coord[3], Array< int > &list) const |
void | FindVertexCousins (int elem, int local, Array< int > &cousins) const |
void | GetPointMatrix (Geometry::Type 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 |
int | TriFaceSplitLevel (int vn1, int vn2, int vn3) const |
void | QuadFaceSplitLevel (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 | find_node (const Element &el, int node) |
static int | find_element_edge (const Element &el, int vn0, int vn1, bool abort=true) |
static int | find_local_face (int geom, int a, int b, int c) |
static const PointMatrix & | GetGeomIdentity (Geometry::Type geom) |
Protected Attributes | |
int | Dim |
int | spaceDim |
dimensions of the elements and the vertex coordinates More... | |
bool | Iso |
true if the mesh only contains isotropic refinements More... | |
int | Geoms |
bit mask of element geometries present, see InitGeomFlags() More... | |
HashTable< Node > | nodes |
HashTable< Face > | faces |
BlockArray< Element > | elements |
Array< int > | free_element_ids |
Array< int > | root_state |
Array< double > | top_vertex_pos |
coordinates of top-level vertices (organized as triples) More... | |
int | NVertices |
int | NEdges |
int | NFaces |
Array< int > | leaf_elements |
Array< int > | vertex_nodeId |
NCList | face_list |
lazy-initialized list of faces, see GetFaceList More... | |
NCList | edge_list |
lazy-initialized list of edges, see GetEdgeList More... | |
NCList | vertex_list |
lazy-initialized list of vertices, see GetVertexList More... | |
Array< int > | boundary_faces |
subset of all faces, set by BuildFaceList More... | |
Array< char > | face_geom |
face geometry by face index, set by OnMeshUpdated More... | |
Table | element_vertex |
leaf-element to vertex table, see FindSetNeighbors More... | |
Array< Refinement > | ref_stack |
stack of scheduled refinements (temporary) More... | |
HashTable< Node > | shadow |
temporary storage for reparented nodes More... | |
Array< Triple< int, int, int > > | reparents |
scheduled node reparents (tmp) More... | |
Table | derefinements |
possible derefinements, see GetDerefinementTable More... | |
CoarseFineTransformations | transforms |
storage for data returned by Get[De]RefinementTransforms() More... | |
Array< int > | coarse_elements |
state of leaf_elements before Refine(), set by MarkCoarseLevel() More... | |
TmpVertex * | tmp_vertex |
Static Protected Attributes | |
static PointMatrix | pm_tri_identity |
static PointMatrix | pm_quad_identity |
static PointMatrix | pm_tet_identity |
static PointMatrix | pm_prism_identity |
static PointMatrix | pm_hex_identity |
static GeomInfo | GI [Geometry::NumGeom] |
Friends | |
class | Mesh |
class | ParNCMesh |
struct | MatrixMap |
struct | PointMatrixHash |
A class for non-conforming AMR on higher-order hexahedral, prismatic, quadrilateral or triangular meshes.
The class is used as follows:
Definition at line 102 of file ncmesh.hpp.
|
protected |
Definition at line 483 of file ncmesh.hpp.
|
protected |
Definition at line 482 of file ncmesh.hpp.
|
protected |
Definition at line 480 of file ncmesh.hpp.
|
protected |
Definition at line 481 of file ncmesh.hpp.
|
protected |
Definition at line 479 of file ncmesh.hpp.
typedef int64_t mfem::NCMesh::RefCoord |
Definition at line 371 of file ncmesh.hpp.
|
protected |
Definition at line 806 of file ncmesh.hpp.
|
explicit |
Initialize with elements from 'mesh'. If an already nonconforming mesh is being loaded, 'vertex_parents' must point to a stream at the appropriate section of the mesh file which contains the vertex hierarchy.
Definition at line 72 of file ncmesh.cpp.
mfem::NCMesh::NCMesh | ( | const NCMesh & | other | ) |
Definition at line 197 of file ncmesh.cpp.
|
virtual |
Definition at line 234 of file ncmesh.cpp.
|
inlineprotected |
Definition at line 545 of file ncmesh.hpp.
|
protectedvirtual |
Reimplemented in mfem::ParNCMesh.
Definition at line 1927 of file ncmesh.cpp.
|
protectedvirtual |
Reimplemented in mfem::ParNCMesh.
Definition at line 2742 of file ncmesh.cpp.
|
protected |
Definition at line 3063 of file ncmesh.cpp.
|
protectedvirtual |
Reimplemented in mfem::ParNCMesh.
Definition at line 2622 of file ncmesh.cpp.
|
protectedvirtual |
Reimplemented in mfem::ParNCMesh.
Definition at line 2848 of file ncmesh.cpp.
|
protected |
Definition at line 2013 of file ncmesh.cpp.
|
protected |
Definition at line 756 of file ncmesh.cpp.
|
protected |
Definition at line 731 of file ncmesh.cpp.
|
virtual |
Check derefinements returned by GetDerefinementTable and mark those that can be done safely so that the maximum NC level condition is not violated. On return, level_ok.Size() == deref_table.Size() and contains 0/1s.
Reimplemented in mfem::ParNCMesh.
Definition at line 1757 of file ncmesh.cpp.
|
protected |
Definition at line 851 of file ncmesh.cpp.
void mfem::NCMesh::ClearTransforms | ( | ) |
Free all internal data created by the above three functions.
Definition at line 4233 of file ncmesh.cpp.
|
protected |
Definition at line 1709 of file ncmesh.cpp.
|
protected |
Definition at line 2993 of file ncmesh.cpp.
|
protected |
Definition at line 3444 of file ncmesh.cpp.
|
protected |
Definition at line 1874 of file ncmesh.cpp.
|
protected |
Definition at line 3029 of file ncmesh.cpp.
|
protected |
Definition at line 3005 of file ncmesh.cpp.
|
protected |
Definition at line 5071 of file ncmesh.cpp.
|
protected |
Definition at line 4833 of file ncmesh.cpp.
void mfem::NCMesh::DebugDump | ( | std::ostream & | out | ) | const |
Definition at line 5351 of file ncmesh.cpp.
void mfem::NCMesh::DebugLeafOrder | ( | std::ostream & | out | ) | const |
Definition at line 5326 of file ncmesh.cpp.
|
protected |
Definition at line 400 of file ncmesh.cpp.
|
virtual |
Perform a subset of the possible derefinements (see GetDerefinementTable). Note that if anisotropic refinements are present in the mesh, some of the derefinements may have to be skipped to preserve mesh consistency.
Reimplemented in mfem::ParNCMesh.
Definition at line 1786 of file ncmesh.cpp.
|
protected |
Definition at line 1583 of file ncmesh.cpp.
|
inline |
Definition at line 114 of file ncmesh.hpp.
|
protected |
Definition at line 4782 of file ncmesh.cpp.
|
inlineprotectedvirtual |
Reimplemented in mfem::ParNCMesh.
Definition at line 655 of file ncmesh.hpp.
|
inlineprotectedvirtual |
Reimplemented in mfem::ParNCMesh.
Definition at line 654 of file ncmesh.hpp.
|
inlineprotectedvirtual |
Reimplemented in mfem::ParNCMesh.
Definition at line 656 of file ncmesh.hpp.
|
staticprotected |
Definition at line 2280 of file ncmesh.cpp.
|
staticprotected |
Definition at line 2298 of file ncmesh.cpp.
|
staticprotected |
Definition at line 2260 of file ncmesh.cpp.
|
protected |
Definition at line 684 of file ncmesh.cpp.
|
protected |
Definition at line 4685 of file ncmesh.cpp.
|
protected |
Definition at line 281 of file ncmesh.cpp.
|
protected |
Return all vertex-, edge- and face-neighbors of a single element. You can limit the number of elements being checked using 'search_set'. The complexity of the function is linear in the size of the search set.
Definition at line 3246 of file ncmesh.cpp.
|
protected |
Extended version of find_node: works if 'el' is refined.
Definition at line 2270 of file ncmesh.cpp.
|
protected |
Return all vertex-, edge- and face-neighbors of a set of elements. The neighbors are returned as a list (neighbors != NULL), as a set (neighbor_set != NULL), or both. The sizes of the set arrays must match that of leaf_elements. The function is intended to be used for large sets of elements and its complexity is linear in the number of leaf elements in the mesh.
Definition at line 3143 of file ncmesh.cpp.
|
protected |
Return elements neighboring to a local vertex of element 'elem'. Only elements from within the same refinement tree ('cousins') are returned. Complexity is proportional to the depth of elem's refinement tree.
Definition at line 3467 of file ncmesh.cpp.
|
protected |
Definition at line 626 of file ncmesh.cpp.
|
inlineprotected |
Definition at line 556 of file ncmesh.hpp.
|
virtual |
Get a list of vertices (2D/3D) and edges (3D) that coincide with boundary elements with the specified attributes (marked in 'bdr_attr_is_ess'). In 3D this function also reveals "hidden" boundary edges. In parallel it helps identifying boundary vertices/edges affected by non-local boundary elements.
Reimplemented in mfem::ParNCMesh.
Definition at line 4709 of file ncmesh.cpp.
const Table & mfem::NCMesh::GetDerefinementTable | ( | ) |
Return a list of derefinement opportunities. Each row of the table contains Mesh indices of existing elements that can be derefined to form a single new coarse element. Row numbers are then passed to Derefine. This function works both in serial and parallel.
Definition at line 1742 of file ncmesh.cpp.
const CoarseFineTransformations & mfem::NCMesh::GetDerefinementTransforms | ( | ) |
After derefinement, calculate the relations of previous fine elements (some of which may no longer exist) to the current leaf elements. Unlike for refinement, Derefine() may only be called once before this function so there is no MarkFineLevel().
Definition at line 4060 of file ncmesh.cpp.
|
inline |
Return the current list of conforming and nonconforming edges.
Definition at line 225 of file ncmesh.hpp.
int mfem::NCMesh::GetEdgeMaster | ( | int | v1, |
int | v2 | ||
) | const |
Given an edge (by its vertex indices v1 and v2) return the first (geometric) parent edge that exists in the Mesh or -1 if there is no such parent.
Definition at line 4629 of file ncmesh.cpp.
|
protected |
Definition at line 4597 of file ncmesh.cpp.
int mfem::NCMesh::GetEdgeNCOrientation | ( | const MeshId & | edge_id | ) | const |
Return "NC" orientation of an edge. As opposed to standard Mesh edge orientation based on vertex IDs, "NC" edge orientation follows the local edge orientation within the element 'edge_id.element' and is thus processor independent. TODO: this seems only partially true?
Definition at line 4547 of file ncmesh.cpp.
void mfem::NCMesh::GetEdgeVertices | ( | const MeshId & | edge_id, |
int | vert_index[2], | ||
bool | oriented = true |
||
) | const |
Return Mesh vertex indices of an edge identified by 'edge_id'.
Definition at line 4528 of file ncmesh.cpp.
int mfem::NCMesh::GetElementDepth | ( | int | i | ) | const |
Return the distance of leaf 'i' from the root.
Definition at line 4638 of file ncmesh.cpp.
void mfem::NCMesh::GetElementFacesAttributes | ( | int | i, |
Array< int > & | faces, | ||
Array< int > & | fattr | ||
) | const |
Return the faces and face attributes of leaf element 'i'.
Definition at line 4664 of file ncmesh.cpp.
|
inline |
Return element geometry type. index is the Mesh element number.
Definition at line 323 of file ncmesh.hpp.
int mfem::NCMesh::GetElementSizeReduction | ( | int | i | ) | const |
Return the size reduction compared to the root element (ignoring local stretching and curvature).
Definition at line 4650 of file ncmesh.cpp.
|
protected |
Definition at line 425 of file ncmesh.cpp.
|
inline |
Return face geometry type. index is the Mesh face number.
Definition at line 327 of file ncmesh.hpp.
|
inline |
Return the current list of conforming and nonconforming faces.
Definition at line 218 of file ncmesh.hpp.
int mfem::NCMesh::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'. The return value is the number of face vertices.
Definition at line 4559 of file ncmesh.cpp.
|
staticprotected |
Definition at line 3528 of file ncmesh.cpp.
|
protected |
Definition at line 4916 of file ncmesh.cpp.
|
protected |
Fill Mesh::{vertices,elements,boundary} for the current finest level.
Definition at line 2042 of file ncmesh.cpp.
|
protected |
Definition at line 297 of file ncmesh.cpp.
|
protected |
Definition at line 304 of file ncmesh.cpp.
|
inline |
Return vertex/edge/face list (entity = 0/1/2, respectively).
Definition at line 240 of file ncmesh.hpp.
|
inline |
Definition at line 118 of file ncmesh.hpp.
|
inline |
Definition at line 119 of file ncmesh.hpp.
|
inlineprotectedvirtual |
Reimplemented in mfem::ParNCMesh.
Definition at line 525 of file ncmesh.hpp.
|
inlineprotectedvirtual |
Reimplemented in mfem::ParNCMesh.
Definition at line 526 of file ncmesh.hpp.
|
inline |
Return the number of root elements.
Definition at line 331 of file ncmesh.hpp.
|
inline |
Definition at line 117 of file ncmesh.hpp.
|
protected |
Definition at line 3543 of file ncmesh.cpp.
const CoarseFineTransformations & mfem::NCMesh::GetRefinementTransforms | ( | ) |
After refinement, calculate the relation of each fine element to its parent coarse element. Note that Refine() or LimitNCLevel() can be called multiple times between MarkCoarseLevel() and this function.
Definition at line 4009 of file ncmesh.cpp.
|
inline |
Return a list of vertices (in 'conforming'); this function is provided for uniformity/completeness. Needed in ParNCMesh/ParFESpace.
Definition at line 233 of file ncmesh.hpp.
|
protected |
Definition at line 3396 of file ncmesh.cpp.
|
static |
Return a space filling curve for a rectangular grid of elements. Implemented is a generalized Hilbert curve for arbitrary grid dimensions. If the width is odd, height should be odd too, otherwise one diagonal (vertex-neighbor) step cannot be avoided in the curve. Even dimensions are recommended.
Definition at line 4481 of file ncmesh.cpp.
|
static |
Return a space filling curve for a 3D rectangular grid of elements. The Hilbert-curve-like algorithm works well for even dimensions. For odd width/height/depth it tends to produce some diagonal (edge-neighbor) steps. Even dimensions are recommended.
Definition at line 4496 of file ncmesh.cpp.
|
inlineprotected |
Definition at line 530 of file ncmesh.hpp.
|
inlineprotected |
Definition at line 531 of file ncmesh.hpp.
|
protected |
Definition at line 1822 of file ncmesh.cpp.
|
protected |
Definition at line 213 of file ncmesh.cpp.
|
protected |
Try to find a space-filling curve friendly orientation of the root elements: set 'root_state' based on the ordering of coarse elements. Note that the coarse mesh itself must be ordered as an SFC by e.g. Mesh::GetGeckoElementOrdering.
Definition at line 1936 of file ncmesh.cpp.
|
inlineprotectedvirtual |
Reimplemented in mfem::ParNCMesh.
Definition at line 524 of file ncmesh.hpp.
|
virtual |
Check the mesh and potentially refine some elements so that the maximum difference of refinement levels between adjacent elements is not greater than 'max_nc_level'.
Reimplemented in mfem::ParNCMesh.
Definition at line 4946 of file ncmesh.cpp.
void mfem::NCMesh::LoadCoarseElements | ( | std::istream & | input | ) |
I/O: Load the element refinement hierarchy from a mesh file.
Definition at line 5091 of file ncmesh.cpp.
void mfem::NCMesh::LoadVertexParents | ( | std::istream & | input | ) |
I/O: Load the vertex parent hierarchy from a mesh file. NOTE: called indirectly through the constructor.
Definition at line 4988 of file ncmesh.cpp.
void mfem::NCMesh::MarkCoarseLevel | ( | ) |
Remember the current layer of leaf elements before the mesh is refined. Needed by GetRefinementTransforms(), must be called before Refine().
Definition at line 3963 of file ncmesh.cpp.
long mfem::NCMesh::MemoryUsage | ( | ) | const |
Return total number of bytes allocated.
Definition at line 5224 of file ncmesh.cpp.
|
protected |
Expand a set of elements by all vertex-, edge- and face-neighbors. The output array 'expanded' will contain all items from 'elems' (provided they are in 'search_set') plus their neighbors. The neighbor search can be limited to the optional search set. The complexity is linear in the sum of the sizes of 'elems' and 'search_set'.
Definition at line 3329 of file ncmesh.cpp.
|
protected |
Definition at line 462 of file ncmesh.cpp.
|
protected |
Definition at line 1999 of file ncmesh.cpp.
|
protected |
Definition at line 550 of file ncmesh.cpp.
|
protected |
Definition at line 524 of file ncmesh.cpp.
|
protected |
Definition at line 576 of file ncmesh.cpp.
|
protected |
Definition at line 492 of file ncmesh.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 in mfem::ParNCMesh.
Definition at line 2130 of file ncmesh.cpp.
void mfem::NCMesh::PrintCoarseElements | ( | std::ostream & | out | ) | const |
I/O: Print the "coarse_elements" section of the mesh file (ver. >= 1.1).
Definition at line 5057 of file ncmesh.cpp.
|
protected |
Definition at line 5031 of file ncmesh.cpp.
int mfem::NCMesh::PrintMemoryDetail | ( | ) | const |
Definition at line 5246 of file ncmesh.cpp.
void mfem::NCMesh::PrintStats | ( | std::ostream & | out = mfem::out | ) | const |
Definition at line 5272 of file ncmesh.cpp.
void mfem::NCMesh::PrintVertexParents | ( | std::ostream & | out | ) | const |
I/O: Print the "vertex_parents" section of the mesh file (ver. >= 1.1).
Definition at line 4961 of file ncmesh.cpp.
|
protected |
Definition at line 4806 of file ncmesh.cpp.
|
protected |
Definition at line 2196 of file ncmesh.cpp.
|
protected |
Definition at line 312 of file ncmesh.cpp.
|
virtual |
Perform the given batch of refinements. Please note that in the presence of anisotropic splits additional refinements may be necessary to keep the mesh consistent. However, the function always performs at least the requested refinements.
Reimplemented in mfem::ParNCMesh.
Definition at line 1501 of file ncmesh.cpp.
|
protected |
Definition at line 868 of file ncmesh.cpp.
|
protected |
Definition at line 386 of file ncmesh.cpp.
|
protected |
Definition at line 2376 of file ncmesh.cpp.
|
protected |
Definition at line 265 of file ncmesh.cpp.
|
protected |
Return el.node[index] correctly, even if the element is refined.
Definition at line 1547 of file ncmesh.cpp.
|
protected |
Definition at line 1837 of file ncmesh.cpp.
void mfem::NCMesh::SetVertexPositions | ( | const Array< mfem::Vertex > & | vertices | ) |
I/O: Set positions of all vertices (used by mesh loader).
Definition at line 5010 of file ncmesh.cpp.
|
inline |
Definition at line 115 of file ncmesh.hpp.
|
protected |
Definition at line 2714 of file ncmesh.cpp.
|
protected |
Definition at line 2407 of file ncmesh.cpp.
|
protected |
Definition at line 3977 of file ncmesh.cpp.
|
protected |
Definition at line 2526 of file ncmesh.cpp.
|
protected |
Definition at line 2563 of file ncmesh.cpp.
|
protected |
Definition at line 2243 of file ncmesh.cpp.
|
protected |
Definition at line 4789 of file ncmesh.cpp.
|
virtual |
Save memory by releasing all non-essential and cached data.
Reimplemented in mfem::ParNCMesh.
Definition at line 5184 of file ncmesh.cpp.
|
protected |
Definition at line 343 of file ncmesh.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 in mfem::ParNCMesh.
Definition at line 222 of file ncmesh.cpp.
|
inlineprotected |
Definition at line 694 of file ncmesh.hpp.
|
protected |
Definition at line 1916 of file ncmesh.cpp.
|
protectedvirtual |
update Vertex::index and vertex_nodeId
Reimplemented in mfem::ParNCMesh.
Definition at line 1856 of file ncmesh.cpp.
|
friend |
Definition at line 878 of file ncmesh.hpp.
|
friend |
Definition at line 376 of file ncmesh.hpp.
|
friend |
Definition at line 877 of file ncmesh.hpp.
|
friend |
Definition at line 879 of file ncmesh.hpp.
|
protected |
subset of all faces, set by BuildFaceList
Definition at line 505 of file ncmesh.hpp.
|
protected |
state of leaf_elements before Refine(), set by MarkCoarseLevel()
Definition at line 815 of file ncmesh.hpp.
|
protected |
possible derefinements, see GetDerefinementTable
Definition at line 540 of file ncmesh.hpp.
|
protected |
Definition at line 388 of file ncmesh.hpp.
|
protected |
lazy-initialized list of edges, see GetEdgeList
Definition at line 502 of file ncmesh.hpp.
|
protected |
leaf-element to vertex table, see FindSetNeighbors
Definition at line 508 of file ncmesh.hpp.
|
protected |
Definition at line 468 of file ncmesh.hpp.
|
protected |
face geometry by face index, set by OnMeshUpdated
Definition at line 506 of file ncmesh.hpp.
|
protected |
lazy-initialized list of faces, see GetFaceList
Definition at line 501 of file ncmesh.hpp.
Definition at line 466 of file ncmesh.hpp.
|
protected |
Definition at line 469 of file ncmesh.hpp.
|
protected |
bit mask of element geometries present, see InitGeomFlags()
Definition at line 390 of file ncmesh.hpp.
|
staticprotected |
Definition at line 869 of file ncmesh.hpp.
|
protected |
true if the mesh only contains isotropic refinements
Definition at line 389 of file ncmesh.hpp.
|
protected |
Definition at line 498 of file ncmesh.hpp.
|
protected |
Definition at line 496 of file ncmesh.hpp.
|
protected |
Definition at line 496 of file ncmesh.hpp.
Definition at line 465 of file ncmesh.hpp.
|
protected |
Definition at line 495 of file ncmesh.hpp.
|
staticprotected |
Definition at line 799 of file ncmesh.hpp.
|
staticprotected |
Definition at line 798 of file ncmesh.hpp.
|
staticprotected |
Definition at line 796 of file ncmesh.hpp.
|
staticprotected |
Definition at line 797 of file ncmesh.hpp.
|
staticprotected |
Definition at line 795 of file ncmesh.hpp.
|
protected |
stack of scheduled refinements (temporary)
Definition at line 536 of file ncmesh.hpp.
scheduled node reparents (tmp)
Definition at line 538 of file ncmesh.hpp.
|
protected |
Initial traversal state (~ element orientation) for each root element NOTE: M = root_state.Size() is the number of root elements. NOTE: the first M items of 'elements' is the coarse mesh.
Definition at line 474 of file ncmesh.hpp.
temporary storage for reparented nodes
Definition at line 537 of file ncmesh.hpp.
|
protected |
dimensions of the elements and the vertex coordinates
Definition at line 388 of file ncmesh.hpp.
|
mutableprotected |
Definition at line 830 of file ncmesh.hpp.
|
protected |
coordinates of top-level vertices (organized as triples)
Definition at line 477 of file ncmesh.hpp.
|
protected |
storage for data returned by Get[De]RefinementTransforms()
Definition at line 812 of file ncmesh.hpp.
|
protected |
lazy-initialized list of vertices, see GetVertexList
Definition at line 503 of file ncmesh.hpp.
|
protected |
Definition at line 499 of file ncmesh.hpp.