MFEM  v3.3.2
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
mfem::Mesh Class Reference

#include <mesh.hpp>

Inheritance diagram for mfem::Mesh:
[legend]
Collaboration diagram for mfem::Mesh:
[legend]

Classes

struct  FaceInfo
 
struct  NCFaceInfo
 

Public Types

enum  Operation { NONE, REFINE, DEREFINE, REBALANCE }
 
typedef Geometry::Constants
< Geometry::SEGMENT
seg_t
 
typedef Geometry::Constants
< Geometry::TRIANGLE
tri_t
 
typedef Geometry::Constants
< Geometry::SQUARE
quad_t
 
typedef Geometry::Constants
< Geometry::TETRAHEDRON
tet_t
 
typedef Geometry::Constants
< Geometry::CUBE
hex_t
 

Public Member Functions

 Mesh ()
 
 Mesh (const Mesh &mesh, bool copy_nodes=true)
 
 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...
 
void FinalizeTopology ()
 Finalize the construction of the secondary topology (connectivity) data of a Mesh. More...
 
void Finalize (bool refine=false, bool fix_orientation=false)
 Finalize the construction of a general Mesh. More...
 
void SetAttributes ()
 
void GetGeckoElementReordering (Array< int > &ordering)
 
void ReorderElements (const Array< int > &ordering, bool reorder_vertices=true)
 
 Mesh (int nx, int ny, int nz, Element::Type type, int generate_edges=0, double sx=1.0, double sy=1.0, double sz=1.0)
 
 Mesh (int nx, int ny, Element::Type type, int generate_edges=0, double sx=1.0, double sy=1.0)
 
 Mesh (int n, double sx=1.0)
 
 Mesh (const char *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)
 Create a disjoint mesh from the given mesh array. More...
 
 Mesh (Mesh *orig_mesh, int ref_factor, int ref_type)
 Create a uniformly refined (by any factor) version of orig_mesh. More...
 
virtual void Load (std::istream &input, int generate_edges=0, int refine=1, bool fix_orientation=true)
 
void Clear ()
 Clear the contents of the Mesh. More...
 
int MeshGenerator ()
 Get the mesh generator/type. More...
 
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...
 
virtual long ReduceInt (int value) const
 Utility function: sum integers from all processors (Allreduce). More...
 
long GetGlobalNE () const
 Return the total (global) number of elements. More...
 
int EulerNumber () const
 Equals 1 + num_holes - num_loops. More...
 
int EulerNumber2D () const
 Equals 1 - num_holes. More...
 
int Dimension () const
 
int SpaceDimension () const
 
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...
 
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
 
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...
 
const Element *const * GetElementsArray () const
 
const ElementGetElement (int i) const
 
ElementGetElement (int i)
 
const ElementGetBdrElement (int i) const
 
ElementGetBdrElement (int i)
 
const ElementGetFace (int i) const
 
int GetFaceBaseGeometry (int i) const
 
int GetElementBaseGeometry (int i=0) const
 
int GetBdrElementBaseGeometry (int i=0) const
 
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 > &, Array< int > &) 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...
 
TableGetFaceEdgeTable () const
 Returns the face-to-edge Table (3D) More...
 
TableGetEdgeVertexTable () const
 Returns the edge-to-vertex Table (3D) More...
 
void GetElementFaces (int i, Array< int > &, Array< int > &) const
 Return the indices and the orientations of all faces of element i. More...
 
void GetBdrElementFace (int i, int *, int *) 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...
 
int GetElementType (int i) const
 Returns the type of element i. More...
 
int GetBdrElementType (int i) const
 Returns the type of boundary element i. More...
 
void GetPointMatrix (int i, DenseMatrix &pointmat) const
 
void GetBdrPointMatrix (int i, DenseMatrix &pointmat) const
 
void GetElementTransformation (int i, IsoparametricTransformation *ElTr)
 
ElementTransformationGetElementTransformation (int i)
 Returns the transformation defining the i-th element. More...
 
void GetElementTransformation (int i, const Vector &nodes, IsoparametricTransformation *ElTr)
 
ElementTransformationGetBdrElementTransformation (int i)
 Returns the transformation defining the i-th boundary element. More...
 
void GetBdrElementTransformation (int i, IsoparametricTransformation *ElTr)
 
void GetFaceTransformation (int i, IsoparametricTransformation *FTr)
 
ElementTransformationGetFaceTransformation (int FaceNo)
 Returns the transformation defining the given face element. More...
 
void GetEdgeTransformation (int i, IsoparametricTransformation *EdTr)
 
ElementTransformationGetEdgeTransformation (int EdgeNo)
 Returns the transformation defining the given face element. More...
 
FaceElementTransformationsGetFaceElementTransformations (int FaceNo, int mask=31)
 
FaceElementTransformationsGetInteriorFaceTransformations (int FaceNo)
 
FaceElementTransformationsGetBdrFaceTransformations (int BdrElemNo)
 
bool FaceIsInterior (int FaceNo) const
 Return true if the given face is interior. More...
 
void GetFaceElements (int Face, int *Elem1, int *Elem2)
 
void GetFaceInfos (int Face, int *Inf1, int *Inf2)
 
int GetFaceGeometryType (int Face) const
 
int GetFaceElementType (int Face) const
 
int CheckElementOrientation (bool fix_it=true)
 Check the orientation of the elements. More...
 
int CheckBdrElementOrientation (bool fix_it=true)
 Check the orientation of the boundary elements. More...
 
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...
 
const TableElementToElementTable ()
 
const TableElementToFaceTable () const
 
const TableElementToEdgeTable () const
 
TableGetVertexToElementTable ()
 The returned Table must be destroyed by the caller. More...
 
TableGetFaceToElementTable () const
 
virtual void ReorientTetMesh ()
 
int * CartesianPartitioning (int nxyz[])
 
int * GeneratePartitioning (int nparts, int part_method=1)
 
void CheckPartitioning (int *partitioning)
 
void CheckDisplacements (const Vector &displacements, double &tmax)
 
void MoveVertices (const Vector &displacements)
 
void GetVertices (Vector &vert_coord) const
 
void SetVertices (const Vector &vert_coord)
 
void GetNode (int i, double *coord)
 
void SetNode (int i, const double *coord)
 
void MoveNodes (const Vector &displacements)
 
void GetNodes (Vector &node_coord) const
 
void SetNodes (const Vector &node_coord)
 
GridFunctionGetNodes ()
 Return a pointer to the internal node GridFunction (may be NULL). More...
 
const GridFunctionGetNodes () 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_)
 
void GetNodes (GridFunction &nodes) const
 Return the mesh nodes/vertices projected on the given GridFunction. More...
 
void SetNodalFESpace (FiniteElementSpace *nfes)
 
void SetNodalGridFunction (GridFunction *nodes, bool make_owner=false)
 
const FiniteElementSpaceGetNodalFESpace () const
 
void SetCurvature (int order, bool discont=false, int space_dim=-1, int ordering=1)
 
void UniformRefinement ()
 
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 triangles_nonconforming=false)
 
bool Conforming () const
 
bool Nonconforming () const
 
const CoarseFineTransformationsGetRefinementTransforms ()
 
Operation GetLastOperation () const
 Return type of last modification of the mesh. More...
 
long GetSequence () const
 
virtual void PrintXG (std::ostream &out=mfem::out) const
 Print the mesh to the given stream using Netgen/Truegrid format. More...
 
virtual void Print (std::ostream &out=mfem::out) const
 
void PrintVTK (std::ostream &out)
 
void PrintVTK (std::ostream &out, int ref, int field_data=0)
 
void GetElementColoring (Array< int > &colors, int el0=0)
 
void PrintWithPartitioning (int *partitioning, std::ostream &out, int elem_attr=0) const
 
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 ScaleSubdomains (double sf)
 
void ScaleElements (double sf)
 
void Transform (void(*f)(const Vector &, Vector &))
 
void Transform (VectorCoefficient &deformation)
 
void RemoveUnusedVertices ()
 Remove unused vertices and rebuild mesh connectivity. More...
 
void RemoveInternalBoundaries ()
 
double GetElementSize (int i, int type=0)
 
double GetElementSize (int i, const Vector &dir)
 
double GetElementVolume (int i)
 
void GetBoundingBox (Vector &min, Vector &max, int ref=2)
 
void GetCharacteristics (double &h_min, double &h_max, double &kappa_min, double &kappa_max, Vector *Vh=NULL, Vector *Vk=NULL)
 
void PrintCharacteristics (Vector *Vh=NULL, Vector *Vk=NULL, std::ostream &out=mfem::out)
 
virtual void PrintInfo (std::ostream &out=mfem::out)
 
void MesquiteSmooth (const int mesquite_option=0)
 
virtual int FindPoints (DenseMatrix &point_mat, Array< int > &elem_ids, Array< IntegrationPoint > &ips, bool warn=true, InverseElementTransformation *inv_trans=NULL)
 Find the ids of the elements that contain the given points, and their corresponding reference coordinates. More...
 
virtual ~Mesh ()
 Destroys Mesh. More...
 
Methods for Mesh construction.

These methods are intended to be used with the init constructor.

ElementNewElement (int geom)
 
void AddVertex (const double *)
 
void AddTri (const int *vi, int attr=1)
 
