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

Data type triangle element. More...

#include <triangle.hpp>

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

Public Types

typedef Geometry::Constants< Geometry::TRIANGLEgeom_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

 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.
 
Type GetType () const override
 Return element's type.
 
int NeedRefinement (HashTable< Hashed2 > &v_to_v) const override
 Return 1 if the element needs refinement in order to get conforming mesh.
 
void MarkEdge (DenseMatrix &pmat)
 
void MarkEdge (const DSTable &v_to_v, const int *length) override
 Mark the longest edge by assuming/changing the order of the vertices.
 
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 ~Triangle ()=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 MarkEdge (int *indices, const DSTable &v_to_v, const int *length)
 
static void GetPointMatrix (unsigned transform, DenseMatrix &pm)
 Calculate point matrix corresponding to a chain of transformations.
 

Protected Attributes

int indices [3]
 
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 triangle element.

Definition at line 23 of file triangle.hpp.

Member Typedef Documentation

◆ geom_t

Constructor & Destructor Documentation

◆ Triangle() [1/3]

mfem::Triangle::Triangle ( )
inline

Definition at line 33 of file triangle.hpp.

◆ Triangle() [2/3]

mfem::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.

◆ Triangle() [3/3]

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

Constructs triangle by specifying the indices and the attribute.

Definition at line 27 of file triangle.cpp.

◆ ~Triangle()

virtual mfem::Triangle::~Triangle ( )
virtualdefault

Member Function Documentation

◆ Duplicate()

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

Implements mfem::Element.

Definition at line 99 of file triangle.hpp.

◆ GetEdgeVertices()

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

Implements mfem::Element.

Definition at line 85 of file triangle.hpp.

◆ GetFaceVertices()

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

Implements mfem::Element.

Definition at line 96 of file triangle.hpp.

◆ GetNEdges()

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

Implements mfem::Element.

Definition at line 83 of file triangle.hpp.

◆ GetNFaces() [1/2]

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

Implements mfem::Element.

Definition at line 92 of file triangle.hpp.

◆ GetNFaces() [2/2]

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

Implements mfem::Element.

Definition at line 89 of file triangle.hpp.

◆ GetNFaceVertices()

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

Implements mfem::Element.

Definition at line 94 of file triangle.hpp.

◆ GetNVertices()

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

Implements mfem::Element.

Definition at line 81 of file triangle.hpp.

◆ GetPointMatrix()

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

Calculate point matrix corresponding to a chain of transformations.

Definition at line 126 of file triangle.cpp.

◆ GetTransform()

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

Return current coarse-fine transformation.

Reimplemented from mfem::Element.

Definition at line 59 of file triangle.hpp.

◆ GetType()

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

Return element's type.

Implements mfem::Element.

Definition at line 42 of file triangle.hpp.

◆ GetVertices() [1/2]

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

Implements mfem::Element.

Definition at line 75 of file triangle.hpp.

◆ GetVertices() [2/2]

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

Get the indices defining the vertices.

Implements mfem::Element.

Definition at line 188 of file triangle.cpp.

◆ MarkEdge() [1/3]

void mfem::Triangle::MarkEdge ( const DSTable & v_to_v,
const int * length )
inlineoverridevirtual

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

Reimplemented from mfem::Element.

Definition at line 55 of file triangle.hpp.

◆ MarkEdge() [2/3]

void mfem::Triangle::MarkEdge ( DenseMatrix & pmat)

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.

Definition at line 53 of file triangle.cpp.

◆ MarkEdge() [3/3]

void mfem::Triangle::MarkEdge ( int * indices,
const DSTable & v_to_v,
const int * length )
static

Definition at line 101 of file triangle.cpp.

◆ NeedRefinement()

int mfem::Triangle::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 37 of file triangle.cpp.

◆ PushTransform()

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

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

Reimplemented from mfem::Element.

Definition at line 62 of file triangle.hpp.

◆ ResetTransform()

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

Set current coarse-fine transformation number.

Reimplemented from mfem::Element.

Definition at line 58 of file triangle.hpp.

◆ SetVertices() [1/2]

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

Set the indices defining the vertices.

Implements mfem::Element.

Definition at line 194 of file triangle.cpp.

◆ SetVertices() [2/2]

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

Set the indices defining the vertices.

Implements mfem::Element.

Definition at line 45 of file triangle.cpp.

Member Data Documentation

◆ indices

int mfem::Triangle::indices[3]
protected

Definition at line 26 of file triangle.hpp.

◆ transform

unsigned mfem::Triangle::transform
protected

Definition at line 28 of file triangle.hpp.


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