|
IFEM
90A354
|
A vector-valued spatial function, defined through gradient of a scalar field. More...
#include <FieldFunctions.h>


Public Member Functions | |
| ScalarGradFieldFunction (const std::string &fileName, const std::string &basisName, const std::string &fieldName, int level=0) | |
| The constructor creates a field from the provided HDF5-file. More... | |
| ScalarGradFieldFunction (const std::vector< Field * > &fields, int dim) | |
| Wrap existing fields. More... | |
| virtual | ~ScalarGradFieldFunction () |
| Empty destructor. | |
| virtual bool | initPatch (size_t pIdx) |
| Sets the active patch. | |
Public Member Functions inherited from VecFunc | |
| unsigned char | getType () const override |
| Returns the function type flag. | |
| std::vector< Real > | getValue (const Vec3 &X) const override |
| Returns the function value as an array. | |
| Real | getScalarValue (const Vec3 &X) const override |
| Returns a representative scalar equivalent of the function value. | |
| Tensor | gradient (const Vec3 &X) const |
| Evaluates first derivatives of the function. | |
| utl::matrix3d< Real > | hessian (const Vec3 &X) const |
| Evaluates second derivatives of the function. | |
| Vec3 | timeDerivative (const Vec3 &X) const |
| Evaluates time derivatives of the function. | |
Public Member Functions inherited from utl::SpatialFunction< Vec3 > | |
| virtual Vec3 | deriv (const Vec3 &, int) const |
| Returns a first-derivative of the function. | |
| virtual Vec3 | dderiv (const Vec3 &, int, int) const |
| Returns a second-derivative of the function. | |
Public Member Functions inherited from utl::Function< Arg, Result > | |
| virtual | ~Function () |
| Empty destructor. | |
| virtual bool | isZero () const |
| Returns whether the function is identically zero or not. | |
| virtual bool | isConstant () const |
| Returns whether the function is time-independent or not. | |
| Result | operator() (const Arg &x) const |
| Operator returning the function value for the given argument. | |
Public Member Functions inherited from FunctionBase | |
| virtual | ~FunctionBase () |
| Empty destructor. | |
| size_t | dim () const |
| Returns the number of components of the return value. | |
| 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 | |
| virtual Vec3 | evaluate (const Vec3 &X) const |
| Evaluates the vectorial field function. | |
Protected Member Functions inherited from VecFunc | |
| VecFunc (size_t n=3) | |
| The constructor is protected to allow sub-class instances only. | |
Protected Member Functions inherited from utl::SpatialFunction< Vec3 > | |
| SpatialFunction (const Vec3 &val) | |
| The constructor is protected to allow sub-class instances only. | |
| virtual std::vector< Real > | evalGradient (const Vec3 &) const |
| Returns the gradient of the function as a 1D array. | |
| virtual std::vector< Real > | evalHessian (const Vec3 &) const |
| Returns the hessian of the function as a 1D array. | |
| virtual std::vector< Real > | evalTimeDerivative (const Vec3 &) const |
| Returns the time derivatives of the function as a 1D array. | |
Protected Member Functions inherited from utl::Function< Arg, Result > | |
| Function () | |
| The constructor is protected to allow sub-class instances only. | |
| virtual Result | evaluate (const Arg &x) const =0 |
| Evaluates the function for the argument x. | |
Protected Member Functions inherited from FunctionBase | |
| FunctionBase () | |
| The constructor is protected to allow sub-class instances only. | |
Additional Inherited Members | |
Public Types inherited from utl::Function< Arg, Result > | |
| typedef Arg | Input |
| Input type. | |
| typedef Result | Output |
| Output type. | |
Protected Attributes inherited from utl::SpatialFunction< Vec3 > | |
| Vec3 | zero |
| Return value for default implementations of derivatives. | |
Protected Attributes inherited from FunctionBase | |
| size_t | ncmp |
| Number of components in the return value. | |
Private Member Functions inherited from FieldFuncScalarBase | |
| FieldFuncScalarBase (const std::string &fileName, const std::string &basisName, const std::string &fieldName, int level=0) | |
| The constructor creates a field from the provided HDF5-file. More... | |
| virtual | ~FieldFuncScalarBase () |
| The destructor deletes the scalar fields. | |
| FieldFuncScalarBase () | |
| Default constructor. | |
| virtual void | addPatchField (ASMbase *pch, const std::vector< Real > &coefs, int, int) |
| Adds a patch-wise field with the given coefficient values. More... | |
| virtual void | clearField () |
| Clears the field container. | |
| void | clearFieldInt () |
| Non-virtual actual implementation of clearField() | |
Private Attributes inherited from FieldFuncScalarBase | |
| int | currentLevel |
| Current time level to evaluate at. | |
| std::string | fName |
| Name of field. | |
| std::string | bName |
| Name of basis. | |
| std::vector< Field * > | field |
| The scalar field to be evaluated. | |
A vector-valued spatial function, defined through gradient of a scalar field.
| ScalarGradFieldFunction::ScalarGradFieldFunction | ( | const std::string & | fileName, |
| const std::string & | basisName, | ||
| const std::string & | fieldName, | ||
| int | level = 0 |
||
| ) |
The constructor creates a field from the provided HDF5-file.
| [in] | fileName | Name of the HDF5-file |
| [in] | basisName | Name of the basis which the field values refer to |
| [in] | fieldName | Name of the field in the HDF5-file |
| [in] | level | Time level to read for |
References FieldFuncScalarBase::field, FunctionBase::ncmp, and FieldFuncBase::patch.
| ScalarGradFieldFunction::ScalarGradFieldFunction | ( | const std::vector< Field * > & | fields, |
| int | dim | ||
| ) |
Wrap existing fields.
| [in] | fields | Fields to evaluate |
| [in] | dim | Dimension of fields |
Takes ownership of given fields.
References FieldFuncScalarBase::currentLevel, FieldFuncScalarBase::field, FieldFuncHDF5::hasMultipleLevels, FieldFuncHDF5::lastLevel, and FieldFuncBase::npch.