void AddTriangle (const int *vi, int attr=1)
 
void AddQuad (const int *vi, int attr=1)
 
void AddTet (const int *vi, int attr=1)
 
void AddHex (const int *vi, int attr=1)
 
void AddHexAsTets (const int *vi, int attr=1)
 
void AddElement (Element *elem)
 
void AddBdrElement (Element *elem)
 
void AddBdrSegment (const int *vi, int attr=1)
 
void AddBdrTriangle (const int *vi, int attr=1)
 
void AddBdrQuad (const int *vi, int attr=1)
 
void AddBdrQuadAsTriangles (const int *vi, 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 FinalizeHexMesh (int generate_edges=0, int refine=0, bool fix_orientation=true)
 Finalize the construction of a hexahedral Mesh. More...
 
NURBS mesh refinement methods
void KnotInsert (Array< KnotVector * > &kv)
 
void DegreeElevate (int t)
 

Static Public Member Functions

static FiniteElementGetTransformationFEforElementType (int)
 

Public Attributes

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...
 
NURBSExtensionNURBSext
 Optional NURBS mesh extension. More...
 
NCMeshncmesh
 Optional non-conforming mesh extension. More...
 

Protected Member Functions

void Init ()
 
void InitTables ()
 
void SetEmpty ()
 
void DestroyTables ()
 
void DeleteTables ()
 
void DestroyPointers ()
 
void Destroy ()
 
ElementReadElementWithoutAttr (std::istream &)
 
ElementReadElement (std::istream &)
 
void ReadMFEMMesh (std::istream &input, bool mfem_v11, 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 ReadVTKMesh (std::istream &input, int &curved, int &read_gf)
 
void ReadNURBSMesh (std::istream &input, int &curved, int &read_gf)
 
void ReadInlineMesh (std::istream &input, int generate_edges=0)
 
void ReadGmshMesh (std::istream &input)
 
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 GetElementJacobian (int i, DenseMatrix &J)
 
void MarkForRefinement ()
 
void MarkTriMeshForRefinement ()
 
void GetEdgeOrdering (DSTable &v_to_v, Array< int > &order)
 
virtual void MarkTetMeshForRefinement (DSTable &v_to_v)
 
void PrepareNodeReorder (DSTable **old_v_to_v, Table **old_elem_vert)
 
void DoNodeReorder (DSTable *old_v_to_v, Table *old_elem_vert)
 
STable3DGetFacesTable ()
 
STable3DGetElementToFaceTable (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 *)
 
void Bisection (int i, const DSTable &, int *)
 
void UniformRefinement (int i, const DSTable &, int *, int *, int *)
 
void AverageVertices (int *indexes, int n, int result)
 
void InitRefinementTransforms ()
 
int FindCoarseElement (int i)
 
void UpdateNodes ()
 Update the nodes of a curved mesh after refinement. More...
 
virtual void QuadUniformRefinement ()
 Refine quadrilateral mesh. More...
 
virtual void HexUniformRefinement ()
 Refine hexahedral mesh. More...
 
virtual void NURBSUniformRefinement ()
 Refine NURBS mesh. More...
 
virtual void LocalRefinement (const Array< int > &marked_el, int type=3)
 This function is not public anymore. Use GeneralRefinement instead. More...
 
virtual void NonconformingRefinement (const Array< Refinement > &refinements, int nc_limit=0)
 This function is not public anymore. Use GeneralRefinement instead. More...
 
virtual bool NonconformingDerefinement (Array< double > &elem_error, double threshold, int nc_limit=0, int op=1)
 NC version of GeneralDerefinement. More...
 
void DerefineMesh (const Array< int > &derefinements)
 Derefine elements once a list of derefinements is known. 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 GetLocalQuadToHexTransformation (IsoparametricTransformation &loc, int i)
 Used in GetFaceElementTransformations (...) More...
 
void GetLocalFaceTransformation (int face_type, int elem_type, IsoparametricTransformation &Transf, int inf)
 Used in GetFaceElementTransformations (...) More...
 
void ApplyLocalSlaveTransformation (IsoparametricTransformation &transf, const FaceInfo &fi)
 
bool IsSlaveFace (const FaceInfo &fi) const
 
void GetVertexToVertexTable (DSTable &) 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 InitBaseGeom ()
 
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, int generate_edges, double sx, double sy, double sz)
 
void Make2D (int nx, int ny, Element::Type type, int generate_edges, double sx, double sy)
 
void Make1D (int n, double sx=1.0)
 Creates a 1D mesh for the interval [0,sx] divided into n equal intervals. 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 Swap (Mesh &other, bool non_geometry=false)
 
void GetElementData (const Array< Element * > &elem_array, int geom, Array< int > &elem_vtx, Array< int > &attr) const
 

Static Protected Member Functions

static void PrintElementWithoutAttr (const Element *, std::ostream &)
 
static void PrintElement (const Element *, std::ostream &)
 
static int GetTriOrientation (const int *base, const int *test)
 Returns the orientation of "test" relative to "base". More...
 
static int GetQuadOrientation (const int *base, const int *test)
 Returns the orientation of "test" relative to "base". More...
 
static void GetElementArrayEdgeTable (const Array< Element * > &elem_array, const DSTable &v_to_v, Table &el_to_edge)
 
static void ShiftL2R (int &, int &, int &)
 
static void Rotate3 (int &, int &, int &)
 

Protected Attributes

int Dim
 
int spaceDim
 
int NumOfVertices
 
int NumOfElements
 
int NumOfBdrElements
 
int NumOfEdges
 
int NumOfFaces
 
int BaseGeom
 
int BaseBdrGeom
 
int meshgen
 
long sequence
 
Array< Element * > elements
 
Array< Vertexvertices
 
Array< Element * > boundary
 
Array< Element * > faces
 
Array< FaceInfofaces_info
 
Array< NCFaceInfonc_faces_info
 
Tableel_to_edge
 
Tableel_to_face
 
Tableel_to_el
 
Array< int > be_to_edge
 
Tablebel_to_edge
 
Array< int > be_to_face
 
Tableface_edge
 
Tableedge_vertex
 
IsoparametricTransformation Transformation
 
IsoparametricTransformation Transformation2
 
IsoparametricTransformation FaceTransformation
 
IsoparametricTransformation EdgeTransformation
 
FaceElementTransformations FaceElemTr
 
CoarseFineTransformations CoarseFineTr
 
GridFunctionNodes
 
int own_nodes
 
MemAlloc< Tetrahedron, 1024 > TetMemory
 
Operation last_operation
 

Static Protected Attributes

static const int vtk_quadratic_tet [10]
 
static const int vtk_quadratic_hex [27]
 

Friends

class ParMesh
 
class ParNCMesh
 
class NURBSExtension
 
class Tetrahedron
 

Detailed Description

Definition at line 44 of file mesh.hpp.

Member Typedef Documentation

Definition at line 165 of file mesh.hpp.

Definition at line 163 of file mesh.hpp.

Definition at line 161 of file mesh.hpp.

Definition at line 164 of file mesh.hpp.

Definition at line 162 of file mesh.hpp.

Member Enumeration Documentation

Enumerator
NONE 
REFINE 
DEREFINE 
REBALANCE 

Definition at line 167 of file mesh.hpp.

Constructor & Destructor Documentation

mfem::Mesh::Mesh ( const NCMesh ncmesh)
protected

Create from a nonconforming mesh.

Definition at line 6202 of file mesh.cpp.

mfem::Mesh::Mesh ( )
inline

Definition at line 414 of file mesh.hpp.

mfem::Mesh::Mesh ( const Mesh mesh,
bool  copy_nodes = true 
)
explicit

Copy constructor. Performs a deep copy of (almost) all data, so that the source mesh can be modified (e.g. deleted, refined) without affecting the new mesh. If 'copy_nodes' is false, use a shallow (pointer) copy for the nodes, if present.

Definition at line 2293 of file mesh.cpp.

mfem::Mesh::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.

The array vertices is used as external data, i.e. the Mesh does not copy the data and will not delete the pointer.

The data from the other arrays is copied into the internal Mesh data structures.

This method calls the method FinalizeTopology(). The method Finalize() may be called after this constructor and after optionally setting the Mesh nodes.

Definition at line 2448 of file mesh.cpp.

mfem::Mesh::Mesh ( int  _Dim,
int  NVert,
int  NElem,
int  NBdrElem = 0,
int  _spaceDim = -1 
)
inline

Init constructor: begin the construction of a Mesh object.

Definition at line 441 of file mesh.hpp.

mfem::Mesh::Mesh ( int  nx,
int  ny,
int  nz,
Element::Type  type,
int  generate_edges = 0,
double  sx = 1.0,
double  sy = 1.0,
double  sz = 1.0 
)
inline

Creates mesh for the parallelepiped [0,sx]x[0,sy]x[0,sz], divided into nx*ny*nz hexahedrals if type=HEXAHEDRON or into 6*nx*ny*nz tetrahedrons if type=TETRAHEDRON. If generate_edges = 0 (default) edges are not generated, if 1 edges are generated.

Definition at line 535 of file mesh.hpp.

mfem::Mesh::Mesh ( int  nx,
int  ny,
Element::Type  type,
int  generate_edges = 0,
double  sx = 1.0,
double  sy = 1.0 
)
inline

Creates mesh for the rectangle [0,sx]x[0,sy], divided into nx*ny quadrilaterals if type = QUADRILATERAL or into 2*nx*ny triangles if type = TRIANGLE. If generate_edges = 0 (default) edges are not generated, if 1 edges are generated.

Definition at line 545 of file mesh.hpp.

mfem::Mesh::Mesh ( int  n,
double  sx = 1.0 
)
inlineexplicit

Creates 1D mesh , divided into n equal intervals.

Definition at line 552 of file mesh.hpp.

mfem::Mesh::Mesh ( const char *  filename,
int  generate_edges = 0,
int  refine = 1,
bool  fix_orientation = true 
)

Creates mesh by reading a file in MFEM, netgen, or VTK format. If generate_edges = 0 (default) edges are not generated, if 1 edges are generated.

Definition at line 2399 of file mesh.cpp.

mfem::Mesh::Mesh ( std::istream &  input,
int  generate_edges = 0,
int  refine = 1,
bool  fix_orientation = true 
)

Creates mesh by reading data stream in MFEM, netgen, or VTK format. If generate_edges = 0 (default) edges are not generated, if 1 edges are generated.

Definition at line 2417 of file mesh.cpp.

mfem::Mesh::Mesh ( Mesh mesh_array[],
int  num_pieces 
)

Create a disjoint mesh from the given mesh array.

Definition at line 2739 of file mesh.cpp.

mfem::Mesh::Mesh ( Mesh orig_mesh,
int  ref_factor,
int  ref_type 
)

Create a uniformly refined (by any factor) version of orig_mesh.

Parameters
[in]orig_meshThe starting coarse mesh.
[in]ref_factorThe refinement factor, an integer > 1.
[in]ref_typeSpecify 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.

Note
The constructed Mesh is linear, i.e. it does not have nodes.

Definition at line 2918 of file mesh.cpp.

virtual mfem::Mesh::~Mesh ( )
inlinevirtual

Destroys Mesh.

Definition at line 1121 of file mesh.hpp.

Member Function Documentation

void mfem::Mesh::AddBdrElement ( Element elem)
inline

Definition at line 467 of file mesh.hpp.

void mfem::Mesh::AddBdrQuad ( const int *  vi,
int  attr = 1 
)

Definition at line 1013 of file mesh.cpp.

void mfem::Mesh::AddBdrQuadAsTriangles ( const int *  vi,
int  attr = 1 
)

Definition at line 1018 of file mesh.cpp.

void mfem::Mesh::AddBdrSegment ( const int *  vi,
int  attr = 1 
)

Definition at line 1003 of file mesh.cpp.

void mfem::Mesh::AddBdrTriangle ( const int *  vi,
int  attr = 1 
)

Definition at line 1008 of file mesh.cpp.

void mfem::Mesh::AddElement ( Element elem)
inline

Definition at line 466 of file mesh.hpp.

void mfem::Mesh::AddHex ( const int *  vi,
int  attr = 1 
)

Definition at line 979 of file mesh.cpp.

void mfem::Mesh::AddHexAsTets ( const int *  vi,
int  attr = 1 
)

Definition at line 984 of file mesh.cpp.

void mfem::Mesh::AddPointFaceElement ( int  lf,
int  gf,
int  el 
)
protected

Used in GenerateFaces()

Definition at line 4186 of file mesh.cpp.

void mfem::Mesh::AddQuad ( const int *  vi,
int  attr = 1 
)

Definition at line 961 of file mesh.cpp.

void mfem::Mesh::AddQuadFaceElement ( int  lf,
int  gf,
int  el,
int  v0,
int  v1,
int  v2,
int  v3 
)
protected

Definition at line 4254 of file mesh.cpp.

void mfem::Mesh::AddSegmentFaceElement ( int  lf,
int  gf,
int  el,
int  v0,
int  v1 
)
protected

Definition at line 4203 of file mesh.cpp.

void mfem::Mesh::AddTet ( const int *  vi,
int  attr = 1 
)

Definition at line 966 of file mesh.cpp.

void mfem::Mesh::AddTri ( const int *  vi,
int  attr = 1 
)

Definition at line 951 of file mesh.cpp.

void mfem::Mesh::AddTriangle ( const int *  vi,
int  attr = 1 
)

Definition at line 956 of file mesh.cpp.

void mfem::Mesh::AddTriangleFaceElement ( int  lf,
int  gf,
int  el,
int  v0,
int  v1,
int  v2 
)
protected

Definition at line 4233 of file mesh.cpp.

void mfem::Mesh::AddVertex ( const double *  x)

Definition at line 940 of file mesh.cpp.

void mfem::Mesh::ApplyLocalSlaveTransformation ( IsoparametricTransformation transf,
const FaceInfo fi 
)
protected

Used in GetFaceElementTransformations to account for the fact that a slave face occupies only a portion of its master face.

Definition at line 703 of file mesh.cpp.

void mfem::Mesh::AverageVertices ( int *  indexes,
int  n,
int  result 
)
protected

Averages the vertices with given indexes and saves the result in vertices[result].

Definition at line 5449 of file mesh.cpp.

void mfem::Mesh::Bisection ( int  i,
const DSTable v_to_v,
int *  edge1,
int *  edge2,
int *  middle 
)
protected

Bisection. Element with index i is bisected.

Definition at line 6475 of file mesh.cpp.

void mfem::Mesh::Bisection ( int  i,
const DSTable v_to_v,
int *  middle 
)
protected

Bisection. Boundary element with index i is bisected.

Definition at line 6682 of file mesh.cpp.

int * mfem::Mesh::CartesianPartitioning ( int  nxyz[])

Definition at line 4574 of file mesh.cpp.

void mfem::Mesh::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.

If zerocopy is true, the vertices must be given as an array of 3 doubles per vertex. If zerocopy is false then the current Vertex data is first copied to the vertices array.

Definition at line 2424 of file mesh.cpp.

int mfem::Mesh::CheckBdrElementOrientation ( bool  fix_it = true)

Check the orientation of the boundary elements.

Returns
The number of boundary elements with wrong orientation.

Definition at line 3556 of file mesh.cpp.

void mfem::Mesh::CheckDisplacements ( const Vector displacements,
double &  tmax 
)

Definition at line 5244 of file mesh.cpp.

int mfem::Mesh::CheckElementOrientation ( bool  fix_it = true)

Check the orientation of the elements.

Returns
The number of elements with wrong orientation.

Definition at line 3349 of file mesh.cpp.

void mfem::Mesh::CheckPartitioning ( int *  partitioning)

Definition at line 4926 of file mesh.cpp.

void mfem::Mesh::Clear ( )
inline

Clear the contents of the Mesh.

Definition at line 599 of file mesh.hpp.

bool mfem::Mesh::Conforming ( ) const
inline

Definition at line 998 of file mesh.hpp.

void mfem::Mesh::DegreeElevate ( int  t)

Definition at line 3075 of file mesh.cpp.

void mfem::Mesh::DeleteTables ( )
inlineprotected

Definition at line 184 of file mesh.hpp.

bool mfem::Mesh::DerefineByError ( Array< double > &  elem_error,
double  threshold,
int  nc_limit = 0,
int  op = 1 
)

Derefine the mesh based on an error measure associated with each element. A derefinement is performed if the sum of errors of its fine elements is smaller than 'threshold'. If 'nc_limit' > 0, derefinements that would increase the maximum level of hanging nodes of the mesh are skipped. Returns true if the mesh changed, false otherwise.

Definition at line 6123 of file mesh.cpp.

bool mfem::Mesh::DerefineByError ( const Vector elem_error,
double  threshold,
int  nc_limit = 0,
int  op = 1 
)

Same as DerefineByError for an error vector.

Definition at line 6140 of file mesh.cpp.

void mfem::Mesh::DerefineMesh ( const Array< int > &  derefinements)
protected

Derefine elements once a list of derefinements is known.

Definition at line 6052 of file mesh.cpp.

void mfem::Mesh::Destroy ( )
protected

Definition at line 841 of file mesh.cpp.

void mfem::Mesh::DestroyPointers ( )
protected

Definition at line 815 of file mesh.cpp.

void mfem::Mesh::DestroyTables ( )
protected

Definition at line 800 of file mesh.cpp.

int mfem::Mesh::Dimension ( ) const
inline

Definition at line 641 of file mesh.hpp.

void mfem::Mesh::DoNodeReorder ( DSTable old_v_to_v,
Table old_elem_vert 
)
protected

Definition at line 1463 of file mesh.cpp.

const Table & mfem::Mesh::ElementToEdgeTable ( ) const

Definition at line 4177 of file mesh.cpp.

const Table & mfem::Mesh::ElementToElementTable ( )

Definition at line 4132 of file mesh.cpp.

const Table & mfem::Mesh::ElementToFaceTable ( ) const

Definition at line 4168 of file mesh.cpp.

void mfem::Mesh::EnsureNCMesh ( bool  triangles_nonconforming = false)

Make sure that a quad/hex mesh is considered to be non-conforming (i.e., has an associated NCMesh object). Triangles meshes can be both conforming (default) or non-conforming.

Definition at line 6384 of file mesh.cpp.

int mfem::Mesh::EulerNumber ( ) const
inline

Equals 1 + num_holes - num_loops.

Definition at line 635 of file mesh.hpp.

int mfem::Mesh::EulerNumber2D ( ) const
inline

Equals 1 - num_holes.

Definition at line 638 of file mesh.hpp.

bool mfem::Mesh::FaceIsInterior ( int  FaceNo) const
inline

Return true if the given face is interior.

See Also
FaceIsTrueInterior().

Definition at line 831 of file mesh.hpp.

bool mfem::Mesh::FaceIsTrueInterior ( int  FaceNo) const
inlineprotected

For a serial Mesh, return true if the face is interior. For a parallel ParMesh return true if the face is interior or shared. In parallel, this method only works if the face neighbor data is exchanged.

Definition at line 349 of file mesh.hpp.

void mfem::Mesh::Finalize ( bool  refine = false,
bool  fix_orientation = false 
)

Finalize the construction of a general Mesh.

This method will:

  • check and optionally fix the orientation of regular elements
  • check and fix the orientation of boundary elements
  • assume that vertices are defined, if Nodes == NULL
  • assume that Nodes are defined, if Nodes != NULL.
    Parameters
    [in]refineIf true, prepare the Mesh for conforming refinement of triangular or tetrahedral meshes.
    [in]fix_orientationIf true, fix the orientation of inverted mesh elements by permuting their vertices.
    Before calling this method, call FinalizeTopology() and ensure that the Mesh vertices or nodes are set.

Definition at line 1837 of file mesh.cpp.

void mfem::Mesh::FinalizeCheck ( )
protected

Definition at line 1071 of file mesh.cpp.

void mfem::Mesh::FinalizeHexMesh ( int  generate_edges = 0,
int  refine = 0,
bool  fix_orientation = true 
)

Finalize the construction of a hexahedral Mesh.

Definition at line 1726 of file mesh.cpp.

void mfem::Mesh::FinalizeQuadMesh ( int  generate_edges = 0,
int  refine = 0,
bool  fix_orientation = true 
)

Finalize the construction of a quadrilateral Mesh.

Definition at line 1116 of file mesh.cpp.

void mfem::Mesh::FinalizeTetMesh ( int  generate_edges = 0,
int  refine = 0,
bool  fix_orientation = true 
)

Finalize the construction of a tetrahedral Mesh.

Definition at line 1682 of file mesh.cpp.

void mfem::Mesh::FinalizeTopology ( )

Finalize the construction of the secondary topology (connectivity) data of a Mesh.

This method does not require any actual coordinate data (either vertex coordinates for linear meshes or node coordinates for meshes with nodes) to be available. However, the data generated by this method is generally required by the FiniteElementSpace class.

After calling this method, setting the Mesh vertices or nodes, it may be appropriate to call the method Finalize().

Definition at line 1759 of file mesh.cpp.

void mfem::Mesh::FinalizeTriMesh ( int  generate_edges = 0,
int  refine = 0,
bool  fix_orientation = true 
)

Finalize the construction of a triangular Mesh.

Definition at line 1084 of file mesh.cpp.

int mfem::Mesh::FindCoarseElement ( int  i)
protected

Definition at line 6820 of file mesh.cpp.

int mfem::Mesh::FindPoints ( DenseMatrix point_mat,
Array< int > &  elem_ids,
Array< IntegrationPoint > &  ips,
bool  warn = true,
InverseElementTransformation inv_trans = NULL 
)
virtual

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.

Returns
The total number of points that were found.
Note
This method is not 100 percent reliable, i.e. it is not guaranteed to find a point, even if it lies inside a mesh element.

Reimplemented in mfem::ParMesh.

Definition at line 8539 of file mesh.cpp.

void mfem::Mesh::FreeElement ( Element E)
protected

Definition at line 8514 of file mesh.cpp.

void mfem::Mesh::GeneralRefinement ( const Array< Refinement > &  refinements,
int  nonconforming = -1,
int  nc_limit = 0 
)

Refine selected mesh elements. Refinement type can be specified for each element. The function can do conforming refinement of triangles and tetrahedra and non-conforming refinement (i.e., with hanging-nodes) of triangles, quadrilaterals and hexahedrons. If 'nonconforming' = -1, suitable refinement method is selected automatically (namely, conforming refinement for triangles). Use nonconforming = 0/1 to force the method. For nonconforming refinements, nc_limit optionally specifies the maximum level of hanging nodes (unlimited by default).

Definition at line 6319 of file mesh.cpp.

void mfem::Mesh::GeneralRefinement ( const Array< int > &  el_to_refine,
int  nonconforming = -1,
int  nc_limit = 0 
)

Simplified version of GeneralRefinement taking a simple list of elements to refine, without refinement types.

Definition at line 6373 of file mesh.cpp.

void mfem::Mesh::GenerateBoundaryElements ( )

Definition at line 1033 of file mesh.cpp.

void mfem::Mesh::GenerateFaces ( )
protected

Definition at line 4275 of file mesh.cpp.

void mfem::Mesh::GenerateNCFaceInfo ( )
protected

Definition at line 4344 of file mesh.cpp.

int * mfem::Mesh::GeneratePartitioning ( int  nparts,
int  part_method = 1 
)

Definition at line 4619 of file mesh.cpp.

int mfem::Mesh::GetAttribute ( int  i) const
inline

Return the attribute of element i.

Definition at line 849 of file mesh.hpp.

int mfem::Mesh::GetBdrAttribute ( int  i) const
inline

Return the attribute of boundary element i.

Definition at line 855 of file mesh.hpp.

const Element* mfem::Mesh::GetBdrElement ( int  i) const
inline

Definition at line 676 of file mesh.hpp.

Element* mfem::Mesh::GetBdrElement ( int  i)
inline

Definition at line 678 of file mesh.hpp.

void mfem::Mesh::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.

Definition at line 3969 of file mesh.cpp.

int mfem::Mesh::GetBdrElementBaseGeometry ( int  i = 0) const
inline

Definition at line 687 of file mesh.hpp.

void mfem::Mesh::GetBdrElementData ( int  geom,
Array< int > &  bdr_elem_vtx,
Array< int > &  bdr_attr 
) const
inline

Definition at line 657 of file mesh.hpp.

int mfem::Mesh::GetBdrElementEdgeIndex ( int  i) const

Return the vertex index of boundary element i. (1D) Return the edge index of boundary element i. (2D) Return the face index of boundary element i. (3D)

Definition at line 3957 of file mesh.cpp.

void mfem::Mesh::GetBdrElementEdges ( int  i,
Array< int > &  edges,
Array< int > &  cor 
) const

Return the indices and the orientations of all edges of bdr element i.

Definition at line 3680 of file mesh.cpp.

void mfem::Mesh::GetBdrElementFace ( int  i,
int *  f,
int *  o 
) const

Return the index and the orientation of the face of bdr element i. (3D)

Definition at line 3912 of file mesh.cpp.

ElementTransformation * mfem::Mesh::GetBdrElementTransformation ( int  i)

Returns the transformation defining the i-th boundary element.

Definition at line 332 of file mesh.cpp.

void mfem::Mesh::GetBdrElementTransformation ( int  i,
IsoparametricTransformation ElTr 
)

Definition at line 338 of file mesh.cpp.

int mfem::Mesh::GetBdrElementType ( int  i) const

Returns the type of boundary element i.

Definition at line 3994 of file mesh.cpp.

void mfem::Mesh::GetBdrElementVertices ( int  i,
Array< int > &  v 
) const
inline

Returns the indices of the vertices of boundary element i.

Definition at line 695 of file mesh.hpp.

FaceElementTransformations * mfem::Mesh::GetBdrFaceTransformations ( int  BdrElemNo)

Definition at line 717 of file mesh.cpp.

void mfem::Mesh::GetBdrPointMatrix ( int  i,
DenseMatrix pointmat 
) const

Definition at line 4015 of file mesh.cpp.

void mfem::Mesh::GetBoundingBox ( Vector min,
Vector max,
int  ref = 2 
)

Returns the minimum and maximum corners of the mesh bounding box. For high-order meshes, the geometry is refined first "ref" times.

Definition at line 95 of file mesh.cpp.

void mfem::Mesh::GetCharacteristics ( double &  h_min,
double &  h_max,
double &  kappa_min,
double &  kappa_max,
Vector Vh = NULL,
Vector Vk = NULL 
)

Definition at line 159 of file mesh.cpp.

void mfem::Mesh::GetEdgeOrdering ( DSTable v_to_v,
Array< int > &  order 
)
protected

Definition at line 1373 of file mesh.cpp.

void mfem::Mesh::GetEdgeTransformation ( int  i,
IsoparametricTransformation EdTr 
)

Returns the transformation defining the given edge element. The transformation is stored in a user-defined variable.

Definition at line 436 of file mesh.cpp.

ElementTransformation * mfem::Mesh::GetEdgeTransformation ( int  EdgeNo)

Returns the transformation defining the given face element.

Definition at line 492 of file mesh.cpp.

Table * mfem::Mesh::GetEdgeVertexTable ( ) const

Returns the edge-to-vertex Table (3D)

Definition at line 3779 of file mesh.cpp.

void mfem::Mesh::GetEdgeVertices ( int  i,
Array< int > &  vert 
) const

Returns the indices of the vertices of edge i.

Definition at line 3742 of file mesh.cpp.

const Element* mfem::Mesh::GetElement ( int  i) const
inline

Definition at line 672 of file mesh.hpp.

Element* mfem::Mesh::GetElement ( int  i)
inline

Definition at line 674 of file mesh.hpp.

void mfem::Mesh::GetElementArrayEdgeTable ( const Array< Element * > &  elem_array,
const DSTable v_to_v,
Table el_to_edge 
)
staticprotected

Definition at line 4046 of file mesh.cpp.

int mfem::Mesh::GetElementBaseGeometry ( int  i = 0) const
inline

Definition at line 684 of file mesh.hpp.

void mfem::Mesh::GetElementColoring ( Array< int > &  colors,
int  el0 = 0 
)

Definition at line 7497 of file mesh.cpp.

void mfem::Mesh::GetElementData ( const Array< Element * > &  elem_array,
int  geom,
Array< int > &  elem_vtx,
Array< int > &  attr 
) const
protected

Definition at line 6252 of file mesh.cpp.

void mfem::Mesh::GetElementData ( int  geom,
Array< int > &  elem_vtx,
Array< int > &  attr 
) const
inline

Definition at line 654 of file mesh.hpp.

void mfem::Mesh::GetElementEdges ( int  i,
Array< int > &  edges,
Array< int > &  cor 
) const

Return the indices and the orientations of all edges of element i.

Definition at line 3658 of file mesh.cpp.

void mfem::Mesh::GetElementFaces ( int  i,
Array< int > &  fcs,
Array< int > &  cor 
) const

Return the indices and the orientations of all faces of element i.

Definition at line 3874 of file mesh.cpp.

void mfem::Mesh::GetElementJacobian ( int  i,
DenseMatrix J 
)
protected

Compute the Jacobian of the transformation from the perfect reference element at the center of the element.

Definition at line 43 of file mesh.cpp.

const Element* const* mfem::Mesh::GetElementsArray ( ) const
inline

Definition at line 669 of file mesh.hpp.

double mfem::Mesh::GetElementSize ( int  i,
int  type = 0 
)

Get the size of the i-th element relative to the perfect reference element.

Definition at line 51 of file mesh.cpp.

double mfem::Mesh::GetElementSize ( int  i,
const Vector dir 
)

Definition at line 69 of file mesh.cpp.

int mfem::Mesh::GetElementToEdgeTable ( Table e_to_f,
Array< int > &  be_to_f 
)
protected

Return element to edge table and the indices for the boundary edges. The entries in the table are ordered according to the order of the nodes in the elements. For example, if T is the element to edge table T(i, 0) gives the index of edge in element i that connects vertex 0 to vertex 1, etc. Returns the number of the edges.

Definition at line 4093 of file mesh.cpp.

STable3D * mfem::Mesh::GetElementToFaceTable ( int  ret_ftbl = 0)
protected

Definition at line 4426 of file mesh.cpp.

void mfem::Mesh::GetElementTransformation ( int  i,
IsoparametricTransformation ElTr 
)

Builds the transformation defining the i-th element in the user-defined variable.

Definition at line 255 of file mesh.cpp.

ElementTransformation * mfem::Mesh::GetElementTransformation ( int  i)

Returns the transformation defining the i-th element.

Definition at line 325 of file mesh.cpp.

void mfem::Mesh::GetElementTransformation ( int  i,
const Vector nodes,
IsoparametricTransformation ElTr 
)

Return the transformation defining the i-th element assuming the position of the vertices/nodes are given by 'nodes'.

Definition at line 284 of file mesh.cpp.

int mfem::Mesh::GetElementType ( int  i) const

Returns the type of element i.

Definition at line 3989 of file mesh.cpp.

void mfem::Mesh::GetElementVertices ( int  i,
Array< int > &  v 
) const
inline

Returns the indices of the vertices of element i.

Definition at line 691 of file mesh.hpp.

double mfem::Mesh::GetElementVolume ( int  i)

Definition at line 78 of file mesh.cpp.

const Element* mfem::Mesh::GetFace ( int  i) const
inline

Definition at line 680 of file mesh.hpp.

int mfem::Mesh::GetFaceBaseGeometry ( int  i) const

Definition at line 3935 of file mesh.cpp.

void mfem::Mesh::GetFaceEdges ( int  i,
Array< int > &  edges,
Array< int > &  o 
) const

Return the indices and the orientations of all edges of face i. Works for both 2D (face=edge) and 3D faces.

Definition at line 3712 of file mesh.cpp.

Table * mfem::Mesh::GetFaceEdgeTable ( ) const

Returns the face-to-edge Table (3D)

Definition at line 3751 of file mesh.cpp.

void mfem::Mesh::GetFaceElements ( int  Face,
int *  Elem1,
int *  Elem2 
)

Definition at line 743 of file mesh.cpp.

FaceElementTransformations * mfem::Mesh::GetFaceElementTransformations ( int  FaceNo,
int  mask = 31 
)

Returns (a pointer to a structure 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.

Definition at line 633 of file mesh.cpp.

int mfem::Mesh::GetFaceElementType ( int  Face) const

Definition at line 760 of file mesh.cpp.

int mfem::Mesh::GetFaceGeometryType ( int  Face) const

Definition at line 755 of file mesh.cpp.

void mfem::Mesh::GetFaceInfos ( int  Face,
int *  Inf1,
int *  Inf2 
)

Definition at line 749 of file mesh.cpp.

STable3D * mfem::Mesh::GetFacesTable ( )
protected

Definition at line 4391 of file mesh.cpp.

Table * mfem::Mesh::GetFaceToElementTable ( ) const

Return the "face"-element Table. Here "face" refers to face (3D), edge (2D), or vertex (1D). The returned Table must be destroyed by the caller.

Definition at line 3840 of file mesh.cpp.

void mfem::Mesh::GetFaceTransformation ( int  i,
IsoparametricTransformation FTr 
)

Returns the transformation defining the given face element. The transformation is stored in a user-defined variable.

Definition at line 367 of file mesh.cpp.

ElementTransformation * mfem::Mesh::GetFaceTransformation ( int  FaceNo)

Returns the transformation defining the given face element.

Definition at line 430 of file mesh.cpp.

void mfem::Mesh::GetFaceVertices ( int  i,
Array< int > &  vert 
) const
inline

Returns the indices of the vertices of face i.

Definition at line 709 of file mesh.hpp.

void mfem::Mesh::GetGeckoElementReordering ( Array< int > &  ordering)

This is our integration with the Gecko library. This will call the Gecko library to find an element ordering that will increase memory coherency by putting elements that are in physical proximity closer in memory.

Definition at line 1149 of file mesh.cpp.

long mfem::Mesh::GetGlobalNE ( ) const
inline

Return the total (global) number of elements.

Definition at line 632 of file mesh.hpp.

FaceElementTransformations* mfem::Mesh::GetInteriorFaceTransformations ( int  FaceNo)
inline

Definition at line 822 of file mesh.hpp.

Operation mfem::Mesh::GetLastOperation ( ) const
inline

Return type of last modification of the mesh.

Definition at line 1006 of file mesh.hpp.

double mfem::Mesh::GetLength ( int  i,
int  j 
) const
protected

Return the length of the segment from node i to node j.

Definition at line 4031 of file mesh.cpp.

void mfem::Mesh::GetLocalFaceTransformation ( int  face_type,
int  elem_type,
IsoparametricTransformation Transf,
int  inf 
)
protected

Used in GetFaceElementTransformations (...)

Definition at line 600 of file mesh.cpp.

void mfem::Mesh::GetLocalPtToSegTransformation ( IsoparametricTransformation Transf,
int  i 
)
protected

Used in GetFaceElementTransformations (...)

Definition at line 499 of file mesh.cpp.

void mfem::Mesh::GetLocalQuadToHexTransformation ( IsoparametricTransformation loc,
int  i 
)
protected

Used in GetFaceElementTransformations (...)

Definition at line 578 of file mesh.cpp.

void mfem::Mesh::GetLocalSegToQuadTransformation ( IsoparametricTransformation loc,
int  i 
)
protected

Definition at line 534 of file mesh.cpp.

void mfem::Mesh::GetLocalSegToTriTransformation ( IsoparametricTransformation loc,
int  i 
)
protected

Definition at line 514 of file mesh.cpp.

void mfem::Mesh::GetLocalTriToTetTransformation ( IsoparametricTransformation loc,
int  i 
)
protected

Used in GetFaceElementTransformations (...)

Definition at line 554 of file mesh.cpp.

int mfem::Mesh::GetNBE ( ) const
inline

Returns number of boundary elements.

Definition at line 617 of file mesh.hpp.

int mfem::Mesh::GetNE ( ) const
inline

Returns number of elements.

Definition at line 614 of file mesh.hpp.

int mfem::Mesh::GetNEdges ( ) const
inline

Return the number of edges.

Definition at line 620 of file mesh.hpp.

int mfem::Mesh::GetNFaces ( ) const
inline

Return the number of faces in a 3D mesh.

Definition at line 623 of file mesh.hpp.

const FiniteElementSpace * mfem::Mesh::GetNodalFESpace ( ) const

Return the FiniteElementSpace on which the current mesh nodes are defined or NULL if the mesh does not have nodes.

Definition at line 3310 of file mesh.cpp.

void mfem::Mesh::GetNode ( int  i,
double *  coord 
)

Definition at line 5350 of file mesh.cpp.

void mfem::Mesh::GetNodes ( Vector node_coord) const

Definition at line 5401 of file mesh.cpp.

GridFunction* mfem::Mesh::GetNodes ( )
inline

Return a pointer to the internal node GridFunction (may be NULL).

Definition at line 907 of file mesh.hpp.

const GridFunction* mfem::Mesh::GetNodes ( ) const
inline

Definition at line 908 of file mesh.hpp.

void mfem::Mesh::GetNodes ( GridFunction nodes) const

Return the mesh nodes/vertices projected on the given GridFunction.

Definition at line 3284 of file mesh.cpp.

int mfem::Mesh::GetNumFaces ( ) const

Return the number of faces (3D), edges (2D) or vertices (1D).

Definition at line 3334 of file mesh.cpp.

int mfem::Mesh::GetNV ( ) const
inline

Returns number of vertices. Vertices are only at the corners of elements, where you would expect them in the lowest-order mesh.

Definition at line 611 of file mesh.hpp.

void mfem::Mesh::GetPointMatrix ( int  i,
DenseMatrix pointmat 
) const

Definition at line 3999 of file mesh.cpp.

int mfem::Mesh::GetQuadOrientation ( const int *  base,
const int *  test 
)
staticprotected

Returns the orientation of "test" relative to "base".

Definition at line 3508 of file mesh.cpp.

const CoarseFineTransformations & mfem::Mesh::GetRefinementTransforms ( )

Return fine element transformations following a mesh refinement. Space uses this to construct a global interpolation matrix.

Definition at line 6830 of file mesh.cpp.

long mfem::Mesh::GetSequence ( ) const
inline

Return update counter. The counter starts at zero and is incremented each time refinement, derefinement, or rebalancing method is called. It is used for checking proper sequence of Space:: and GridFunction:: Update() calls.

Definition at line 1012 of file mesh.hpp.

FiniteElement * mfem::Mesh::GetTransformationFEforElementType ( int  ElemType)
static

Definition at line 239 of file mesh.cpp.

int mfem::Mesh::GetTriOrientation ( const int *  base,
const int *  test 
)
staticprotected

Returns the orientation of "test" relative to "base".

Definition at line 3460 of file mesh.cpp.

const double* mfem::Mesh::GetVertex ( int  i) const
inline

Return pointer to vertex i's coordinates.

Warning
For high-order meshes (when Nodes != NULL) vertices may not be updated and should not be used!

Definition at line 647 of file mesh.hpp.

double* mfem::Mesh::GetVertex ( int  i)
inline

Return pointer to vertex i's coordinates.

Warning
For high-order meshes (when Nodes != NULL) vertices may not being updated and should not be used!

Definition at line 652 of file mesh.hpp.

Table * mfem::Mesh::GetVertexToElementTable ( )

The returned Table must be destroyed by the caller.

Definition at line 3805 of file mesh.cpp.

void mfem::Mesh::GetVertexToVertexTable ( DSTable v_to_v) const
protected

Return vertex to vertex table. The connections stored in the table are from smaller to bigger vertex index, i.e. if i<j and (i, j) is in the table, then (j, i) is not stored.

Definition at line 4068 of file mesh.cpp.

void mfem::Mesh::GetVertices ( Vector vert_coord) const

Definition at line 5330 of file mesh.cpp.

void mfem::Mesh::GreenRefinement ( int  i,
const DSTable v_to_v,
int *  edge1,
int *  edge2,
int *  middle 
)
inlineprotected

Green refinement. Element with index i is refined. The default refinement for now is Bisection.

Definition at line 239 of file mesh.hpp.

void mfem::Mesh::HexUniformRefinement ( )
protectedvirtual

Refine hexahedral mesh.

Reimplemented in mfem::ParMesh.

Definition at line 5581 of file mesh.cpp.

void mfem::Mesh::Init ( )
protected

Definition at line 765 of file mesh.cpp.

void mfem::Mesh::InitBaseGeom ( )
protected

Definition at line 917 of file mesh.cpp.

void mfem::Mesh::InitFromNCMesh ( const NCMesh ncmesh)
protected

Initialize vertices/elements/boundary/tables from a nonconforming mesh.

Definition at line 6152 of file mesh.cpp.

void mfem::Mesh::InitMesh ( int  _Dim,
int  _spaceDim,
int  NVert,
int  NElem,
int  NBdrElem 
)
protected

Begin construction of a mesh.

Definition at line 900 of file mesh.cpp.

void mfem::Mesh::InitRefinementTransforms ( )
protected

Definition at line 6808 of file mesh.cpp.

void mfem::Mesh::InitTables ( )
protected

Definition at line 782 of file mesh.cpp.

bool mfem::Mesh::IsSlaveFace ( const FaceInfo fi) const
protected

Definition at line 698 of file mesh.cpp.

void mfem::Mesh::KnotInsert ( Array< KnotVector * > &  kv)

Definition at line 3043 of file mesh.cpp.

virtual void mfem::Mesh::Load ( std::istream &  input,
int  generate_edges = 0,
int  refine = 1,
bool  fix_orientation = true 
)
inlinevirtual

This is similar to the mesh constructor with the same arguments, but here the current mesh is destroyed and another one created based on the data stream again given in MFEM, netgen, or VTK format. If generate_edges = 0 (default) edges are not generated, if 1 edges are generated.

See Also
mfem::igzstream() for on-the-fly decompression of compressed ascii inputs.

Definition at line 591 of file mesh.hpp.

void mfem::Mesh::Loader ( std::istream &  input,
int  generate_edges = 0,
std::string  parse_tag = "" 
)
protected

Definition at line 2576 of file mesh.cpp.

void mfem::Mesh::LoadPatchTopo ( std::istream &  input,
Array< int > &  edge_to_knot 
)
protected

Read NURBS patch/macro-element mesh.

Definition at line 3160 of file mesh.cpp.

void mfem::Mesh::LocalRefinement ( const Array< int > &  marked_el,
int  type = 3 
)
protectedvirtual

This function is not public anymore. Use GeneralRefinement instead.

Reimplemented in mfem::ParMesh.

Definition at line 5746 of file mesh.cpp.

void mfem::Mesh::Make1D ( int  n,
double  sx = 1.0 
)
protected

Creates a 1D mesh for the interval [0,sx] divided into n equal intervals.

Definition at line 2245 of file mesh.cpp.

void mfem::Mesh::Make2D ( int  nx,
int  ny,
Element::Type  type,
int  generate_edges,
double  sx,
double  sy 
)
protected

Creates mesh for the rectangle [0,sx]x[0,sy], divided into nx*ny quadrilaterals if type = QUADRILATERAL or into 2*nx*ny triangles if type = TRIANGLE. If generate_edges = 0 (default) edges are not generated, if 1 edges are generated.

Definition at line 2085 of file mesh.cpp.

void mfem::Mesh::Make3D ( int  nx,
int  ny,
int  nz,
Element::Type  type,
int  generate_edges,
double  sx,
double  sy,
double  sz 
)
protected

Creates mesh for the parallelepiped [0,sx]x[0,sy]x[0,sz], divided into nx*ny*nz hexahedrals if type=HEXAHEDRON or into 6*nx*ny*nz tetrahedrons if type=TETRAHEDRON. If generate_edges = 0 (default) edges are not generated, if 1 edges are generated.

Definition at line 1897 of file mesh.cpp.

void mfem::Mesh::MarkForRefinement ( )
protected

Definition at line 1341 of file mesh.cpp.

void mfem::Mesh::MarkTetMeshForRefinement ( DSTable v_to_v)
protectedvirtual

Reimplemented in mfem::ParMesh.

Definition at line 1398 of file mesh.cpp.

void mfem::Mesh::MarkTriMeshForRefinement ( )
protected

Definition at line 1358 of file mesh.cpp.

int mfem::Mesh::MeshGenerator ( )
inline

Get the mesh generator/type.

Returns
A bitmask:
  • bit 0 - simplices are present in the mesh (triangles, tets),
  • bit 1 - tensor product elements are present in the mesh (quads, hexes).

Definition at line 607 of file mesh.hpp.

void mfem::Mesh::MesquiteSmooth ( const int  mesquite_option = 0)

Definition at line 1144 of file mesquite.cpp.

void mfem::Mesh::MoveNodes ( const Vector displacements)

Definition at line 5389 of file mesh.cpp.

void mfem::Mesh::MoveVertices ( const Vector displacements)

Definition at line 5321 of file mesh.cpp.

Element * mfem::Mesh::NewElement ( int  geom)

Definition at line 2490 of file mesh.cpp.

void mfem::Mesh::NewNodes ( GridFunction nodes,
bool  make_owner = false 
)

Replace the internal node GridFunction with the given GridFunction.

Definition at line 5425 of file mesh.cpp.

bool mfem::Mesh::Nonconforming ( ) const
inline

Definition at line 999 of file mesh.hpp.

bool mfem::Mesh::NonconformingDerefinement ( Array< double > &  elem_error,
double  threshold,
int  nc_limit = 0,
int  op = 1 
)
protectedvirtual

NC version of GeneralDerefinement.

Reimplemented in mfem::ParMesh.

Definition at line 6078 of file mesh.cpp.

void mfem::Mesh::NonconformingRefinement ( const Array< Refinement > &  refinements,
int  nc_limit = 0 
)
protectedvirtual

This function is not public anymore. Use GeneralRefinement instead.

Reimplemented in mfem::ParMesh.

Definition at line 6004 of file mesh.cpp.

void mfem::Mesh::NURBSUniformRefinement ( )
protectedvirtual

Refine NURBS mesh.

Reimplemented in mfem::ParMesh.

Definition at line 3062 of file mesh.cpp.

bool mfem::Mesh::OwnsNodes ( ) const
inline

Return the mesh nodes ownership flag.

Definition at line 910 of file mesh.hpp.

void mfem::Mesh::PrepareNodeReorder ( DSTable **  old_v_to_v,
Table **  old_elem_vert 
)
protected

Definition at line 1421 of file mesh.cpp.

virtual void mfem::Mesh::Print ( std::ostream &  out = mfem::out) const
inlinevirtual

Print the mesh to the given stream using the default MFEM mesh format.

See Also
mfem::ogzstream() for on-the-fly compression of ascii outputs

Reimplemented in mfem::ParMesh.

Definition at line 1019 of file mesh.hpp.

void mfem::Mesh::PrintCharacteristics ( Vector Vh = NULL,
Vector Vk = NULL,
std::ostream &  out = mfem::out 
)

Definition at line 192 of file mesh.cpp.

void mfem::Mesh::PrintElement ( const Element el,
std::ostream &  out 
)
staticprotected

Definition at line 2551 of file mesh.cpp.

void mfem::Mesh::PrintElementsWithPartitioning ( int *  partitioning,
std::ostream &  out,
int  interior_faces = 0 
)

Definition at line 7690 of file mesh.cpp.

void mfem::Mesh::PrintElementWithoutAttr ( const Element el,
std::ostream &  out 
)
staticprotected

Definition at line 2527 of file mesh.cpp.

void mfem::Mesh::Printer ( std::ostream &  out = mfem::out,
std::string  section_delimiter = "" 
) const
protected

Definition at line 7052 of file mesh.cpp.

virtual void mfem::Mesh::PrintInfo ( std::ostream &  out = mfem::out)
inlinevirtual

Reimplemented in mfem::ParMesh.

Definition at line 1084 of file mesh.hpp.

void mfem::Mesh::PrintSurfaces ( const Table Aface_face,
std::ostream &  out 
) const

Print set of disjoint surfaces:

If Aface_face(i,j) != 0, print face j as a boundary element with attribute i+1.

Definition at line 8064 of file mesh.cpp.

void mfem::Mesh::PrintTopo ( std::ostream &  out,
const Array< int > &  e_to_k 
) const
protected

Definition at line 7134 of file mesh.cpp.

void mfem::Mesh::PrintVTK ( std::ostream &  out)

Print the mesh in VTK format (linear and quadratic meshes only).

See Also
mfem::ogzstream() for on-the-fly compression of ascii outputs

Definition at line 7176 of file mesh.cpp.

void mfem::Mesh::PrintVTK ( std::ostream &  out,
int  ref,
int  field_data = 0 
)

Print the mesh in VTK format. The parameter ref > 0 specifies an element subdivision number (useful for high order fields and curved meshes). If the optional field_data is set, we also add a FIELD section in the beginning of the file with additional dataset information.

See Also
mfem::ogzstream() for on-the-fly compression of ascii outputs

Definition at line 7349 of file mesh.cpp.

void mfem::Mesh::PrintWithPartitioning ( int *  partitioning,
std::ostream &  out,
int  elem_attr = 0 
) const

Prints the mesh with bdr elements given by the boundary of the subdomains, so that the boundary of subdomain i has bdr attribute i+1.

See Also
mfem::ogzstream() for on-the-fly compression of ascii outputs

Definition at line 7572 of file mesh.cpp.

void mfem::Mesh::PrintXG ( std::ostream &  out = mfem::out) const
virtual

Print the mesh to the given stream using Netgen/Truegrid format.

Reimplemented in mfem::ParMesh.

Definition at line 6888 of file mesh.cpp.

void mfem::Mesh::QuadUniformRefinement ( )
protectedvirtual

Refine quadrilateral mesh.

Reimplemented in mfem::ParMesh.

Definition at line 5479 of file mesh.cpp.

void mfem::Mesh::RandomRefinement ( double  prob,
bool  aniso = false,
int  nonconforming = -1,
int  nc_limit = 0 
)

Refine each element with given probability. Uses GeneralRefinement.

Definition at line 6401 of file mesh.cpp.

void mfem::Mesh::ReadCubit ( const char *  filename,
int &  curved,
int &  read_gf 
)
protected

Definition at line 1267 of file mesh_readers.cpp.

Element * mfem::Mesh::ReadElement ( std::istream &  input)
protected

Definition at line 2539 of file mesh.cpp.

Element * mfem::Mesh::ReadElementWithoutAttr ( std::istream &  input)
protected

Definition at line 2510 of file mesh.cpp.

void mfem::Mesh::ReadGmshMesh ( std::istream &  input)
protected

Definition at line 858 of file mesh_readers.cpp.

void mfem::Mesh::ReadInlineMesh ( std::istream &  input,
int  generate_edges = 0 
)
protected

Definition at line 706 of file mesh_readers.cpp.

void mfem::Mesh::ReadLineMesh ( std::istream &  input)
protected

Definition at line 110 of file mesh_readers.cpp.

void mfem::Mesh::ReadMFEMMesh ( std::istream &  input,
bool  mfem_v11,
int &  curved 
)
protected

Definition at line 28 of file mesh_readers.cpp.

void mfem::Mesh::ReadNetgen2DMesh ( std::istream &  input,
int &  curved 
)
protected

Definition at line 144 of file mesh_readers.cpp.

void mfem::Mesh::ReadNetgen3DMesh ( std::istream &  input)
protected

Definition at line 206 of file mesh_readers.cpp.

void mfem::Mesh::ReadNURBSMesh ( std::istream &  input,
int &  curved,
int &  read_gf 
)
protected

Definition at line 665 of file mesh_readers.cpp.

void mfem::Mesh::ReadTrueGridMesh ( std::istream &  input)
protected

Definition at line 260 of file mesh_readers.cpp.

void mfem::Mesh::ReadVTKMesh ( std::istream &  input,
int &  curved,
int &  read_gf 
)
protected

Definition at line 364 of file mesh_readers.cpp.

void mfem::Mesh::RedRefinement ( int  i,
const DSTable v_to_v,
int *  edge1,
int *  edge2,
int *  middle 
)
inlineprotected

Red refinement. Element with index i is refined. The default red refinement for now is Uniform.

Definition at line 233 of file mesh.hpp.

virtual long mfem::Mesh::ReduceInt ( int  value) const
inlinevirtual

Utility function: sum integers from all processors (Allreduce).

Reimplemented in mfem::ParMesh.

Definition at line 629 of file mesh.hpp.

void mfem::Mesh::RefineAtVertex ( const Vertex vert,
double  eps = 0.0,
int  nonconforming = -1 
)

Refine elements sharing the specified vertex. Uses GeneralRefinement.

Definition at line 6420 of file mesh.cpp.

bool mfem::Mesh::RefineByError ( const Array< double > &  elem_error,
double  threshold,
int  nonconforming = -1,
int  nc_limit = 0 
)

Refine element i if elem_error[i] > threshold, for all i. Returns true if at least one element was refined, false otherwise.

Definition at line 6446 of file mesh.cpp.

bool mfem::Mesh::RefineByError ( const Vector elem_error,
double  threshold,
int  nonconforming = -1,
int  nc_limit = 0 
)

Refine element i if elem_error(i) > threshold, for all i. Returns true if at least one element was refined, false otherwise.

Definition at line 6466 of file mesh.cpp.

void mfem::Mesh::RemoveInternalBoundaries ( )

Remove boundary elements that lie in the interior of the mesh, i.e. that have two adjacent faces in 3D, or edges in 2D.

Definition at line 8426 of file mesh.cpp.

void mfem::Mesh::RemoveUnusedVertices ( )

Remove unused vertices and rebuild mesh connectivity.

Definition at line 8319 of file mesh.cpp.

void mfem::Mesh::ReorderElements ( const Array< int > &  ordering,
bool  reorder_vertices = true 
)

Rebuilds the mesh with a different order of elements. The ordering vector maps the old element number to the new element number. This also reorders the vertices and nodes edges and faces along with the elements.

Definition at line 1194 of file mesh.cpp.

void mfem::Mesh::ReorientTetMesh ( )
virtual

This method modifies a tetrahedral mesh so that Nedelec spaces of order greater than 1 can be defined on the mesh. Specifically, we 1) rotate all tets in the mesh so that the vertices {v0, v1, v2, v3} satisfy: v0 < v1 < min(v2, v3). 2) rotate all boundary triangles so that the vertices {v0, v1, v2} satisfy: v0 < min(v1, v2).

