MFEM
v3.0
|
A class for non-conforming AMR on higher-order hexahedral, quadrilateral or triangular meshes. More...
#include <ncmesh.hpp>
Classes | |
struct | Dependency |
struct | DofData |
struct | Edge |
struct | Element |
struct | Face |
struct | FineTransform |
struct | Node |
struct | Point |
struct | PointMatrix |
struct | RefCount |
struct | RefStackItem |
struct | Vertex |
Public Member Functions | |
NCMesh (const Mesh *mesh) | |
int | Dimension () const |
void | Refine (const Array< Refinement > &refinements) |
void | LimitNCLevel (int max_level) |
SparseMatrix * | GetInterpolation (FiniteElementSpace *space, SparseMatrix **cR_ptr=NULL) |
void | MarkCoarseLevel () |
void | ClearCoarseLevel () |
Free the internally stored array of coarse leaf elements. More... | |
FineTransform * | GetFineTransforms () |
int | GetEdgeMaster (int v1, int v2) const |
long | MemoryUsage () |
~NCMesh () | |
Protected Types | |
typedef Array< Dependency > | DepList |
Protected Member Functions | |
void | GetVerticesElementsBoundary (Array< mfem::Vertex > &vertices, Array< mfem::Element * > &elements, Array< mfem::Element * > &boundary) |
void | SetEdgeIndicesFromMesh (Mesh *mesh) |
void | SetFaceIndicesFromMesh (Mesh *mesh) |
void | Refine (Element *elem, int ref_type) |
void | UpdateVertices () |
void | GetLeafElements (Element *e) |
void | UpdateLeafElements () |
void | DeleteHierarchy (Element *elem) |
Element * | NewHexahedron (Node *n0, Node *n1, Node *n2, Node *n3, Node *n4, Node *n5, Node *n6, Node *n7, int attr, int fattr0, int fattr1, int fattr2, int fattr3, int fattr4, int fattr5) |
Element * | NewQuadrilateral (Node *n0, Node *n1, Node *n2, Node *n3, int attr, int eattr0, int eattr1, int eattr2, int eattr3) |
Element * | NewTriangle (Node *n0, Node *n1, Node *n2, int attr, int eattr0, int eattr1, int eattr2) |
Vertex * | NewVertex (Node *v1, Node *v2) |
Node * | GetMidEdgeVertex (Node *v1, Node *v2) |
Node * | GetMidEdgeVertexSimple (Node *v1, Node *v2) |
Node * | GetMidFaceVertex (Node *e1, Node *e2, Node *e3, Node *e4) |
int | FaceSplitType (Node *v1, Node *v2, Node *v3, Node *v4, Node *mid[4]=NULL) |
void | ForceRefinement (Node *v1, Node *v2, Node *v3, Node *v4) |
void | CheckAnisoFace (Node *v1, Node *v2, Node *v3, Node *v4, Node *mid12, Node *mid34, int level=0) |
void | CheckIsoFace (Node *v1, Node *v2, Node *v3, Node *v4, Node *e1, Node *e2, Node *e3, Node *e4, Node *midf) |
void | RefElementNodes (Element *elem) |
void | UnrefElementNodes (Element *elem) |
void | RegisterFaces (Element *elem) |
Node * | PeekAltParents (Node *v1, Node *v2) |
bool | NodeSetX1 (Node *node, Node **n) |
bool | NodeSetX2 (Node *node, Node **n) |
bool | NodeSetY1 (Node *node, Node **n) |
bool | NodeSetY2 (Node *node, Node **n) |
bool | NodeSetZ1 (Node *node, Node **n) |
bool | NodeSetZ2 (Node *node, Node **n) |
void | ReorderFacePointMat (Node *v0, Node *v1, Node *v2, Node *v3, Element *elem, DenseMatrix &pm) |
void | AddDependencies (Array< int > &master_dofs, Array< int > &slave_dofs, DenseMatrix &I) |
void | ConstrainEdge (Node *v0, Node *v1, double t0, double t1, Array< int > &master_dofs, int level) |
void | ConstrainFace (Node *v0, Node *v1, Node *v2, Node *v3, const PointMatrix &pm, Array< int > &master_dofs, int level) |
void | ProcessMasterEdge (Node *node[2], Node *edge) |
void | ProcessMasterFace (Node *node[4], Face *face) |
bool | DofFinalizable (DofData &vd) |
void | GetFineTransforms (Element *elem, int coarse_index, FineTransform *transforms, const PointMatrix &pm) |
int | GetEdgeMaster (Node *n) const |
void | FaceSplitLevel (Node *v1, Node *v2, Node *v3, Node *v4, int &h_level, int &v_level) |
void | CountSplits (Element *elem, int splits[3]) |
int | CountElements (Element *elem) |
Static Protected Member Functions | |
static int | find_node (Element *elem, Node *node) |
Protected Attributes | |
int | Dim |
Array< Element * > | root_elements |
Array< Element * > | leaf_elements |
Array< Element * > | coarse_elements |
Array< int > | vertex_nodeId |
HashTable< Node > | nodes |
HashTable< Face > | faces |
Array< RefStackItem > | ref_stack |
stack of scheduled refinements More... | |
DofData * | dof_data |
DOF temporary data. More... | |
FiniteElementSpace * | space |
Friends | |
class | Mesh |
A class for non-conforming AMR on higher-order hexahedral, quadrilateral or triangular meshes.
The class is used as follows:
Definition at line 65 of file ncmesh.hpp.
|
protected |
Definition at line 350 of file ncmesh.hpp.
mfem::NCMesh::NCMesh | ( | const Mesh * | mesh | ) |
Definition at line 61 of file ncmesh.cpp.
mfem::NCMesh::~NCMesh | ( | ) |
Definition at line 151 of file ncmesh.cpp.
|
protected |
Definition at line 1286 of file ncmesh.cpp.
|
protected |
Definition at line 550 of file ncmesh.cpp.
|
protected |
Definition at line 601 of file ncmesh.cpp.
|
inline |
Free the internally stored array of coarse leaf elements.
Definition at line 113 of file ncmesh.hpp.
|
protected |
Definition at line 1313 of file ncmesh.cpp.
|
protected |
Definition at line 1357 of file ncmesh.cpp.
|
protected |
Definition at line 2037 of file ncmesh.cpp.
|
protected |
Definition at line 1986 of file ncmesh.cpp.
|
protected |
Definition at line 157 of file ncmesh.cpp.
|
inline |
Definition at line 70 of file ncmesh.hpp.
|
protected |
Definition at line 1460 of file ncmesh.cpp.
|
protected |
Definition at line 1954 of file ncmesh.cpp.
|
protected |
Definition at line 1196 of file ncmesh.cpp.
Definition at line 1225 of file ncmesh.cpp.
Definition at line 518 of file ncmesh.cpp.
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 1946 of file ncmesh.cpp.
|
protected |
Definition at line 1918 of file ncmesh.cpp.
NCMesh::FineTransform * mfem::NCMesh::GetFineTransforms | ( | ) |
Return an array of structures 'FineTransform', one for each leaf element. This data can be used to transfer functions from a previous coarse level of the mesh (marked with 'MarkCoarseLevel') to a newly refined state of the mesh. NOTE: the caller needs to free the returned array.
Definition at line 1870 of file ncmesh.cpp.
|
protected |
Definition at line 1627 of file ncmesh.cpp.
SparseMatrix * mfem::NCMesh::GetInterpolation | ( | FiniteElementSpace * | space, |
SparseMatrix ** | cR_ptr = NULL |
||
) |
Calculate the conforming interpolation matrix P that ties slave DOFs to independent DOFs. P is rectangular with M rows and N columns, where M is the number of DOFs of the nonconforming ('cut') space, and N is the number of independent ('true') DOFs. If x is a solution vector containing the values of the independent DOFs, Px can be used to obtain the values of all DOFs, including the slave DOFs.
Definition at line 1470 of file ncmesh.cpp.
|
protected |
Definition at line 1068 of file ncmesh.cpp.
|
protected |
Definition at line 463 of file ncmesh.cpp.
|
protected |
Definition at line 472 of file ncmesh.cpp.
|
protected |
Definition at line 481 of file ncmesh.cpp.
|
protected |
Definition at line 1092 of file ncmesh.cpp.
void mfem::NCMesh::LimitNCLevel | ( | int | max_level | ) |
Derefine – not implemented yet Check mesh and potentially refine some elements so that the maximum level of hanging nodes is not greater than 'max_level'.
Definition at line 2007 of file ncmesh.cpp.
|
inline |
Store the current layer of leaf elements before the mesh is refined. This is later used by 'GetFineTransforms' to determine the relations of the coarse and refined elements.
Definition at line 110 of file ncmesh.hpp.
long mfem::NCMesh::MemoryUsage | ( | ) |
Return total number of bytes allocated.
Definition at line 2049 of file ncmesh.cpp.
|
protected |
Definition at line 371 of file ncmesh.cpp.
|
protected |
Definition at line 399 of file ncmesh.cpp.
|
protected |
Definition at line 426 of file ncmesh.cpp.
|
protected |
Definition at line 450 of file ncmesh.cpp.
Definition at line 499 of file ncmesh.cpp.
Definition at line 502 of file ncmesh.cpp.
Definition at line 505 of file ncmesh.cpp.
Definition at line 508 of file ncmesh.cpp.
Definition at line 511 of file ncmesh.cpp.
Definition at line 514 of file ncmesh.cpp.
|
protected |
Definition at line 309 of file ncmesh.cpp.
Definition at line 1426 of file ncmesh.cpp.
Definition at line 1444 of file ncmesh.cpp.
|
protected |
Definition at line 209 of file ncmesh.cpp.
void mfem::NCMesh::Refine | ( | const Array< Refinement > & | refinements | ) |
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 performas at least the requested refinements.
Definition at line 1005 of file ncmesh.cpp.
|
protected |
Definition at line 616 of file ncmesh.cpp.
|
protected |
Definition at line 282 of file ncmesh.cpp.
|
protected |
Definition at line 1251 of file ncmesh.cpp.
|
protected |
Definition at line 1166 of file ncmesh.cpp.
|
protected |
Definition at line 1180 of file ncmesh.cpp.
|
protected |
Definition at line 235 of file ncmesh.cpp.
|
protected |
Definition at line 1084 of file ncmesh.cpp.
|
protected |
Definition at line 1050 of file ncmesh.cpp.
|
friend |
Definition at line 142 of file ncmesh.hpp.
Definition at line 268 of file ncmesh.hpp.
|
protected |
Definition at line 147 of file ncmesh.hpp.
|
protected |
DOF temporary data.
Definition at line 363 of file ncmesh.hpp.
Definition at line 273 of file ncmesh.hpp.
Definition at line 267 of file ncmesh.hpp.
Definition at line 272 of file ncmesh.hpp.
|
protected |
stack of scheduled refinements
Definition at line 284 of file ncmesh.hpp.
Definition at line 266 of file ncmesh.hpp.
|
protected |
Definition at line 365 of file ncmesh.hpp.
|
protected |
Definition at line 270 of file ncmesh.hpp.