IFEM  90A354
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
MxFiniteElement Class Reference

Class representing a mixed finite element. More...

#include <FiniteElement.h>

Inheritance diagram for MxFiniteElement:
Inheritance graph
[legend]
Collaboration diagram for MxFiniteElement:
Collaboration graph
[legend]

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 Vectorbasis (char b) const override
 Returns a const reference to the basis function values.
 
Vectorbasis (char b) override
 Returns a reference to the basis function values.
 
const Matrixgrad (char b) const override
 Returns a const reference to the basis function derivatives.
 
const Matrix3Dhess (char b) const override
 Returns a const reference to the basis function 2nd-derivatives.
 
const Matrix4Dhess2 (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...
 
Matrixgrad (char b) override
 Returns a reference to the basis function derivatives.
 
Matrix3Dhess (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< VectorM
 Basis function values.
 
std::vector< MatrixdMdX
 First derivatives of the basis functions.
 
std::vector< Matrix3Dd2MdX2
 Second derivatives of the basis functions.
 
std::vector< Matrix4Dd3MdX3
 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< TensorTn
 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.
 

Detailed Description

Class representing a mixed finite element.

Member Function Documentation

◆ Hessian()

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.

Parameters
[out]HessThe Hessian matrix
[in]JacThe inverse of the Jacobian matrix
[in]XnodMatrix of element nodal coordinates
[in]gBasis1-based index of basis representing the geometry
[in]bfsBasis 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().

◆ Jacobian() [1/2]

bool MxFiniteElement::Jacobian ( Matrix Jac,
const Matrix Xnod,
unsigned short int  gBasis,
const BasisValuesPtrs bfs 
)

Sets up the Jacobian matrix of the coordinate mapping.

Parameters
[out]JacThe inverse of the Jacobian matrix
[in]XnodMatrix of element nodal coordinates
[in]gBasis1-based index of basis representing the geometry
[in]bfsBasis 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().

◆ Jacobian() [2/2]

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.

Parameters
[out]JacThe inverse of the Jacobian matrix
[out]nOutward-directed unit normal vector on the boundary
[in]XnodMatrix of element nodal coordinates
[in]gBasis1-based index of basis representing the geometry
[in]bfsDerivatives of basis functions
[in]t1First parametric tangent direction of the boundary
[in]t2Second parametric tangent direction of the boundary
[in]nBasisNumber of basis functions
[in]Xnod2Matrix 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().

◆ piolaBasis()

void MxFiniteElement::piolaBasis ( const double  detJ,
const Matrix J 
)

Calculates the Piola basis functions.

Parameters
[in]detJDeterminant of Jacobian of the geometry mapping
[in]JThe 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().

◆ piolaGradient()

void MxFiniteElement::piolaGradient ( const double  detJ,
const Matrix J,
const Matrix Ji,
const Matrix Xnod,
const BasisValuesPtrs bfs 
)
protected

Calculates the Piola derivatives.

Parameters
[in]detJDeterminant of Jacobian of the geometry mapping
[in]JJacobian of the geometry mapping
[in]JiInverse jacobian of the geometry mapping
[in]XnodMatrix of element nodal coordinates
[in]bfsDerivatives 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().

◆ piolaMapping()

void MxFiniteElement::piolaMapping ( const double  detJ,
const Matrix Ji,
const Matrix Xnod,
const BasisValuesPtrs bfs 
)

Calculates the Piola basis functions and their derivatives.

Parameters
[in]detJDeterminant of Jacobian of the geometry mapping
[in]JiInverse jacobian of the geometry mapping
[in]XnodMatrix of element nodal coordinates
[in]bfsDerivatives of basis functions

References utl::matrix< T >::multiply(), piolaBasis(), and piolaGradient().

Referenced by ASMs2Dmx::evalSolution(), ASMs2Dmx::integrate(), and ASMu2Dmx::integrate().


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