|
IFEM
90A354
|
Class representing a dual field for goal-oriented error estimation. More...
#include <DualField.h>


Public Member Functions | |
| DualRealFunc (const Vec3 &o, const Vec3 &n, const Vec3 &XZp, double d, double w=0.0, ASMbase *p=nullptr, int c=0) | |
| Constructor for 3D problems. More... | |
| DualRealFunc (const Vec3 &o, const Vec3 &n, double d, double w=0.0, ASMbase *p=nullptr, int c=0) | |
| Constructor for 2D problems (in XY-plane). More... | |
| DualRealFunc (const utl::Point &o, const Vec3Pair &d, ASMbase *p=nullptr, double eps=0.0, int c=0) | |
| Constructor for point extraction. More... | |
| virtual | ~DualRealFunc () |
| Empty destructor. | |
| virtual unsigned char | getType () const |
| Returns the function type flag. | |
| const Vec3 & | x () const |
| Returns the local X (normal) direction of the cross section. | |
| const Vec3 & | y () const |
| Returns the local Y (tangent) direction of the cross section. | |
| Vec3 | z () const |
| Returns the local Z (2nd tangent) direction of the cross section. | |
| double | ecc (const Vec3 &X, int i) const |
| Returns the offset from the cross section origin \ b X0. | |
| double | value (const Vec3 &X, bool ignoreDomain=false) const |
| Returns the function value at the given point. More... | |
| bool | isPointExtraction () const |
| Returns true, if the dual field is for extracting point values. | |
| 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. | |
Public Member Functions inherited from RealFunc | |
| 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. | |
| virtual Vec3 | gradient (const Vec3 &X) const |
| Evaluates first derivatives of the function. | |
| virtual SymmTensor | hessian (const Vec3 &X) const |
| Evaluates second derivatives of the function. | |
| Real | getScalarValue (const Vec3 &X) const override |
| Returns a representative scalar equivalent of the function value. | |
| Real | timeDerivative (const Vec3 &X) const |
| Returns the time derivative of the function. | |
Public Member Functions inherited from utl::SpatialFunction< Real > | |
| virtual Real | deriv (const Vec3 &, int) const |
| Returns a first-derivative of the function. | |
| virtual Real | 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 double | evaluate (const Vec3 &X) const |
| Evaluates the dual field function. | |
Protected Member Functions inherited from RealFunc | |
| RealFunc () | |
| The constructor is protected to allow sub-class instances only. | |
Protected Member Functions inherited from utl::SpatialFunction< Real > | |
| SpatialFunction (const Real &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. | |
Private Attributes | |
| short int | comp |
| Result component to extract for (0 if used as weight) | |
| utl::Point | X0 |
| Coordinates of cross section origin or reference point. | |
| Vec3 | normal |
| Outward-directed normal vector of the cross section. | |
| Vec3 | tangent |
| Vector defining the local y-direction of the cross section. | |
| double | depth |
| Depth of the the dual function domain (0=point extraction) | |
| double | width |
| Width of the the dual function domain (0=infinite) | |
| Vec3 | Xll |
| Lower-left corner of box domain for point extraction. | |
| Vec3 | Xur |
| Upper-right corner of box domain for point extraction. | |
| ASMbase * | patch |
| The patch that this field is defined on. | |
| std::set< int > | Delem |
| List of elements in domain. | |
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< Real > | |
| Real | zero |
| Return value for default implementations of derivatives. | |
Protected Attributes inherited from FunctionBase | |
| size_t | ncmp |
| Number of components in the return value. | |
Class representing a dual field for goal-oriented error estimation.
| DualRealFunc::DualRealFunc | ( | const Vec3 & | o, |
| const Vec3 & | n, | ||
| const Vec3 & | XZp, | ||
| double | d, | ||
| double | w = 0.0, |
||
| ASMbase * | p = nullptr, |
||
| int | c = 0 |
||
| ) |
Constructor for 3D problems.
| [in] | o | Origin of local cross section coordinate system |
| [in] | n | Cross section normal |
| [in] | XZp | Point in the local XZ-plane |
| [in] | d | Depth of dual function domain |
| [in] | w | Width of dual function domain (0=infinite) |
| [in] | p | The affected patch (null=all) |
| [in] | c | Component index to do extraction for |
References comp, Vec3::cross(), depth, normal, Vec3::normalize(), patch, tangent, width, and X0.
| DualRealFunc::DualRealFunc | ( | const Vec3 & | o, |
| const Vec3 & | n, | ||
| double | d, | ||
| double | w = 0.0, |
||
| ASMbase * | p = nullptr, |
||
| int | c = 0 |
||
| ) |
Constructor for 2D problems (in XY-plane).
| [in] | o | Origin of local cross section coordinate system |
| [in] | n | Cross section normal |
| [in] | d | Depth of dual function domain |
| [in] | w | Width of dual function domain (0=infinite) |
| [in] | p | The affected patch (null=all) |
| [in] | c | Component index to do extraction for |
References comp, depth, normal, Vec3::normalize(), patch, tangent, width, Vec3::x, and Vec3::y.
| DualRealFunc::DualRealFunc | ( | const utl::Point & | o, |
| const Vec3Pair & | d, | ||
| ASMbase * | p = nullptr, |
||
| double | eps = 0.0, |
||
| int | c = 0 |
||
| ) |
Constructor for point extraction.
| [in] | c | Component index to do extraction for |
| [in] | o | Point to extract the point quantity at |
| [in] | d | Lower-left and upper-rigth corner of function domain |
| [in] | p | The affected patch (null=all) |
| [in] | eps | Parameter tolerance for searching elements around a point |
References comp, depth, normal, patch, tangent, width, Vec3::x, and Vec3::y.
| double DualRealFunc::value | ( | const Vec3 & | X, |
| bool | ignoreDomain = false |
||
| ) | const |
Returns the function value at the given point.
| [in] | X | Spatial evaluation point |
| [in] | ignoreDomain | If true, the function is evaluated without considering the boundaries of the function domain. Otherwise, it is assumed identically zero outside these boundaries. |
References comp, depth, ecc(), inDomain(), normal, and X0.
Referenced by evaluate(), DualVecFunc::evaluate(), and DualVecFunc::getScalarValue().