IFEM  90A354
Public Member Functions | Protected Member Functions | List of all members
VecLaplacianFieldFunction Class Reference

A tensor-valued spatial function, defined through laplacian of a vector field. More...

#include <FieldFunctions.h>

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

Public Member Functions

 VecLaplacianFieldFunction (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 ~VecLaplacianFieldFunction ()
 Empty destructor.
 
virtual bool initPatch (size_t pIdx)
 Sets the active patch.
 
- Public Member Functions inherited from TensorFunc
virtual ~TensorFunc ()
 Empty destructor.
 
virtual unsigned char getType () const
 Returns the function type flag.
 
virtual std::vector< RealgetValue (const Vec3 &X) const
 Returns the function value as an array.
 
virtual Real getScalarValue (const Vec3 &X) const
 Returns a representative scalar equivalent of the function value.
 
utl::matrix3d< Realgradient (const Vec3 &X) const
 Evaluates first derivatives of the function.
 
utl::matrix4d< Realhessian (const Vec3 &X) const
 Evaluates second derivatives of the function.
 
Tensor timeDerivative (const Vec3 &X) const
 Evaluates time derivatives of the function.
 
- Public Member Functions inherited from utl::SpatialFunction< Tensor >
virtual Tensor deriv (const Vec3 &, int) const
 Returns a first-derivative of the function.
 
virtual Tensor 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 Tensor evaluate (const Vec3 &X) const
 Evaluates the tensorial field function.
 
- Protected Member Functions inherited from TensorFunc
 TensorFunc (size_t n=0)
 The constructor is protected to allow sub-class instances only.
 
- Protected Member Functions inherited from utl::SpatialFunction< Tensor >
 SpatialFunction (const Tensor &val)
 The constructor is protected to allow sub-class instances only.
 
virtual std::vector< RealevalGradient (const Vec3 &) const
 Returns the gradient of the function as a 1D array.
 
virtual std::vector< RealevalHessian (const Vec3 &) const
 Returns the hessian of the function as a 1D array.
 
virtual std::vector< RealevalTimeDerivative (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< Tensor >
Tensor 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 FieldsFuncBase
 FieldsFuncBase (const std::vector< Fields * > &fields)
 Construct from vector of fields. More...
 
 FieldsFuncBase (const std::string &fileName, const std::string &basisName, const std::string &fieldName, int level)
 The constructor creates a field from the provided HDF5-file. More...
 
virtual ~FieldsFuncBase ()
 The destructor deletes the vector fields.
 
virtual void addPatchField (ASMbase *pch, const std::vector< Real > &coefs, int nf, int basis)
 Adds a patch-wise field with the given coefficient values. More...
 
virtual void clearField ()
 Clears the field container.
 
std::vector< RealgetValues (const Vec3 &X)
 Evaluates the field at the givent point X.
 
std::vector< RealgetGradient (const Vec3 &X) const
 Evaluates the field gradient at the givent point X.
 
std::vector< RealgetHessian (const Vec3 &X) const
 Evaluates the field gradient at the givent point X.
 
- Private Member Functions inherited from FieldFuncHDF5
 FieldFuncHDF5 ()
 Default constructor.
 
 FieldFuncHDF5 (const std::string &fileName)
 The constructor opens the provided HDF5-file. More...
 
 FieldFuncHDF5 (const FieldFuncHDF5 &)=delete
 No copying of this class.
 
virtual ~FieldFuncHDF5 ()
 The destructor closes the HDF5-file.
 
bool load (const std::vector< std::string > &fieldNames, const std::string &basisName, int level, bool isScalar=false)
 Loads field values for the specified time level. More...
 
int findClosestLevel (double time) const
 Finds the level whose time is closest to the specified time.
 
- Private Member Functions inherited from FieldFuncBase
 FieldFuncBase ()
 Default constructor.
 
 FieldFuncBase (const FieldFuncBase &)=delete
 No copying of this class.
 
virtual ~FieldFuncBase ()
 The destructor deletes the patches.
 
bool setPatch (size_t pIdx)
 Sets the active patch.
 
- Private Attributes inherited from FieldsFuncBase
std::vector< std::string > fName
 Name of field components.
 
std::string bName
 Name of basis.
 
std::vector< Fields * > field
 The vector field to be evaluated.
 
- Private Attributes inherited from FieldFuncHDF5
bool hasMultipleLevels
 True if we have multiple time levels.
 
int lastLevel
 The last time level read from.
 
- Private Attributes inherited from FieldFuncBase
std::vector< ASMbase * > patch
 The patches on which the field is defined.
 
size_t pidx
 Current patch index.
 
size_t npch
 Number of patches in the field.
 
- Static Private Attributes inherited from FieldFuncBase
static constexpr int FIXED_LEVEL = 1 << 24
 Bit flag in level for using fixed.
 

Detailed Description

A tensor-valued spatial function, defined through laplacian of a vector field.

Laplacian refers to the hessian without cross terms.

Constructor & Destructor Documentation

◆ VecLaplacianFieldFunction()

VecLaplacianFieldFunction::VecLaplacianFieldFunction ( 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.

Parameters
[in]fileNameName of the HDF5-file
[in]basisNameName of the basis which the field values refer to
[in]fieldNameName of the field in the HDF5-file
[in]levelTime level to read for

References FieldsFuncBase::field, and FunctionBase::ncmp.


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