MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::Tetrahedron Class Reference

Data type tetrahedron element. More...

#include <tetrahedron.hpp>

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

Public Types

enum  {
  TYPE_PU =0 , TYPE_A =1 , TYPE_PF =2 , TYPE_O =3 ,
  TYPE_M =4
}
 Constants for different types of tetrahedrons. More...
 
typedef Geometry::Constants< Geometry::TETRAHEDRONgeom_t
 
- Public Types inherited from mfem::Element
enum  Type {
  POINT , SEGMENT , TRIANGLE , QUADRILATERAL ,
  TETRAHEDRON , HEXAHEDRON , WEDGE , PYRAMID
}
 Constants for the classes derived from Element. More...
 

Public Member Functions

 Tetrahedron ()
 
 Tetrahedron (const int *ind, int attr=1)
 Constructs tetrahedron by specifying the indices and the attribute.
 
 Tetrahedron (int ind1, int ind2, int ind3, int ind4, int attr=1)
 Constructs tetrahedron by specifying the indices and the attribute.
 
void Init (int ind1, int ind2, int ind3, int ind4, int attr=1, int ref_flag=0)
 Initialize the vertex indices and the attribute of a Tetrahedron.
 
Type GetType () const override
 Return element's type.
 
void ParseRefinementFlag (int refinement_edges[2], int &type, int &flag) const
 
void CreateRefinementFlag (int refinement_edges[2], int type, int flag=0)
 
void GetMarkedFace (const int face, int *fv) const
 
int GetRefinementFlag () const
 
void SetRefinementFlag (int rf)
 
int NeedRefinement (HashTable< Hashed2 > &v_to_v) const override
 Return 1 if the element needs refinement in order to get conforming mesh.
 
void MarkEdge (const DSTable &v_to_v, const int *length) override
 
void ResetTransform (int tr) override
 Set current coarse-fine transformation number.
 
unsigned GetTransform () const override
 Return current coarse-fine transformation.
 
void PushTransform (int tr) override
 Add 'tr' to the current chain of coarse-fine transformations.
 
void GetVertices (Array< int > &v) const override
 Get the indices defining the vertices.
 
void SetVertices (const Array< int > &v) override
 Set the indices defining the vertices.
 
int * GetVertices () override
 
void SetVertices (const int *ind) override
 Set the indices defining the vertices.
 
int GetNVertices () const override
 
int GetNEdges () const override
 
const int * GetEdgeVertices (int ei) const override
 
MFEM_DEPRECATED int GetNFaces (int &nFaceVertices) const override
 
int GetNFaces () const override
 
int GetNFaceVertices (int) const override
 
const int * GetFaceVertices (int fi) const override
 
ElementDuplicate (Mesh *m) const override
 
virtual ~Tetrahedron ()=default
 
- Public Member Functions inherited from mfem::Element
 Element (Geometry::Type bg=Geometry::POINT)
 Default element constructor.
 
Geometry::Type GetGeometryType () const
 
int GetAttribute () const
 Return element's attribute.
 
void SetAttribute (const int attr)
 Set element's attribute.
 
const int * GetVertices () const
 
virtual ~Element ()
 Destroys element.
 

Static Public Member Functions

static void GetPointMatrix (unsigned transform, DenseMatrix &pm)
 Calculate point matrix corresponding to a chain of transformations.
 

Protected Attributes

int indices [4]
 
int refinement_flag
 
unsigned transform
 
- Protected Attributes inherited from mfem::Element
int attribute
 Element's attribute (specifying material property, etc).
 
Geometry::Type base_geom
 Element's type from the Finite Element's perspective.
 

Detailed Description

Data type tetrahedron element.

Definition at line 22 of file tetrahedron.hpp.

Member Typedef Documentation

◆ geom_t

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Constants for different types of tetrahedrons.

Enumerator
TYPE_PU 
TYPE_A 
TYPE_PF 
TYPE_O 
TYPE_M 

Definition at line 43 of file tetrahedron.hpp.

Constructor & Destructor Documentation

◆ Tetrahedron() [1/3]

mfem::Tetrahedron::Tetrahedron ( )
inline

Definition at line 45 of file tetrahedron.hpp.

◆ Tetrahedron() [2/3]

mfem::Tetrahedron::Tetrahedron ( const int * ind,
int attr = 1 )

Constructs tetrahedron by specifying the indices and the attribute.

Definition at line 19 of file tetrahedron.cpp.

◆ Tetrahedron() [3/3]

mfem::Tetrahedron::Tetrahedron ( int ind1,
int ind2,
int ind3,
int ind4,
int attr = 1 )

Constructs tetrahedron by specifying the indices and the attribute.

Definition at line 31 of file tetrahedron.cpp.

◆ ~Tetrahedron()

virtual mfem::Tetrahedron::~Tetrahedron ( )
virtualdefault

Member Function Documentation

◆ CreateRefinementFlag()

void mfem::Tetrahedron::CreateRefinementFlag ( int refinement_edges[2],
int type,
int flag = 0 )

Definition at line 71 of file tetrahedron.cpp.

◆ Duplicate()

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

Implements mfem::Element.

Definition at line 339 of file tetrahedron.cpp.

◆ GetEdgeVertices()

const int * mfem::Tetrahedron::GetEdgeVertices ( int ei) const
inlineoverridevirtual

Implements mfem::Element.

Definition at line 105 of file tetrahedron.hpp.

◆ GetFaceVertices()

const int * mfem::Tetrahedron::GetFaceVertices ( int fi) const
inlineoverridevirtual

Implements mfem::Element.

Definition at line 116 of file tetrahedron.hpp.

◆ GetMarkedFace()

void mfem::Tetrahedron::GetMarkedFace ( const int face,
int * fv ) const

