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

Base class for unary spatial functions of arbitrary result type. More...

#include <Function.h>

Inheritance diagram for FunctionBase:
Inheritance graph
[legend]

Public Member Functions

virtual ~FunctionBase ()
 Empty destructor.
 
virtual unsigned char getType () const =0
 Returns the function type flag.
 
virtual std::vector< RealgetValue (const Vec3 &) const =0
 Returns the function value as an array.
 
virtual Real getScalarValue (const Vec3 &) const =0
 Returns a representative scalar equivalent of the function value.
 
size_t dim () const
 Returns the number of components of the return value.
 
virtual bool initPatch (size_t)
 Sets the active patch.
 
virtual bool inDomain (const Vec3 &) const
 Checks if a specified point is within the function domain.
 
virtual void setParam (const std::string &, Real)
 Sets an additional parameter in the function.
 
void setParam (const std::string &name, const Vec3 &value)
 Sets additional parameter values in the function.
 

Protected Member Functions

 FunctionBase ()
 The constructor is protected to allow sub-class instances only.
 

Protected Attributes

size_t ncmp
 Number of components in the return value.
 

Detailed Description

Base class for unary spatial functions of arbitrary result type.

Includes an interface for returning the function value as an array, and for assigning additional state-dependent parameter values.

Member Function Documentation

◆ getScalarValue()

virtual Real FunctionBase::getScalarValue ( const Vec3 ) const
pure virtual

Returns a representative scalar equivalent of the function value.

Implemented in DualVecFunc, FunctionSum, TensorFunc, STensorFunc, RealFunc, and VecFunc.

Referenced by SIMoutput::writeGlvN().

◆ getType()

virtual unsigned char FunctionBase::getType ( ) const
pure virtual

Returns the function type flag.

Implemented in DualRealFunc, DualVecFunc, FunctionSum, TensorFunc, STensorFunc, RealFunc, and VecFunc.

◆ getValue()

virtual std::vector< Real > FunctionBase::getValue ( const Vec3 ) const
pure virtual

Returns the function value as an array.

Implemented in FunctionSum, TensorFunc, STensorFunc, RealFunc, and VecFunc.

Referenced by L2FuncIntegrand::evaluate(), and ASMbase::updateDirichlet().

◆ inDomain()

virtual bool FunctionBase::inDomain ( const Vec3 ) const
inlinevirtual

Checks if a specified point is within the function domain.

Reimplemented in DualRealFunc, DualVecFunc, and FunctionSum.

◆ initPatch()

virtual bool FunctionBase::initPatch ( size_t  )
inlinevirtual

◆ setParam()

virtual void FunctionBase::setParam ( const std::string &  ,
Real   
)
inlinevirtual

Sets an additional parameter in the function.

Reimplemented in EvalFuncSpatial< Scalar >.

Referenced by setParam().


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