Note
Refinement does not work after a call to this method!

Reimplemented in mfem::ParMesh.

Definition at line 4499 of file mesh.cpp.

void mfem::Mesh::Rotate3 ( int &  a,
int &  b,
int &  c 
)
inlinestaticprotected

Definition at line 1169 of file mesh.hpp.

void mfem::Mesh::ScaleElements ( double  sf)

Definition at line 8200 of file mesh.cpp.

void mfem::Mesh::ScaleSubdomains ( double  sf)

Definition at line 8130 of file mesh.cpp.

void mfem::Mesh::SetAttribute ( int  i,
int  attr 
)
inline

Set the attribute of element i.

Definition at line 852 of file mesh.hpp.

void mfem::Mesh::SetAttributes ( )

Definition at line 869 of file mesh.cpp.

void mfem::Mesh::SetCurvature ( int  order,
bool  discont = false,
int  space_dim = -1,
int  ordering = 1 
)

Set the curvature of the mesh nodes using the given polynomial degree, 'order', and optionally: discontinuous or continuous FE space, 'discont', new space dimension, 'space_dim' (if != -1), and 'ordering'.

Definition at line 3315 of file mesh.cpp.

void mfem::Mesh::SetEmpty ( )
protected

Definition at line 788 of file mesh.cpp.

