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

Interface class for scalar fields. More...

#include <Field.h>

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

Public Member Functions

virtual ~Field ()
 Empty destructor.
 
const char * getFieldName () const
 Returns the name of field.
 
virtual double valueNode (size_t node) const =0
 Computes the value in a given node/control point. More...
 
virtual double valueFE (const ItgPoint &x) const =0
 Computes the value at a given local coordinate. More...
 
virtual double valueCoor (const Vec4 &x) const
 Computes the value at a given global coordinate. More...
 
virtual bool valueGrid (RealArray &val, const int *npe) const
 Computes the value at a grid of visualization points. More...
 
virtual bool gradFE (const ItgPoint &x, Vector &grad) const =0
 Computes the gradient for a given local coordinate. More...
 
virtual bool gradCoor (const Vec4 &x, Vector &grad) const
 Computes the gradient for a given global/physical coordinate. More...
 
virtual bool hessianFE (const ItgPoint &x, Matrix &H) const
 Computes the hessian for a given local coordinate. More...
 

Static Public Member Functions

static Fieldcreate (const ASMbase *pch, const RealArray &v, char basis=1, char cmp=1, const char *name=nullptr)
 Creates a dynamically allocated field object. More...
 

Protected Member Functions

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

Protected Attributes

std::string fname
 Name of the field.
 

Detailed Description

Interface class for scalar fields.

Constructor & Destructor Documentation

◆ Field()

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

The constructor sets the field name.

Parameters
[in]nameOptional name of field

References fname.

Member Function Documentation

◆ create()

Field * Field::create ( const ASMbase pch,
const RealArray v,
char  basis = 1,
char  cmp = 1,
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]cmpComponent to use for field
[in]nameName of field

Referenced by FieldFuncScalarBase::addPatchField(), SIMdependency::extractPatchDependencies(), and FieldFuncStream::FieldFuncStream().

◆ gradCoor()

virtual bool Field::gradCoor ( const Vec4 x,
Vector grad 
) const
inlinevirtual

Computes the gradient for a given global/physical coordinate.

Parameters
[in]xGlobal/physical coordinate for point
[out]gradGradient of solution in a given global coordinate

◆ gradFE()

virtual bool Field::gradFE ( const ItgPoint x,
Vector grad 
) const
pure 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

Implemented in LagrangeField2D, SplineField3D, SplineField2D, LRSplineField3D, LRSplineField2D, and LagrangeField3D.

◆ hessianFE()

virtual bool Field::hessianFE ( const ItgPoint x,
Matrix H 
) const
inlinevirtual

Computes the hessian for a given local coordinate.

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

Reimplemented in SplineField3D, SplineField2D, LRSplineField3D, and LRSplineField2D.

◆ valueCoor()

virtual double Field::valueCoor ( const Vec4 x) const
inlinevirtual

Computes the value at a given global coordinate.

Parameters
[in]xGlobal/physical coordinate for point

Reimplemented in SplineField3D, SplineField2D, LRSplineField3D, and LRSplineField2D.

◆ valueFE()

virtual double Field::valueFE ( const ItgPoint x) const
pure virtual

Computes the value at a given local coordinate.

Parameters
[in]xLocal coordinate of evaluation point

Implemented in LagrangeField2D, SplineField3D, SplineField2D, LRSplineField3D, LRSplineField2D, and LagrangeField3D.

Referenced by ASMs2D::evaluate(), and ASMs3D::evaluate().

◆ valueGrid()

virtual bool Field::valueGrid ( RealArray val,
const int *  npe 
) const
inlinevirtual

Computes the value at a grid of visualization points.

Parameters
[out]valField values at the visualization points
[in]npeNumber of visualization nodes over each knot span

Reimplemented in SplineField3D, and SplineField2D.

◆ valueNode()

virtual double Field::valueNode ( size_t  node) const
pure virtual

Computes the value in a given node/control point.

Parameters
[in]node1-based node/control point index

Implemented in LagrangeField2D, SplineField3D, SplineField2D, LRSplineField3D, LRSplineField2D, and LagrangeField3D.


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