IFEM  90A354
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Fields Class Referenceabstract

Base class for vector fields. More...

#include <Fields.h>

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

Public Member Functions

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 valueFE (const ItgPoint &x, Vector &vals) const =0
 Computes the value for a given local coordinate. More...
 
virtual bool valueCoor (const Vec4 &x, Vector &vals) const
 Computes the value for a given global coordinate. More...
 
virtual bool gradFE (const ItgPoint &x, Matrix &grad) const =0
 Computes the gradient for a given local 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...
 

Static Public Member Functions

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

 Fields (const char *name=nullptr)
 The constructor sets the field name. More...
 

Protected Attributes

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.
 

Detailed Description

Base class for vector fields.

This class incapsulates the data and methods needed to store and evaluate a vector field. This is an abstract base class, and the fields associated with a specific field type are implemented as subclasses, for instance 1D, 2D and 3D spline formulations or Lagrange formulations.

Constructor & Destructor Documentation

◆ Fields()

Fields::Fields ( const char *  name = nullptr)
inlineexplicitprotected

The constructor sets the field name.

Parameters
[in]nameName of field

References fname.

Member Function Documentation

◆ create()

Fields * Fields::create ( const ASMbase pch,
const RealArray v,
char  basis = 1,
int  nf = 0,
const char *  name = nullptr 
)
static

Creates a dynamically allocated field object.

Parameters
[in]pchThe spline patch on which the field is to be defined on
[in]vArray of nodal/control point field values
[in]basisBasis to use from patch
[in]nfNumber of components in field
[in]nameName of field

References nf.

Referenced by FieldsFuncBase::addPatchField(), and SIMdependency::extractPatchDependencies().

◆ gradCoor()

virtual bool Fields::gradCoor ( const Vec4 x,
Matrix grad 
) const
inlinevirtual

Computes the gradient for a given global coordinate.

Parameters
[in]xGlobal coordinate of evaluation point
[out]gradGradient at given global coordinate

◆ gradFE()

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

Computes the gradient for a given local coordinate.

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

Implemented in SplineFields3Dmx, SplineFields3D, SplineFields2Dmx, SplineFields2D, SplineFields1D, LRSplineFields3Dmx, LRSplineFields3D, LRSplineFields2Dmx, LRSplineFields2D, LagrangeFields3D, and LagrangeFields2D.

◆ hessianFE()

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

Computes the hessian for a given local coordinate.

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

Reimplemented in SplineFields3Dmx, SplineFields3D, SplineFields2Dmx, SplineFields2D, SplineFields1D, LRSplineFields3Dmx, LRSplineFields3D, LRSplineFields2Dmx, and LRSplineFields2D.

◆ valueCoor()

virtual bool Fields::valueCoor ( const Vec4 x,
Vector vals 
) const
inlinevirtual

Computes the value for a given global coordinate.

Parameters
[in]xGlobal/physical coordinate for point
[out]valsValues at given global coordinate

Reimplemented in SplineFields3Dmx, SplineFields3D, SplineFields2Dmx, SplineFields2D, LRSplineFields3Dmx, LRSplineFields3D, LRSplineFields2Dmx, and LRSplineFields2D.

◆ valueFE()

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

Computes the value for a given local coordinate.

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

Implemented in SplineFields3Dmx, SplineFields3D, SplineFields2Dmx, SplineFields2D, SplineFields1D, LRSplineFields3Dmx, LRSplineFields3D, LRSplineFields2Dmx, LRSplineFields2D, LagrangeFields3D, and LagrangeFields2D.

Referenced by ASMs2D::evalProjSolution(), ASMs3D::evalProjSolution(), ASMu2D::evalProjSolution(), ASMu3D::evalProjSolution(), and ASMs1D::evalProjSolution().

◆ valueNode()

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

Computes the value at a given node/control point.

Parameters
[in]node1-based node/control point index
[out]valsValues at given node/control point

Reimplemented in SplineFields3Dmx, SplineFields3D, SplineFields2Dmx, SplineFields2D, LRSplineFields3Dmx, LRSplineFields3D, LRSplineFields2Dmx, LRSplineFields2D, LagrangeFields3D, and LagrangeFields2D.

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


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