Definition at line 137 of file tetrahedron.cpp.

◆ GetNEdges()

int mfem::Tetrahedron::GetNEdges ( ) const
inlineoverridevirtual

Implements mfem::Element.

Definition at line 103 of file tetrahedron.hpp.

◆ GetNFaces() [1/2]

int mfem::Tetrahedron::GetNFaces ( void ) const
inlineoverridevirtual

Implements mfem::Element.

Definition at line 112 of file tetrahedron.hpp.

◆ GetNFaces() [2/2]

MFEM_DEPRECATED int mfem::Tetrahedron::GetNFaces ( int & nFaceVertices) const
inlineoverridevirtual
Deprecated
Use GetNFaces(void) and GetNFaceVertices(int) instead.

Implements mfem::Element.

Definition at line 109 of file tetrahedron.hpp.

◆ GetNFaceVertices()

int mfem::Tetrahedron::GetNFaceVertices ( int ) const
inlineoverridevirtual

Implements mfem::Element.

Definition at line 114 of file tetrahedron.hpp.

◆ GetNVertices()

int mfem::Tetrahedron::GetNVertices ( ) const
inlineoverridevirtual

Implements mfem::Element.

Definition at line 101 of file tetrahedron.hpp.

◆ GetPointMatrix()

void mfem::Tetrahedron::GetPointMatrix ( unsigned transform,
DenseMatrix & pm )
static

Calculate point matrix corresponding to a chain of transformations.

Definition at line 285 of file tetrahedron.cpp.

◆ GetRefinementFlag()

int mfem::Tetrahedron::GetRefinementFlag ( ) const
inline

Definition at line 67 of file tetrahedron.hpp.

◆ GetTransform()

unsigned mfem::Tetrahedron::GetTransform ( ) const
inlineoverridevirtual

Return current coarse-fine transformation.

Reimplemented from mfem::Element.

Definition at line 80 of file tetrahedron.hpp.

◆ GetType()

Type mfem::Tetrahedron::GetType ( ) const
inlineoverridevirtual

Return element's type.

Implements mfem::Element.

Definition at line 59 of file tetrahedron.hpp.

◆ GetVertices() [1/2]

int * mfem::Tetrahedron::GetVertices ( )
inlineoverridevirtual
Note
The returned array should NOT be deleted by the caller.

Implements mfem::Element.

Definition at line 96 of file tetrahedron.hpp.

◆ GetVertices() [2/2]

void mfem::Tetrahedron::GetVertices ( Array< int > & v) const
overridevirtual

Get the indices defining the vertices.

Implements mfem::Element.

Definition at line 327 of file tetrahedron.cpp.

◆ Init()

void mfem::Tetrahedron::Init ( int ind1,
int ind2,
int ind3,
int ind4,
int attr = 1,
int ref_flag = 0 )

Initialize the vertex indices and the attribute of a Tetrahedron.

Definition at line 43 of file tetrahedron.cpp.

◆ MarkEdge()

void mfem::Tetrahedron::MarkEdge ( const DSTable & v_to_v,
const int * length )
overridevirtual

Reorder the vertices so that the longest edge is from vertex 0 to vertex 1. If called it should be once from the mesh constructor, because the order may be used later for setting the edges.

Reimplemented from mfem::Element.

Definition at line 188 of file tetrahedron.cpp.

◆ NeedRefinement()

int mfem::Tetrahedron::NeedRefinement ( HashTable< Hashed2 > & v_to_v) const
overridevirtual

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

Reimplemented from mfem::Element.

Definition at line 169 of file tetrahedron.cpp.

◆ ParseRefinementFlag()

void mfem::Tetrahedron::ParseRefinementFlag ( int refinement_edges[2],
int & type,
int & flag ) const

Definition at line 55 of file tetrahedron.cpp.

◆ PushTransform()

void mfem::Tetrahedron::PushTransform ( int tr)
inlineoverridevirtual

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

Reimplemented from mfem::Element.

Definition at line 83 of file tetrahedron.hpp.

◆ ResetTransform()

void mfem::Tetrahedron::ResetTransform ( int tr)
inlineoverridevirtual

Set current coarse-fine transformation number.

Reimplemented from mfem::Element.

Definition at line 79 of file tetrahedron.hpp.

◆ SetRefinementFlag()

void mfem::Tetrahedron::SetRefinementFlag ( int rf)
inline

Definition at line 69 of file tetrahedron.hpp.

◆ SetVertices() [1/2]

void mfem::Tetrahedron::SetVertices ( const Array< int > & v)
overridevirtual

Set the indices defining the vertices.

Implements mfem::Element.

Definition at line 333 of file tetrahedron.cpp.

◆ SetVertices() [2/2]

void mfem::Tetrahedron::SetVertices ( const int * ind)
overridevirtual

Set the indices defining the vertices.

Implements mfem::Element.

Definition at line 180 of file tetrahedron.cpp.

Member Data Documentation

◆ indices

int mfem::Tetrahedron::indices[4]
protected

Definition at line 25 of file tetrahedron.hpp.

◆ refinement_flag

int mfem::Tetrahedron::refinement_flag
protected

The refinement flag keeps (in order) :

  1. Two marked edges given with local index (0..5) for the two faces that don't have the refinement edge as edge. The refinement edge is determined by the first two nodes of the tetrahedron. Each marked edge is stored in 3 bits (or as implemented in the functions CreateRefinementFlag and ParseRefinementFlag.
  2. Type of the element, stored in the next 3 bits.
  3. The rest is free for now.

Definition at line 35 of file tetrahedron.hpp.

◆ transform

unsigned mfem::Tetrahedron::transform
protected

Definition at line 37 of file tetrahedron.hpp.


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