MFEM v2.0
|
Data type triangle element. More...
#include <triangle.hpp>
Public Member Functions | |
Triangle () | |
Triangle (const int *ind, int attr=1) | |
Constructs triangle by specifying the indices and the attribute. | |
Triangle (int ind1, int ind2, int ind3, int attr=1) | |
Constructs triangle by specifying the indices and the attribute. | |
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) |
virtual void | MarkEdge (const DSTable &v_to_v, const int *length) |
Mark the longest edge by assuming/changing the order of the vertices. | |
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 | ~Triangle () |
Protected Attributes | |
int | indices [3] |
Static Protected Attributes | |
static const int | edges [3][2] = {{0, 1}, {1, 2}, {2, 0}} |
Data type triangle element.
Definition at line 16 of file triangle.hpp.
Triangle::Triangle | ( | ) | [inline] |
Definition at line 24 of file triangle.hpp.
Referenced by Duplicate().
Triangle::Triangle | ( | const int * | ind, |
int | attr = 1 |
||
) |
Constructs triangle by specifying the indices and the attribute.
Definition at line 17 of file triangle.cpp.
References Element::attribute, and indices.
Triangle::Triangle | ( | int | ind1, |
int | ind2, | ||
int | ind3, | ||
int | attr = 1 |
||
) |
Constructs triangle by specifying the indices and the attribute.
Definition at line 24 of file triangle.cpp.
References Element::attribute, and indices.
virtual Triangle::~Triangle | ( | ) | [inline, virtual] |
Definition at line 63 of file triangle.hpp.
Implements Element.
Definition at line 60 of file triangle.hpp.
References Element::attribute, indices, and Triangle().
virtual const int* Triangle::GetEdgeVertices | ( | int | ei | ) | const [inline, virtual] |
virtual int Triangle::GetNEdges | ( | ) | const [inline, virtual] |
Implements Element.
Definition at line 56 of file triangle.hpp.
virtual int Triangle::GetNVertices | ( | ) | const [inline, virtual] |
Implements Element.
Definition at line 54 of file triangle.hpp.
virtual int Triangle::GetType | ( | ) | const [inline, virtual] |
Return element's type.
Implements Element.
Definition at line 47 of file triangle.hpp.
References Element::TRIANGLE.
virtual int* Triangle::GetVertices | ( | ) | [inline, virtual] |
void Triangle::GetVertices | ( | Array< int > & | v | ) | const [virtual] |
Returns the indices of the element's vertices.
Implements Element.
Definition at line 109 of file triangle.cpp.
References indices, and Array< T >::SetSize().
Referenced by Mesh::Bisection().
void Triangle::MarkEdge | ( | const DSTable & | v_to_v, |
const int * | length | ||
) | [virtual] |
Mark the longest edge by assuming/changing the order of the vertices.
Reimplemented from Element.
Definition at line 87 of file triangle.cpp.
References indices.
void Triangle::MarkEdge | ( | DenseMatrix & | pmat | ) | [virtual] |
Reorder the vertices so that the longest edge is from vertex 0 to vertex 0. If called it should be once from the mesh constructor, becouse the order may be used later for setting the edges.
Reimplemented from Element.
Definition at line 49 of file triangle.cpp.
References indices.
int Triangle::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 33 of file triangle.cpp.
References indices.
void Triangle::SetVertices | ( | const int * | ind | ) | [virtual] |
Set the vertices according to the given input.
Reimplemented from Element.
Definition at line 43 of file triangle.cpp.
References indices.
Referenced by Mesh::Bisection().
const int Triangle::edges = {{0, 1}, {1, 2}, {2, 0}} [static, protected] |
Definition at line 20 of file triangle.hpp.
Referenced by GetEdgeVertices().
int Triangle::indices[3] [protected] |
Definition at line 19 of file triangle.hpp.
Referenced by Duplicate(), GetVertices(), MarkEdge(), NeedRefinement(), SetVertices(), and Triangle().