MFEM  v4.6.0
Finite element discretization library
Public Types | Public Member Functions | Protected Attributes | List of all members
mfem::Element Class Referenceabstract

Abstract data type element. More...

#include <element.hpp>

Inheritance diagram for mfem::Element:
[legend]

Public Types

enum  Type {
  POINT, SEGMENT, TRIANGLE, QUADRILATERAL,
  TETRAHEDRON, HEXAHEDRON, WEDGE, PYRAMID
}
 Constants for the classes derived from Element. More...
 

Public Member Functions

 Element (Geometry::Type bg=Geometry::POINT)
 Default element constructor. More...
 
virtual Type GetType () const =0
 Returns element's type. More...
 
Geometry::Type GetGeometryType () const
 
int GetAttribute () const
 Return element's attribute. More...
 
void SetAttribute (const int attr)
 Set element's attribute. More...
 
virtual void SetVertices (const int *ind)
 Set the indices the element according to the input. More...
 
virtual void GetVertices (Array< int > &v) const =0
 Returns element's vertices. More...
 
virtual int * GetVertices ()=0
 
const int * GetVertices () const
 
virtual int GetNVertices () const =0
 
virtual int GetNEdges () const =0
 
virtual const int * GetEdgeVertices (int) const =0
 
virtual MFEM_DEPRECATED int GetNFaces (int &nFaceVertices) const =0
 
virtual int GetNFaces () const =0
 
virtual int GetNFaceVertices (int fi) const =0
 
virtual const int * GetFaceVertices (int fi) const =0
 
virtual void MarkEdge (const DSTable &v_to_v, const int *length)
 Mark the longest edge by assuming/changing the order of the vertices. More...
 
virtual int NeedRefinement (HashTable< Hashed2 > &v_to_v) const
 Return 1 if the element needs refinement in order to get conforming mesh. More...
 
virtual void ResetTransform (int tr)
 Set current coarse-fine transformation number. More...
 
virtual void PushTransform (int tr)
 Add 'tr' to the current chain of coarse-fine transformations. More...
 
virtual unsigned GetTransform () const
 Return current coarse-fine transformation. More...
 
virtual ElementDuplicate (Mesh *m) const =0
 
virtual ~Element ()
 Destroys element. More...
 

Protected Attributes

int attribute
 Element's attribute (specifying material property, etc). More...
 
Geometry::Type base_geom
 Element's type from the Finite Element's perspective. More...
 

Detailed Description

Abstract data type element.

Definition at line 28 of file element.hpp.

Member Enumeration Documentation

◆ Type

Constants for the classes derived from Element.

Enumerator
POINT 
SEGMENT 
TRIANGLE 
QUADRILATERAL 
TETRAHEDRON 
HEXAHEDRON 
WEDGE 
PYRAMID 

Definition at line 41 of file element.hpp.

Constructor & Destructor Documentation

◆ Element()

mfem::Element::Element ( Geometry::Type  bg = Geometry::POINT)
inlineexplicit

Default element constructor.

Definition at line 46 of file element.hpp.

◆ ~Element()

virtual mfem::Element::~Element ( )
inlinevirtual

Destroys element.

Definition at line 106 of file element.hpp.

Member Function Documentation

◆ Duplicate()

virtual Element* mfem::Element::Duplicate ( Mesh m) const
pure virtual
Note
The returned object should be deleted by the caller.

Implemented in mfem::Tetrahedron, mfem::Triangle, mfem::Pyramid, mfem::Wedge, mfem::Quadrilateral, mfem::Hexahedron, mfem::Segment, and mfem::Point.

◆ GetAttribute()

int mfem::Element::GetAttribute ( ) const
inline

Return element's attribute.

Definition at line 55 of file element.hpp.

◆ GetEdgeVertices()

virtual const int* mfem::Element::GetEdgeVertices ( int  ) const
pure virtual

◆ GetFaceVertices()

virtual const int* mfem::Element::GetFaceVertices ( int  fi) const
pure virtual

◆ GetGeometryType()

