Defines a 3-Node (P1) triangle. More...

#include <Triang3.h>

Inheritance diagram for Triang3:
triangle FEShape

Public Member Functions

 Triang3 ()
 Default Constructor.
 
 Triang3 (const Element *el)
 Constructor for an element.
 
 Triang3 (const Side *sd)
 Constructor for a side.
 
 ~Triang3 ()
 Destructor.
 
void set (const Element *el)
 Choose element by giving its pointer.
 
void set (const Side *sd)
 Choose side by giving its pointer.
 
real_t Sh (size_t i, Point< real_t > s) const
 Calculate shape function of node at a given point.
 
std::vector< Point< real_t > > DSh () const
 Return partial derivatives of shape functions of element nodes.
 
real_t getInterpolate (const Point< real_t > &x, const LocalVect< real_t, 3 > &v)
 Return interpolated value at point of coordinate x
 
real_t check () const
 Check element area and number of nodes.
 
Point< real_t > Grad (const LocalVect< real_t, 3 > &u) const
 Return constant gradient vector in triangle.
 
real_t getMaxEdgeLength () const
 Return maximal edge length of triangle.
 
real_t getMinEdgeLength () const
 Return minimal edge length of triangle.
 
- Public Member Functions inherited from triangle
 triangle ()
 Default Constructor.
 
 triangle (const Element *el)
 Constructor for an element.
 
 triangle (const Side *sd)
 Constructor for a side.
 
virtual ~triangle ()
 Destructor.
 
real_t getArea ()
 Return element area.
 
Point< real_t > getCenter () const
 Return coordinates of center of element.
 
Point< real_t > getCircumcenter () const
 Return coordinates of circumcenter of element.
 
real_t getCircumRadius () const
 Return radius of circumscribed circle of triangle.
 
real_t getInRadius () const
 Return radius of inscribed circle of triangle.
 
Point< real_t > getRefCoord (const Point< real_t > &x) const
 Return reference coordinates of a point x in element.
 
real_t getMaxEdgeLength () const
 Return maximal edge length of triangle.
 
real_t getMinEdgeLength () const
 Return minimal edge length of triangle.
 
bool isIn (const Point< real_t > &x) const
 Check whether point x is in current triangle or not.
 
bool isStrictlyIn (const Point< real_t > &x) const
 Check whether point x is strictly in current triangle (not on the boundary) or not.
 
- Public Member Functions inherited from FEShape
 FEShape ()
 Default Constructor.
 
 FEShape (const Element *el)
 Constructor for an element.
 
 FEShape (const Side *sd)
 Constructor for a side.
 
virtual ~FEShape ()
 Destructor.
 
real_t Sh (size_t i) const
 Return shape function of node i at given point.
 
real_t Sh (size_t i, Point< real_t > s) const
 Calculate shape function of node i at a given point s.
 
real_t getDet () const
 Return determinant of jacobian.
 
Point< real_t > getCenter () const
 Return coordinates of center of element.
 
Point< real_t > getLocalPoint () const
 Localize a point in the element.
 
Point< real_t > getLocalPoint (const Point< real_t > &s) const
 Localize a point in the element.
 

Detailed Description

Defines a 3-Node (P1) triangle.

The reference element is the rectangle triangle with two unit edges.

Author
Rachid Touzani

Constructor & Destructor Documentation

◆ Triang3() [1/2]

Triang3 ( const Element el)

Constructor for an element.

The constructed triangle is an element in a 2-D mesh.

◆ Triang3() [2/2]

Triang3 ( const Side sd)

Constructor for a side.

The constructed triangle is a side in a 3-D mesh.

Member Function Documentation

◆ check()

real_t check ( ) const

Check element area and number of nodes.

Returns
  • > 0: m is the length
  • = 0: zero length (=> Error)

◆ DSh()

std::vector< Point< real_t > > DSh ( ) const

Return partial derivatives of shape functions of element nodes.

Returns
Vector of partial derivatives of shape functions e.g. dsh[i-1].x, dsh[i-1].y, are partial derivatives of the i-th shape function.

◆ Grad()

Point< real_t > Grad ( const LocalVect< real_t, 3 > &  u) const

Return constant gradient vector in triangle.

Parameters
[in]uLocal vector for which the gradient is evaluated

◆ Sh()

real_t Sh ( size_t  i,
Point< real_t >  s 
) const

Calculate shape function of node at a given point.

Parameters
[in]iLabel (local) of node
[in]sNatural coordinates of node where to evaluate