![]() |
NLMech
0.1.0
|
A class for mapping and quadrature related operations for linear tetrahedron element. More...
#include <tetElem.h>


Public Member Functions | |
| double | elemSize (const std::vector< util::Point3 > &nodes) override |
| Returns the volume of element. More... | |
| std::vector< std::vector< double > > | getDerShapes (const util::Point3 &p, const std::vector< util::Point3 > &nodes) override |
| Returns the values of derivative of shape function at point p. More... | |
| std::vector< fe::QuadData > | getQuadDatas (const std::vector< util::Point3 > &nodes) override |
| Get vector of quadrature data. More... | |
| std::vector< fe::QuadData > | getQuadPoints (const std::vector< util::Point3 > &nodes) override |
| Get vector of quadrature data. More... | |
| std::vector< double > | getShapes (const util::Point3 &p, const std::vector< util::Point3 > &nodes) override |
| Returns the values of shape function at point p. More... | |
| void | print (int nt=0, int lvl=0) const |
| Prints the information about the instance of the object. More... | |
| std::string | printStr (int nt=0, int lvl=0) const |
| Returns the string containing information about the instance of the object. More... | |
| TetElem (size_t order) | |
| Constructor. More... | |
Public Member Functions inherited from fe::BaseElem | |
| BaseElem (size_t order, size_t element_type) | |
| Constructor. More... | |
| size_t | getElemType () |
| Get element type. More... | |
| size_t | getNumQuadPoints () |
| Get number of quadrature points in the data. More... | |
| size_t | getQuadOrder () |
| Get order of quadrature approximation. More... | |
| void | print (int nt=0, int lvl=0) const |
| Prints the information about the instance of the object. More... | |
| std::string | printStr (int nt=0, int lvl=0) const |
| Returns the string containing information about the instance of the object. More... | |
Private Member Functions | |
| std::vector< std::vector< double > > | getDerShapes (const util::Point3 &p) override |
| Returns the values of derivative of shape function at point p on reference element. More... | |
| double | getJacobian (const util::Point3 &p, const std::vector< util::Point3 > &nodes, std::vector< std::vector< double >> *J) override |
Computes the Jacobian of map . More... | |
| std::vector< double > | getShapes (const util::Point3 &p) override |
| Returns the values of shape function at point p on reference element. More... | |
| void | init () override |
| Compute the quadrature points for triangle element. | |
| util::Point3 | mapPointToRefElem (const util::Point3 &p, const std::vector< util::Point3 > &nodes) override |
| Maps point p in a given element to the reference element. More... | |
A class for mapping and quadrature related operations for linear tetrahedron element.
The reference tetrahedron element
is given by vertices
.
are
is given by
are vertices of element
.
is given by
) is constant. For linear tetrahedron elements, we simply have
.
for linear tetrahedron element can be easily derived. The derivation of the map is provided below:From map
we have
Substituting formula for
in above to get
or
Writing above in matrix form, we have
Denoting the matrix as
. Note that
is transpose of Jacobin of map
therefore
. Inverse of
is
With
we have inverse map given by
|
explicit |
Constructor.
| order | Order of quadrature point approximation |
|
overridevirtual |
Returns the volume of element.
If tetrahedron
is given by points
then the volume is
where
are the x, y, z component of point
.
Note that volume and Jacobian of map
are related as
Here,
.
| nodes | Vertices of element |
Implements fe::BaseElem.
|
overrideprivatevirtual |
Returns the values of derivative of shape function at point p on reference element.
| p | Location of point |
Implements fe::BaseElem.
|
overridevirtual |
Returns the values of derivative of shape function at point p.
Below, we present the derivation of the formula:
We are interested in
,
and
. By using the map
we have
and therefore we can write
and
which can be written in the matrix form as
The matrix is the Jacobian matrix
and can be computed easily if vertices of elements are known. Using
we have following formula for derivatives of the shape function
Here, derivatives
,
and
correspond to reference element and are easy to compute.
| p | Location of point |
| nodes | Vertices of element |
Reimplemented from fe::BaseElem.

|
overrideprivatevirtual |
Computes the Jacobian of map
.
| p | Location of point in reference element |
| nodes | Vertices of element |
| J | Matrix to store the Jacobian (if not nullptr) |
Implements fe::BaseElem.

|
overridevirtual |
Get vector of quadrature data.
Given element vertices, this method returns the list of quadrature point and essential quantities at quadrature points. Here, order of quadrature approximation is set in the constructor. List of data
Let
is the given tetrahedron with vertices
and let
is the reference tetrahedron.
, and then we use the map
to map the points on reference tetrahedron to the given triangle
.
. Suppose
is the quadrature weight associated to quadrature point
, then the quadrature point
associated to the mapped point
is given by
is the determinant of the Jacobian of map
.
associated to
at the quadrature point
using formula
associated to
, we use the relation between derivatives of shape function in
and
described in fe::TetElem::getDerShapes.| nodes | Vector of vertices of an element |
Implements fe::BaseElem.

|
overridevirtual |
Get vector of quadrature data.
Given element vertices, this method returns the list of quadrature point and essential quantities at quadrature points. Here, order of quadrature approximation is set in the constructor. List of data
This function is lite version of fe::TetElem::getQuadDatas.
| nodes | Vector of vertices of an element |
Implements fe::BaseElem.
|
overrideprivatevirtual |
Returns the values of shape function at point p on reference element.
| p | Location of point |
Implements fe::BaseElem.
|
overridevirtual |
Returns the values of shape function at point p.
We first map the point p in
to reference tetrahedron
using fe::TetElem::mapPointToRefElem and then compute shape functions at the mapped point using fe::TetElem::getShapes(const util::Point3 &).
| p | Location of point |
| nodes | Vertices of element |
Reimplemented from fe::BaseElem.
|
overrideprivatevirtual |
Maps point p in a given element to the reference element.
Let
are three vertices of triangle
and let
is the reference triangle. Following the introduction to fe::TriElem, the map
to
is given by
is the inverse of matrix
i.e.
If mapped point
does not satisfy following conditions
does not belong to the reference triangle or equivalently point
does not belong to the triangle
and the method issues error. Otherwise the method returns point
.| p | Location of point |
| nodes | Vertices of element |
Reimplemented from fe::BaseElem.

|
inline |
Prints the information about the instance of the object.
| nt | Number of tabs to append before each line of string |
| lvl | Level of information sought (higher level means more information) |

| std::string fe::TetElem::printStr | ( | int | nt = 0, |
| int | lvl = 0 |
||
| ) | const |
Returns the string containing information about the instance of the object.
| nt | Number of tabs to append before each line of string |
| lvl | Level of information sought (higher level means more information) |
Referenced by print().