void mfem::Mesh::SetMeshGen ( )
protected

Determine the mesh generator bitmask meshgen, see MeshGenerator().

Definition at line 2557 of file mesh.cpp.

void mfem::Mesh::SetNodalFESpace ( FiniteElementSpace nfes)

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.

Definition at line 3298 of file mesh.cpp.

void mfem::Mesh::SetNodalGridFunction ( GridFunction nodes,
bool  make_owner = false 
)

Replace the internal node GridFunction with the given GridFunction. The given GridFunction is updated with node coordinates projected (derived) from the current nodes/vertices.

Definition at line 3304 of file mesh.cpp.

void mfem::Mesh::SetNode ( int  i,
const double *  coord 
)

Definition at line 5369 of file mesh.cpp.

void mfem::Mesh::SetNodes ( const Vector node_coord)

Definition at line 5413 of file mesh.cpp.

void mfem::Mesh::SetNodesOwner ( bool  nodes_owner)
inline

Set the mesh nodes ownership flag.

Definition at line 912 of file mesh.hpp.

void mfem::Mesh::SetVertices ( const Vector vert_coord)

Definition at line 5341 of file mesh.cpp.

void mfem::Mesh::ShiftL2R ( int &  a,
int &  b,
int &  c 
)
inlinestaticprotected

