MFEM v2.0
|
Data type tetrahedron element. More...
#include <tetrahedron.hpp>
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 Member Functions | |
Tetrahedron () | |
Tetrahedron (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 | 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. | |
virtual void | SetVertices (const int *ind) |
Set the vertices according to the given input. | |
virtual void | MarkEdge (DenseMatrix &pmat) |
Mark the longest edge by assuming/changing the order of the vertices. | |
virtual void | MarkEdge (const DSTable &v_to_v, const int *length) |
virtual int | GetType () const |
Return element's type. | |
virtual void | GetVertices (Array< int > &v) const |
Returns the indices of the element's vertices. | |
virtual int * | GetVertices () |
virtual int | GetNVertices () const |
virtual int | GetNEdges () const |
virtual const int * | GetEdgeVertices (int ei) const |
virtual Element * | Duplicate (Mesh *m) const |
virtual | ~Tetrahedron () |
Protected Attributes | |
int | indices [4] |
int | refinement_flag |
Static Protected Attributes | |
static const int | edges [6][2] |
Data type tetrahedron element.
Definition at line 16 of file tetrahedron.hpp.
anonymous enum |
Constants for different types of tetrahedrons.
Definition at line 35 of file tetrahedron.hpp.
Tetrahedron::Tetrahedron | ( | ) | [inline] |
Definition at line 37 of file tetrahedron.hpp.
References refinement_flag.
Referenced by Duplicate().
Tetrahedron::Tetrahedron | ( | int * | ind, |
int | attr = 1 |
||
) |
Constructs tetrahedron by specifying the indices and the attribute.
Definition at line 102 of file tetrahedron.cpp.
References Element::attribute, indices, and refinement_flag.
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 110 of file tetrahedron.cpp.
References Element::attribute, indices, and refinement_flag.
virtual Tetrahedron::~Tetrahedron | ( | ) | [inline, virtual] |
Definition at line 82 of file tetrahedron.hpp.
void Tetrahedron::CreateRefinementFlag | ( | int | refinement_edges[2], |
int | type, | ||
int | flag = 0 |
||
) |
Definition at line 38 of file tetrahedron.cpp.
References mfem_error(), refinement_flag, TYPE_A, TYPE_M, TYPE_O, TYPE_PF, and TYPE_PU.
Referenced by Mesh::Bisection(), and MarkEdge().
Implements Element.
Definition at line 245 of file tetrahedron.cpp.
References Element::attribute, indices, refinement_flag, Element::SetAttribute(), SetRefinementFlag(), SetVertices(), and Tetrahedron().
virtual const int* Tetrahedron::GetEdgeVertices | ( | int | ei | ) | const [inline, virtual] |
virtual int Tetrahedron::GetNEdges | ( | ) | const [inline, virtual] |
Implements Element.
Definition at line 76 of file tetrahedron.hpp.
virtual int Tetrahedron::GetNVertices | ( | ) | const [inline, virtual] |
Implements Element.
Definition at line 74 of file tetrahedron.hpp.
virtual int Tetrahedron::GetRefinementFlag | ( | ) | [inline, virtual] |
Reimplemented from Element.
Definition at line 48 of file tetrahedron.hpp.
References refinement_flag.
Referenced by Mesh::Bisection().
virtual int Tetrahedron::GetType | ( | ) | const [inline, virtual] |
Return element's type.
Implements Element.
Definition at line 67 of file tetrahedron.hpp.
References Element::TETRAHEDRON.
void Tetrahedron::GetVertices | ( | Array< int > & | v | ) | const [virtual] |
Returns the indices of the element's vertices.
Implements Element.
Definition at line 236 of file tetrahedron.cpp.
References indices, and Array< T >::SetSize().
Referenced by Mesh::Bisection().
virtual int* Tetrahedron::GetVertices | ( | ) | [inline, virtual] |
void 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 Element.
Definition at line 146 of file tetrahedron.cpp.
References CreateRefinementFlag(), indices, TYPE_A, TYPE_M, TYPE_O, and TYPE_PU.
virtual void Tetrahedron::MarkEdge | ( | DenseMatrix & | pmat | ) | [inline, virtual] |
Mark the longest edge by assuming/changing the order of the vertices.
Reimplemented from Element.
Definition at line 59 of file tetrahedron.hpp.
int 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 Element.
Definition at line 121 of file tetrahedron.cpp.
References indices.
void Tetrahedron::ParseRefinementFlag | ( | int | refinement_edges[2], |
int & | type, | ||
int & | flag | ||
) |
Definition at line 20 of file tetrahedron.cpp.
References mfem_error(), and refinement_flag.
Referenced by Mesh::Bisection(), Mesh::BisectTetTrans(), and Mesh::GetRefinementType().
void Tetrahedron::SetRefinementFlag | ( | int | rf | ) | [inline] |
Definition at line 50 of file tetrahedron.hpp.
References refinement_flag.
Referenced by Duplicate().
void Tetrahedron::SetVertices | ( | const int * | ind | ) | [virtual] |
Set the vertices according to the given input.
Reimplemented from Element.
Definition at line 140 of file tetrahedron.cpp.
References indices.
Referenced by Mesh::AddTet(), Mesh::Bisection(), Duplicate(), and Mesh::Load().
const int Tetrahedron::edges [static, protected] |
{{0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 3}, {2, 3}}
Definition at line 20 of file tetrahedron.hpp.
Referenced by NURBSExtension::CheckBdrPatches(), NURBSExtension::CheckPatches(), NURBSExtension::GenerateOffsets(), NURBSExtension::GetBdrPatchKnotVectors(), GetEdgeVertices(), NURBSExtension::GetPatchKnotVectors(), NURBSExtension::KnotInsert(), and NURBSExtension::NURBSExtension().
int Tetrahedron::indices[4] [protected] |
Definition at line 19 of file tetrahedron.hpp.
Referenced by Duplicate(), GetVertices(), MarkEdge(), NeedRefinement(), SetVertices(), and Tetrahedron().
int 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 30 of file tetrahedron.hpp.
Referenced by CreateRefinementFlag(), Duplicate(), GetRefinementFlag(), ParseRefinementFlag(), SetRefinementFlag(), and Tetrahedron().