IFEM  90A354
Public Member Functions | Protected Types | Protected Attributes | List of all members
LagrangeFields3D Class Reference

Class for Lagrange-based finite element vector fields in 3D. More...

#include <LagrangeFields3D.h>

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

Public Member Functions

 LagrangeFields3D (const ASMs3DLag *patch, const RealArray &v, char basis=1, const char *name=nullptr)
 The constructor sets the number of space dimensions and fields. More...
 
virtual ~LagrangeFields3D ()
 Empty destructor.
 
bool valueNode (size_t node, Vector &vals) const
 Computes the value in a given node/control point. More...
 
bool valueFE (const ItgPoint &x, Vector &vals) const
 Computes the value at a given local coordinate. More...
 
bool gradFE (const ItgPoint &x, Matrix &grad) const
 Computes the gradient for a given local coordinate. More...
 
- Public Member Functions inherited from Fields
virtual ~Fields ()
 Empty destructor.
 
unsigned char getNoFields () const
 Returns the number of field components.
 
size_t getNoElm () const
 Returns the number of elements.
 
size_t getNoNodes () const
 Returns the number of nodal/control points.
 
const char * getFieldName () const
 Returns the name of field.
 
virtual bool valueCoor (const Vec4 &x, Vector &vals) const
 Computes the value for a given global coordinate. More...
 
virtual bool gradCoor (const Vec4 &x, Matrix &grad) const
 Computes the gradient for a given global coordinate. More...
 
virtual bool hessianFE (const ItgPoint &x, Matrix3D &H) const
 Computes the hessian for a given local coordinate. More...
 

Protected Types

using IntMat = std::vector< std::vector< int > >
 Convenience type.
 

Protected Attributes

Matrix coord
 Matrix of nodel coordinates.
 
IntMat mnpc
 Matrix of element nodes.
 
int p1
 Element order in first parameter direction.
 
int p2
 Element order in second parameter direction.
 
int p3
 Element order in third parameter direction.
 
- Protected Attributes inherited from Fields
unsigned char nf
 Number of field components.
 
size_t nelm
 Number of elements/knot-spans.
 
size_t nno
 Number of nodes/control points.
 
std::string fname
 Name of the field.
 
Vector values
 Field values.
 

Additional Inherited Members

- Static Public Member Functions inherited from Fields
static Fieldscreate (const ASMbase *pch, const RealArray &v, char basis=1, int nf=0, const char *name=nullptr)
 Creates a dynamically allocated field object. More...
 
- Protected Member Functions inherited from Fields
 Fields (const char *name=nullptr)
 The constructor sets the field name. More...
 

Detailed Description

Class for Lagrange-based finite element vector fields in 3D.

This class implements the methods required to evaluate a 3D Lagrange vector field at a given point in parametrical or physical coordinates.

Constructor & Destructor Documentation

◆ LagrangeFields3D()

LagrangeFields3D::LagrangeFields3D ( const ASMs3DLag patch,
const RealArray v,
char  basis = 1,
const char *  name = nullptr 
)

The constructor sets the number of space dimensions and fields.

Parameters
[in]patchThe spline patch on which the field is to be defined
[in]vArray of control point field values
[in]basisBasis to use from patch
[in]nameName of field

References utl::vector< T >::begin(), coord, ASMs3DLag::getNodalCoordinates(), ASMbase::getNoElms(), ASMs3D::getNoNodes(), ASMs3DLag::getOrder(), Fields::nelm, Fields::nf, Fields::nno, p1, p2, p3, utl::vector< T >::resize(), and Fields::values.

Member Function Documentation

◆ gradFE()

bool LagrangeFields3D::gradFE ( const ItgPoint x,
Matrix grad 
) const
virtual

Computes the gradient for a given local coordinate.

Parameters
[in]xLocal coordinate of evaluation point
[out]gradGradient of solution in a given local coordinate

Implements Fields.

References Lagrange::computeBasis(), coord, utl::matrixBase< T >::empty(), ItgPoint::eta, utl::matrix< T >::fillColumn(), utl::matrix< T >::getColumn(), ItgPoint::iel, utl::Jacobian(), mnpc, utl::matrix< T >::multiply(), Fields::nelm, Fields::nf, p1, p2, p3, utl::vector< T >::ptr(), utl::matrix< T >::resize(), Fields::values, ItgPoint::xi, and ItgPoint::zeta.

◆ valueFE()

bool LagrangeFields3D::valueFE ( const ItgPoint x,
Vector vals 
) const
virtual

Computes the value at a given local coordinate.

Parameters
[in]xLocal coordinate of evaluation point
[out]valsValues in local point in given element

Implements Fields.

References Lagrange::computeBasis(), ItgPoint::eta, ItgPoint::iel, mnpc, Fields::nelm, Fields::nf, p1, p2, p3, utl::vector< T >::resize(), Fields::values, ItgPoint::xi, and ItgPoint::zeta.

◆ valueNode()

bool LagrangeFields3D::valueNode ( size_t  node,
Vector vals 
) const
virtual

Computes the value in a given node/control point.

Parameters
[in]nodeNode number
[out]valsNode values

Reimplemented from Fields.

References utl::vector< T >::fill(), Fields::nf, Fields::nno, utl::vector< T >::ptr(), utl::vector< T >::resize(), and Fields::values.


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