Definition at line 1163 of file mesh.hpp.

int mfem::Mesh::SpaceDimension ( ) const
inline

Definition at line 642 of file mesh.hpp.

void mfem::Mesh::Swap ( Mesh other,
bool  non_geometry = false 
)
protected

Swaps internal data with another mesh. By default, non-geometry members like 'ncmesh' and 'NURBSExt' are only swapped when 'non_geometry' is set.

Definition at line 6210 of file mesh.cpp.

void mfem::Mesh::SwapNodes ( GridFunction *&  nodes,
int &  own_nodes_ 
)

Swap the internal node GridFunction pointer and ownership flag members with the given ones.

Definition at line 5439 of file mesh.cpp.

void mfem::Mesh::Transform ( void(*)(const Vector &, Vector &)  f)

Definition at line 8270 of file mesh.cpp.

void mfem::Mesh::Transform ( VectorCoefficient deformation)

Definition at line 8295 of file mesh.cpp.

void mfem::Mesh::UniformRefinement ( int  i,
const DSTable v_to_v,
int *  edge1,
int *  edge2,
int *  middle 
)
protected

Uniform Refinement. Element with index i is refined uniformly.

Definition at line 6718 of file mesh.cpp.

void mfem::Mesh::UniformRefinement ( )

Refine all mesh elements.

