|
IFEM
90A354
|
Class representing a mixed finite element. More...
#include <FiniteElement.h>


Public Member Functions | |
| MxFiniteElement (const std::vector< size_t > &n, size_t ip=0) | |
| The constructor initializes the size of each basis. | |
| size_t | getNoBasis () const override |
| Returns the number of bases. | |
| const Vector & | basis (char b) const override |
| Returns a const reference to the basis function values. | |
| Vector & | basis (char b) override |
| Returns a reference to the basis function values. | |
| const Matrix & | grad (char b) const override |
| Returns a const reference to the basis function derivatives. | |
| const Matrix3D & | hess (char b) const override |
| Returns a const reference to the basis function 2nd-derivatives. | |
| const Matrix4D & | hess2 (char b) const override |
| Returns a const reference to the basis function 3rd-derivatives. | |
| bool | Jacobian (Matrix &Jac, const Matrix &Xnod, unsigned short int gBasis, const BasisValuesPtrs &bfs) |
| Sets up the Jacobian matrix of the coordinate mapping. More... | |
| bool | Jacobian (Matrix &Jac, Vec3 &n, const Matrix &Xnod, unsigned short int gBasis, const BasisValuesPtrs &bfs, size_t t1, size_t t2, size_t nBasis=0, const Matrix *Xnod2=nullptr) |
| Sets up the Jacobian matrix of the coordinate mapping on a boundary. More... | |
| bool | Hessian (Matrix3D &Hess, const Matrix &Jac, const Matrix &Xnod, unsigned short int gBasis, const BasisValuesPtrs &bfs) |
| Sets up the Hessian matrix of the coordinate mapping. More... | |
| void | piolaMapping (const double detJ, const Matrix &Ji, const Matrix &Xnod, const BasisValuesPtrs &bfs) |
| Calculates the Piola basis functions and their derivatives. More... | |
| void | piolaBasis (const double detJ, const Matrix &J) |
| Calculates the Piola basis functions. More... | |
Public Member Functions inherited from FiniteElement | |
| FiniteElement (size_t n=0, size_t i=0) | |
| Default constructor. | |
Public Member Functions inherited from ItgPoint | |
| ItgPoint (size_t i=0) | |
| Default constructor. | |
| ItgPoint (double a, double b=0.0, double c=0.0, size_t i=0) | |
| Constructor initializing the spline domain parameters. | |
| ItgPoint (const double *par, size_t i=0) | |
| Alternative constructor initializing the spline domain parameters. | |
| virtual | ~ItgPoint () |
| Empty destructor. | |
Protected Member Functions | |
| void | piolaGradient (const double detJ, const Matrix &J, const Matrix &Ji, const Matrix &Xnod, const BasisValuesPtrs &bfs) |
| Calculates the Piola derivatives. More... | |
| Matrix & | grad (char b) override |
| Returns a reference to the basis function derivatives. | |
| Matrix3D & | hess (char b) override |
| Returns a reference to the basis function 2nd-derivatives. | |
| std::ostream & | write (std::ostream &os) const override |
| Writes the finite element object to the given output stream. | |
Private Attributes | |
| std::vector< Vector > | M |
| Basis function values. | |
| std::vector< Matrix > | dMdX |
| First derivatives of the basis functions. | |
| std::vector< Matrix3D > | d2MdX2 |
| Second derivatives of the basis functions. | |
| std::vector< Matrix4D > | d3MdX3 |
| Third derivatives of the basis functions. | |
Additional Inherited Members | |
Public Attributes inherited from FiniteElement | |
| double | detJxW |
| Weighted determinant of the coordinate mapping. | |
| Vector | N |
| Basis function values. | |
| Matrix | dNdX |
| First derivatives (gradient) of the basis functions. | |
| Matrix3D | d2NdX2 |
| Second derivatives of the basis functions. | |
| Matrix4D | d3NdX3 |
| Third derivatives of the basis functions. | |
| Matrix | G |
| Covariant basis / Matrix used for stabilized methods. | |
| Matrix | H |
| Hessian. | |
| Matrix | P |
| Matrix holding Piola-mapped basis function values. More... | |
| Matrix | dPdX |
| Matrix holding Piola-mapped basis derivatives. More... | |
| short int | p |
| Polynomial order of the basis in u-direction. | |
| short int | q |
| Polynomial order of the basis in v-direction. | |
| short int | r |
| Polynomial order of the basis in r-direction. | |
| double | age |
| Time since birth of this element. | |
| double | h |
| Characteristic element size/diameter. | |
| Vec3Vec | XC |
| Array with element corner coordinate vectors. | |
| Vector | Navg |
| Volume-averaged basis function values. | |
| Matrix | Xn |
| Matrix of element nodal coordinates. | |
| Tensor | Te |
| Local-to-global element transformation matrix. | |
| std::vector< Tensor > | Tn |
| Array of element nodal rotation matrices. | |
| Vec3Vec | En |
| Array of nodal eccentricity vectors. | |
Public Attributes inherited from ItgPoint | |
| size_t | iGP |
| Global integration point counter. | |
| double | u |
| First spline parameter of the point. | |
| double | v |
| Second spline parameter of the point. | |
| double | w |
| Third spline parameter of the point. | |
| int | iel |
| Identifier of the element containing this point. | |
| size_t | idx |
| Global index (0-based) of the element containing this point. | |
| double | xi |
| First local coordinate within current element. | |
| double | eta |
| Second local coordinate within current element. | |
| double | zeta |
| Third local coordinate within current element. | |
Class representing a mixed finite element.
| bool MxFiniteElement::Hessian | ( | Matrix3D & | Hess, |
| const Matrix & | Jac, | ||
| const Matrix & | Xnod, | ||
| unsigned short int | gBasis, | ||
| const BasisValuesPtrs & | bfs | ||
| ) |
Sets up the Hessian matrix of the coordinate mapping.
| [out] | Hess | The Hessian matrix |
| [in] | Jac | The inverse of the Jacobian matrix |
| [in] | Xnod | Matrix of element nodal coordinates |
| [in] | gBasis | 1-based index of basis representing the geometry |
| [in] | bfs | Basis function derivatives |
This method also calculates the second-derivatives of the basis functions with respect to the Cartesian coordinates, using the same geometry mapping for all bases.
References getNoBasis(), grad(), hess(), utl::Hessian(), and utl::matrix3d< T >::multiply().
Referenced by ASMs2Dmx::integrate(), ASMs3Dmx::integrate(), ASMu2Dmx::integrate(), and ASMu3Dmx::integrate().
| bool MxFiniteElement::Jacobian | ( | Matrix & | Jac, |
| const Matrix & | Xnod, | ||
| unsigned short int | gBasis, | ||
| const BasisValuesPtrs & | bfs | ||
| ) |
Sets up the Jacobian matrix of the coordinate mapping.
| [out] | Jac | The inverse of the Jacobian matrix |
| [in] | Xnod | Matrix of element nodal coordinates |
| [in] | gBasis | 1-based index of basis representing the geometry |
| [in] | bfs | Basis function values and derivatives |
This method also calculates the first-derivatives of the basis functions with respect to the Cartesian coordinates, using the same geometry mapping for all bases.
References FiniteElement::detJxW, getNoBasis(), grad(), utl::Jacobian(), and utl::matrix< T >::multiply().
Referenced by ASMs2DmxLag::evalSolution(), ASMs3DmxLag::evalSolution(), ASMs2Dmx::evalSolution(), ASMs3Dmx::evalSolution(), ASMs2Dmx::integrate(), ASMs2DmxLag::integrate(), ASMs3Dmx::integrate(), ASMs3DmxLag::integrate(), ASMu2Dmx::integrate(), and ASMu3Dmx::integrate().
| bool MxFiniteElement::Jacobian | ( | Matrix & | Jac, |
| Vec3 & | n, | ||
| const Matrix & | Xnod, | ||
| unsigned short int | gBasis, | ||
| const BasisValuesPtrs & | bfs, | ||
| size_t | t1, | ||
| size_t | t2, | ||
| size_t | nBasis = 0, |
||
| const Matrix * | Xnod2 = nullptr |
||
| ) |
Sets up the Jacobian matrix of the coordinate mapping on a boundary.
| [out] | Jac | The inverse of the Jacobian matrix |
| [out] | n | Outward-directed unit normal vector on the boundary |
| [in] | Xnod | Matrix of element nodal coordinates |
| [in] | gBasis | 1-based index of basis representing the geometry |
| [in] | bfs | Derivatives of basis functions |
| [in] | t1 | First parametric tangent direction of the boundary |
| [in] | t2 | Second parametric tangent direction of the boundary |
| [in] | nBasis | Number of basis functions |
| [in] | Xnod2 | Matrix of element nodal coordinates for neighbor element |
If the input argument nBasis is half (or less than half) of the size of the internal basis function value array, it is used to flag that we are doing element interface terms, and the basis function values of both elements sharing the interface are stored internally. If nBasis is zero (default), it is reset to the size of the dNxdu argument, which will fit normal cases.
References FiniteElement::detJxW, getNoBasis(), grad(), utl::Jacobian(), and utl::matrix< T >::multiply().
| void MxFiniteElement::piolaBasis | ( | const double | detJ, |
| const Matrix & | J | ||
| ) |
Calculates the Piola basis functions.
| [in] | detJ | Determinant of Jacobian of the geometry mapping |
| [in] | J | The Jacobian of the geometry mapping |
References basis(), utl::matrix< T >::multiply(), FiniteElement::P, utl::matrix< T >::rows(), and utl::vector< T >::size().
Referenced by ASMs2Dmx::evalSolutionPiola(), ASMu2Dmx::evalSolutionPiola(), and piolaMapping().
|
protected |
Calculates the Piola derivatives.
| [in] | detJ | Determinant of Jacobian of the geometry mapping |
| [in] | J | Jacobian of the geometry mapping |
| [in] | Ji | Inverse jacobian of the geometry mapping |
| [in] | Xnod | Matrix of element nodal coordinates |
| [in] | bfs | Derivatives of basis functions |
References basis(), utl::detJacGradient(), FiniteElement::dPdX, utl::matrix< T >::getColumn(), FiniteElement::H, utl::JacobianGradient(), utl::matrix< T >::multiply(), utl::matrix< T >::resize(), utl::matrix< T >::rows(), and utl::vector< T >::size().
Referenced by piolaMapping().
| void MxFiniteElement::piolaMapping | ( | const double | detJ, |
| const Matrix & | Ji, | ||
| const Matrix & | Xnod, | ||
| const BasisValuesPtrs & | bfs | ||
| ) |
Calculates the Piola basis functions and their derivatives.
| [in] | detJ | Determinant of Jacobian of the geometry mapping |
| [in] | Ji | Inverse jacobian of the geometry mapping |
| [in] | Xnod | Matrix of element nodal coordinates |
| [in] | bfs | Derivatives of basis functions |
References utl::matrix< T >::multiply(), piolaBasis(), and piolaGradient().
Referenced by ASMs2Dmx::evalSolution(), ASMs2Dmx::integrate(), and ASMu2Dmx::integrate().