IFEM  90A354
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
DualVecFunc Class Reference

Class representing a dual vector field. More...

#include <DualField.h>

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

Public Member Functions

 DualVecFunc (int c, const Vec3 &o, const Vec3 &n, const Vec3 &XZp, double d, double w=0.0, ASMbase *p=nullptr)
 Constructor for 3D problems. More...
 
 DualVecFunc (int c, const Vec3 &o, const Vec3 &n, double d, double w=0.0, ASMbase *p=nullptr)
 Constructor for 2D problems (in XY-plane). More...
 
 DualVecFunc (int c, const utl::Point &o, const Vec3Pair &d, ASMbase *p=nullptr, double eps=0.0)
 Constructor for point-value extraction. More...
 
virtual ~DualVecFunc ()
 Empty destructor.
 
virtual unsigned char getType () const
 Returns the function type flag.
 
virtual bool inDomain (const Vec3 &X) const
 Checks if the point X is within the function domain.
 
virtual bool initPatch (size_t idx)
 Returns true if current patch is affected by this function.
 
const RealFuncgetW () const
 Returns a const reference to the scalar dual field.
 
virtual double getScalarValue (const Vec3 &X) const
 Returns a representative scalar equivalent of the function value.
 
- Public Member Functions inherited from VecFunc
unsigned char getType () const override
 Returns the function type flag.
 
std::vector< RealgetValue (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< Realhessian (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 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 dual field function. More...
 
- 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< 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.
 

Private Attributes

int comp
 Which result component to extract for.
 
DualRealFunc W
 The scalar dual field.
 

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.
 

Detailed Description

Class representing a dual vector field.

Constructor & Destructor Documentation

◆ DualVecFunc() [1/3]

DualVecFunc::DualVecFunc ( int  c,
const Vec3 o,
const Vec3 n,
const Vec3 XZp,
double  d,
double  w = 0.0,
ASMbase p = nullptr 
)

Constructor for 3D problems.

Parameters
[in]cResult component index to do extraction for
[in]oOrigin of local cross section coordinate system
[in]nCross section normal
[in]XZpPoint in the local XZ-plane
[in]dDepth of dual function domain
[in]wWidth of dual function domain (0=infinite)
[in]pThe affected patch (null=all)

References comp.

◆ DualVecFunc() [2/3]

DualVecFunc::DualVecFunc ( int  c,
const Vec3 o,
const Vec3 n,
double  d,
double  w = 0.0,
ASMbase p = nullptr 
)

Constructor for 2D problems (in XY-plane).

Parameters
[in]cResult component index to do extraction for
[in]oOrigin of local cross section coordinate system
[in]nCross section normal
[in]dDepth of dual function domain
[in]wWidth of dual function domain (0=infinite)
[in]pThe affected patch (null=all)

References comp.

◆ DualVecFunc() [3/3]

DualVecFunc::DualVecFunc ( int  c,
const utl::Point o,
const Vec3Pair d,
ASMbase p = nullptr,
double  eps = 0.0 
)

Constructor for point-value extraction.

Parameters
[in]cResult component index to do extraction for
[in]oPoint to extract the point quantity at
[in]dLower-left and upper-rigth corner of function domain
[in]pThe affected patch (null=all)
[in]epsParameter tolerance for searching elements around a point

References comp.

Member Function Documentation

◆ evaluate()

Vec3 DualVecFunc::evaluate ( const Vec3 X) const
protectedvirtual

Evaluates the dual field function.

Parameters
[in]XThe spatial point to evaluate the function at

The field does not evaluate to zero outside the defined function domain, since it is used to find the control point values of a spline representation of it.

References comp, DualRealFunc::ecc(), DualRealFunc::isPointExtraction(), DualRealFunc::value(), W, DualRealFunc::x(), DualRealFunc::y(), and DualRealFunc::z().


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