Definition at line 6280 of file mesh.cpp.

void mfem::Mesh::UpdateNodes ( )
protected

Update the nodes of a curved mesh after refinement.

Definition at line 5470 of file mesh.cpp.

void mfem::Mesh::UpdateNURBS ( )
protected

Definition at line 3097 of file mesh.cpp.

Friends And Related Function Documentation

friend class NURBSExtension
friend

Definition at line 50 of file mesh.hpp.

friend class ParMesh
friend

Definition at line 47 of file mesh.hpp.

friend class ParNCMesh
friend

Definition at line 48 of file mesh.hpp.

friend class Tetrahedron
friend

Definition at line 156 of file mesh.hpp.

Member Data Documentation

Array<int> mfem::Mesh::attributes

A list of all unique element attributes used by the Mesh.

Definition at line 170 of file mesh.hpp.

int mfem::Mesh::BaseBdrGeom
protected

Definition at line 59 of file mesh.hpp.

int mfem::Mesh::BaseGeom
protected

Definition at line 59 of file mesh.hpp.

Array<int> mfem::Mesh::bdr_attributes

A list of all unique boundary attributes used by the Mesh.

Definition at line 172 of file mesh.hpp.

Array<int> mfem::Mesh::be_to_edge
protected

Definition at line 133 of file mesh.hpp.