Geometry::Type mfem::Element::GetGeometryType ( ) const
inline

Definition at line 52 of file element.hpp.

◆ GetNEdges()

virtual int mfem::Element::GetNEdges ( ) const
pure virtual

◆ GetNFaces() [1/2]

virtual MFEM_DEPRECATED int mfem::Element::GetNFaces ( int &  nFaceVertices) const
pure virtual
Deprecated:
Use GetNFaces(void) and GetNFaceVertices(int) instead.

Implemented in mfem::Tetrahedron, mfem::Triangle, mfem::Pyramid, mfem::Wedge, mfem::Quadrilateral, mfem::Segment, mfem::Hexahedron, and mfem::Point.

◆ GetNFaces() [2/2]

virtual int mfem::Element::GetNFaces ( ) const
pure virtual

◆ GetNFaceVertices()

virtual int mfem::Element::GetNFaceVertices ( int  fi) const
pure virtual

◆ GetNVertices()

virtual int mfem::Element::GetNVertices ( ) const
pure virtual

◆ GetTransform()

virtual unsigned mfem::Element::GetTransform ( ) const
inlinevirtual

Return current coarse-fine transformation.

Reimplemented in mfem::Tetrahedron, and mfem::Triangle.

Definition at line 100 of file element.hpp.

◆ GetType()

virtual Type mfem::Element::GetType ( ) const
pure virtual

◆ GetVertices() [1/3]

virtual void mfem::Element::GetVertices ( Array< int > &  v) const
pure virtual

◆ GetVertices() [2/3]

virtual int* mfem::Element::GetVertices ( )
pure virtual
Note
The returned array should NOT be deleted by the caller.

Implemented in mfem::Tetrahedron, mfem::Triangle, mfem::Pyramid, mfem::Wedge, mfem::Quadrilateral, mfem::Segment, mfem::Hexahedron, and mfem::Point.

◆ GetVertices() [3/3]

const int* mfem::Element::GetVertices ( ) const
inline

Definition at line 69 of file element.hpp.

◆ MarkEdge()

virtual void mfem::Element::MarkEdge ( const DSTable v_to_v,
const int *  length 
)
inlinevirtual

Mark the longest edge by assuming/changing the order of the vertices.

Reimplemented in mfem::Tetrahedron, and mfem::Triangle.

Definition at line 88 of file element.hpp.

◆ NeedRefinement()

virtual int mfem::Element::NeedRefinement ( HashTable< Hashed2 > &  v_to_v) const
inlinevirtual

Return 1 if the element needs refinement in order to get conforming mesh.

Reimplemented in mfem::Tetrahedron, and mfem::Triangle.

Definition at line 91 of file element.hpp.

◆ PushTransform()

virtual void mfem::Element::PushTransform ( int  tr)
inlinevirtual

Add 'tr' to the current chain of coarse-fine transformations.

Reimplemented in mfem::Tetrahedron, and mfem::Triangle.

Definition at line 97 of file element.hpp.

◆ ResetTransform()

virtual void mfem::Element::ResetTransform ( int  tr)
inlinevirtual

Set current coarse-fine transformation number.

Reimplemented in mfem::Tetrahedron, and mfem::Triangle.

Definition at line 94 of file element.hpp.

◆ SetAttribute()

void mfem::Element::SetAttribute ( const int  attr)
inline

Set element's attribute.

Definition at line 58 of file element.hpp.

◆ SetVertices()

void mfem::Element::SetVertices ( const int *  ind)
virtual

Set the indices the element according to the input.

Reimplemented in mfem::Tetrahedron, mfem::Triangle, mfem::Pyramid, mfem::Wedge, mfem::Quadrilateral, and mfem::Segment.

Definition at line 17 of file element.cpp.

Member Data Documentation

◆ attribute

int mfem::Element::attribute
protected

Element's attribute (specifying material property, etc).

Definition at line 33 of file element.hpp.

◆ base_geom

Geometry::Type mfem::Element::base_geom
protected

Element's type from the Finite Element's perspective.

Definition at line 36 of file element.hpp.


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