MFEM v2.0
Public Member Functions | Protected Attributes | Static Protected Attributes
Triangle Class Reference

Data type triangle element. More...

#include <triangle.hpp>

Inheritance diagram for Triangle:
Inheritance graph
[legend]
Collaboration diagram for Triangle:
Collaboration graph
[legend]

List of all members.

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 ElementDuplicate (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}}

Detailed Description

Data type triangle element.

Definition at line 16 of file triangle.hpp.


Constructor & Destructor Documentation

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.


Member Function Documentation

virtual Element* Triangle::Duplicate ( Mesh m) const [inline, virtual]

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]

Implements Element.

Definition at line 58 of file triangle.hpp.

References edges.

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]

Implements Element.

Definition at line 52 of file triangle.hpp.

References indices.

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().


Member Data Documentation

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().


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines