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

Class for spline-based finite element vector fields in 1D. More...

#include <SplineFields1D.h>

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

Public Member Functions

 SplineFields1D (const Go::SplineCurve *crv, const RealArray &v, int ncmp, const char *name=nullptr)
 Construct directly from curve. More...
 
virtual ~SplineFields1D ()
 Empty destructor.
 
virtual bool valueFE (const ItgPoint &x, Vector &vals) const
 Computes the value for a given local coordinate. More...
 
virtual bool gradFE (const ItgPoint &x, Matrix &grad) const
 Computes the gradient for a given local coordinate. More...
 
virtual bool hessianFE (const ItgPoint &x, Matrix3D &H) const
 Computes the hessian 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 valueNode (size_t node, Vector &vals) const
 Computes the value at a given node/control point. More...
 
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...
 

Protected Attributes

const Go::SplineCurve * curv
 Spline geometry description.
 
- 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.
 

Private Attributes

unsigned char nsd
 Number of space dimensions.
 

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 spline-based finite element vector fields in 1D.

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

Constructor & Destructor Documentation

◆ SplineFields1D()

SplineFields1D::SplineFields1D ( const Go::SplineCurve *  crv,
const RealArray v,
int  ncmp,
const char *  name = nullptr 
)

Construct directly from curve.

Parameters
[in]crvThe spline curve to use
[in]vArray of control point field values
[in]ncmpNumber of field components
[in]nameName of spline field

References Fields::nf, nsd, and Fields::values.

Member Function Documentation

◆ gradFE()

bool SplineFields1D::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 at local point in given element

Implements Fields.

References curv, utl::matrixBase< T >::empty(), utl::matrix< T >::fillColumn(), utl::gather(), utl::Jacobian(), utl::matrix< T >::multiply(), Fields::nf, nsd, ItgPoint::u, and Fields::values.

◆ hessianFE()

bool SplineFields1D::hessianFE ( const ItgPoint x,
Matrix3D H 
) const
virtual

Computes the hessian for a given local coordinate.

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

Reimplemented from Fields.

References curv, utl::matrix< T >::fillColumn(), utl::matrix3d< T >::fillColumn(), utl::gather(), utl::Hessian(), utl::Jacobian(), utl::matrix3d< T >::multiply(), Fields::nf, nsd, ItgPoint::u, and Fields::values.

◆ valueFE()

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

Computes the value for a given local coordinate.

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

Implements Fields.

References utl::vector< T >::add(), utl::matrix< T >::cols(), curv, utl::vector< T >::fill(), utl::gather(), utl::matrix< T >::getColumn(), Fields::nf, utl::vector< T >::ptr(), utl::vector< T >::resize(), ItgPoint::u, and Fields::values.


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