Array<int> mfem::Mesh::be_to_face
protected

Definition at line 135 of file mesh.hpp.

Table* mfem::Mesh::bel_to_edge
protected

Definition at line 134 of file mesh.hpp.

Array<Element *> mfem::Mesh::boundary
protected

Definition at line 72 of file mesh.hpp.

CoarseFineTransformations mfem::Mesh::CoarseFineTr
protected

Definition at line 144 of file mesh.hpp.

int mfem::Mesh::Dim
protected

Definition at line 53 of file mesh.hpp.

Table* mfem::Mesh::edge_vertex
mutableprotected

Definition at line 137 of file mesh.hpp.

IsoparametricTransformation mfem::Mesh::EdgeTransformation
protected

Definition at line 140 of file mesh.hpp.

Table* mfem::Mesh::el_to_edge
protected

Definition at line 130 of file mesh.hpp.

Table* mfem::Mesh::el_to_el
protected

Definition at line 132 of file mesh.hpp.

Table* mfem::Mesh::el_to_face
protected

Definition at line 131 of file mesh.hpp.

Array<Element *> mfem::Mesh::elements
protected

Definition at line 68 of file mesh.hpp.

Table* mfem::Mesh::face_edge
mutableprotected

Definition at line 136 of file mesh.hpp.

