![]() |
NLMech
0.1.0
|
A class for mapping and quadrature related operations for linear 2-node line element. More...
#include <lineElem.h>


Public Member Functions | |
| double | elemSize (const std::vector< util::Point3 > &nodes) override |
| Returns the length 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... | |
| LineElem (size_t order) | |
| Constructor for line element. 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... | |
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 Jacobian of the 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 line 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 2-node line element.
The reference line element
is given by vertices at
.
are
is given by
are vertices of element
. For 1-d points, we simply have
.
is given by
from
to
is given by
|
explicit |
Constructor for line element.
| order | Order of quadrature point approximation |
|
overridevirtual |
Returns the length of element.
If line
is given by points
then the length is simply
| 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.
Let
is the point on line
and let
is the point on reference line
. Let shape functions on
are
and on
are
.
We are interested in
. By using the map
we have
and therefore we can write
Since
is a Jacobian of map which can be computed easily if
are known, we can invert and obtain the formula
| p | Location of point |
| nodes | Vertices of element |
Reimplemented from fe::BaseElem.
|
overrideprivatevirtual |
Computes Jacobian of the 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 for each quad point:
Let
is the given line with vertices
and let
is the reference line.
, and then we use the map
to map the points on reference line to the current line
.
. Suppose
is the quadrature weight associated to quadrature point
, then the quadrature point
associated to the mapped point
is given by
is the Jacobian of map
.
associated to
at quadrature point
using formula
associated to
, we use the relation between derivatives of shape function in
and
described in fe::LineElem::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 for each quad point:
This function is a lite version of fe::LineElem::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.
Line
is given by points
. We first map the point p in
to reference line
using fe::LineElem::mapPointToRefElem and then compute shape functions at the mapped point using fe::LineElem::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 vertices of element
and let
is the reference element. Map
is given by
If mapped point
does not satisfy condition
does not belong to reference line
or equivalently point
does not belong to line
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::LineElem::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().

