MFEM  v3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Types | Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
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...
 
- Public Types inherited from mfem::Element
enum  Type {
  POINT, SEGMENT, TRIANGLE, QUADRILATERAL,
  TETRAHEDRON, HEXAHEDRON, BISECTED, QUADRISECTED,
  OCTASECTED
}
 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. More...
 
 Tetrahedron (int ind1, int ind2, int ind3, int ind4, int attr=1)
 Constructs tetrahedron by specifying the indices and the attribute. More...
 
void ParseRefinementFlag (int refinement_edges[2], int &type, int &flag)
 
void CreateRefinementFlag (int refinement_edges[2], int type, int flag=0)
 
virtual int GetRefinementFlag ()
 
void SetRefinementFlag (int rf)
 
virtual int NeedRefinement (DSTable &v_to_v, int *middle) const
 Return 1 if the element needs refinement in order to get conforming mesh. More...
 
virtual void SetVertices (const int *ind)
 Set the vertices according to the given input. More...
 
virtual void MarkEdge (DenseMatrix &pmat)
 Mark the longest edge by assuming/changing the order of the vertices. More...
 
virtual void MarkEdge (const DSTable &v_to_v, const int *length)
 
virtual int GetType () const
 Return element's type. More...
 
virtual void GetVertices (Array< int > &v) const
 Returns the indices of the element's vertices. More...
 
virtual int * GetVertices ()
 
virtual int GetNVertices () const
 
virtual int GetNEdges () const
 
virtual const int * GetEdgeVertices (int ei) const
 
virtual int GetNFaces (int &nFaceVertices) const
 
virtual const int * GetFaceVertices (int fi) const
 
virtual ElementDuplicate (Mesh *m) const
 
virtual ~Tetrahedron ()
 
- Public Member Functions inherited from mfem::Element
 Element (int bg=Geometry::POINT)
 Default element constructor. More...
 
int GetGeometryType () const
 
const int * GetVertices () const
 
int GetAttribute () const
 Return element's attribute. More...
 
void SetAttribute (const int attr)
 Set element's attribute. More...
 
virtual ~Element ()
 Destroys element. More...
 

Protected Attributes

int indices [4]
 
int refinement_flag
 
- Protected Attributes inherited from mfem::Element
int attribute
 Element's attribute (specifying material property, etc). More...
 
int base_geom
 

Static Protected Attributes

static const int edges [6][2]
 

Detailed Description

Data type tetrahedron element.

Definition at line 22 of file tetrahedron.hpp.

Member Enumeration Documentation

anonymous enum

Constants for different types of tetrahedrons.

Enumerator
TYPE_PU 
TYPE_A 
TYPE_PF 
TYPE_O 
TYPE_M 

Definition at line 41 of file tetrahedron.hpp.

Constructor & Destructor Documentation

mfem::Tetrahedron::Tetrahedron ( )
inline

Definition at line 43 of file tetrahedron.hpp.

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

Constructs tetrahedron by specifying the indices and the attribute.

Definition at line 104 of file tetrahedron.cpp.

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 113 of file tetrahedron.cpp.

virtual mfem::Tetrahedron::~Tetrahedron ( )
inlinevirtual

Definition at line 94 of file tetrahedron.hpp.

Member Function Documentation

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

Definition at line 40 of file tetrahedron.cpp.

Element * mfem::Tetrahedron::Duplicate ( Mesh m) const
virtual

Implements mfem::Element.

Definition at line 252 of file tetrahedron.cpp.

virtual const int* mfem::Tetrahedron::GetEdgeVertices ( int  ei) const
inlinevirtual

Implements mfem::Element.

Definition at line 84 of file tetrahedron.hpp.

virtual const int* mfem::Tetrahedron::GetFaceVertices ( int  fi) const
inlinevirtual

Implements mfem::Element.

Definition at line 89 of file tetrahedron.hpp.

virtual int mfem::Tetrahedron::GetNEdges ( ) const
inlinevirtual

Implements mfem::Element.

Definition at line 82 of file tetrahedron.hpp.

virtual int mfem::Tetrahedron::GetNFaces ( int &  nFaceVertices) const
inlinevirtual

Implements mfem::Element.

Definition at line 86 of file tetrahedron.hpp.

virtual int mfem::Tetrahedron::GetNVertices ( ) const
inlinevirtual

Implements mfem::Element.

Definition at line 80 of file tetrahedron.hpp.

virtual int mfem::Tetrahedron::GetRefinementFlag ( )
inlinevirtual

Reimplemented from mfem::Element.

Definition at line 54 of file tetrahedron.hpp.

virtual int mfem::Tetrahedron::GetType ( ) const
inlinevirtual

Return element's type.

Implements mfem::Element.

Definition at line 73 of file tetrahedron.hpp.

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

Returns the indices of the element's vertices.

Implements mfem::Element.

Definition at line 243 of file tetrahedron.cpp.

virtual int* mfem::Tetrahedron::GetVertices ( )
inlinevirtual

Implements mfem::Element.

Definition at line 78 of file tetrahedron.hpp.

virtual void mfem::Tetrahedron::MarkEdge ( DenseMatrix pmat)
inlinevirtual

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

Reimplemented from mfem::Element.

Definition at line 65 of file tetrahedron.hpp.

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

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 149 of file tetrahedron.cpp.

int mfem::Tetrahedron::NeedRefinement ( DSTable v_to_v,
int *  middle 
) const
virtual

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

Reimplemented from mfem::Element.

Definition at line 124 of file tetrahedron.cpp.

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

Definition at line 22 of file tetrahedron.cpp.

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

Definition at line 56 of file tetrahedron.hpp.

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

Set the vertices according to the given input.

Reimplemented from mfem::Element.

Definition at line 143 of file tetrahedron.cpp.

Member Data Documentation

const int mfem::Tetrahedron::edges
staticprotected
Initial value:
=
{{0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 3}, {2, 3}}

Definition at line 26 of file tetrahedron.hpp.

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

Definition at line 25 of file tetrahedron.hpp.

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 36 of file tetrahedron.hpp.


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