FaceElementTransformations mfem::Mesh::FaceElemTr
protected

Definition at line 141 of file mesh.hpp.

Array<Element *> mfem::Mesh::faces
protected

Definition at line 73 of file mesh.hpp.

Array<FaceInfo> mfem::Mesh::faces_info
protected

Definition at line 127 of file mesh.hpp.

IsoparametricTransformation mfem::Mesh::FaceTransformation
protected

Definition at line 140 of file mesh.hpp.

Operation mfem::Mesh::last_operation
protected

Definition at line 178 of file mesh.hpp.

int mfem::Mesh::meshgen
protected

Definition at line 61 of file mesh.hpp.

Array<NCFaceInfo> mfem::Mesh::nc_faces_info
protected

Definition at line 128 of file mesh.hpp.

NCMesh* mfem::Mesh::ncmesh

Optional non-conforming mesh extension.

Definition at line 175 of file mesh.hpp.

GridFunction* mfem::Mesh::Nodes
protected

Definition at line 149 of file mesh.hpp.

int mfem::Mesh::NumOfBdrElements
protected

Definition at line 56 of file mesh.hpp.

int mfem::Mesh::NumOfEdges
protected

Definition at line 57 of file mesh.hpp.

int mfem::Mesh::NumOfElements
protected

Definition at line 56 of file mesh.hpp.

int mfem::Mesh::NumOfFaces
protected

Definition at line 57 of file mesh.hpp.

int mfem::Mesh::NumOfVertices
protected

Definition at line 56 of file mesh.hpp.

NURBSExtension* mfem::Mesh::NURBSext

Optional NURBS mesh extension.

Definition at line 174 of file mesh.hpp.

int mfem::Mesh::own_nodes
protected

Definition at line 150 of file mesh.hpp.

long mfem::Mesh::sequence
protected

Definition at line 66 of file mesh.hpp.

int mfem::Mesh::spaceDim
protected

Definition at line 54 of file mesh.hpp.

MemAlloc<Tetrahedron, 1024> mfem::Mesh::TetMemory
protected

Definition at line 157 of file mesh.hpp.

IsoparametricTransformation mfem::Mesh::Transformation
protected

Definition at line 139 of file mesh.hpp.

IsoparametricTransformation mfem::Mesh::Transformation2
protected

Definition at line 139 of file mesh.hpp.

Array<Vertex> mfem::Mesh::vertices
protected

Definition at line 71 of file mesh.hpp.

const int mfem::Mesh::vtk_quadratic_hex
staticprotected
Initial value:
=
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
24, 22, 21, 23, 20, 25, 26
}

Definition at line 153 of file mesh.hpp.

const int mfem::Mesh::vtk_quadratic_tet
staticprotected
Initial value:
=
{ 0, 1, 2, 3, 4, 7, 5, 6, 8, 9 }

Definition at line 152 of file mesh.hpp.


The documentation for this class was generated from the following files: