|
IFEM
90A354
|
Unary spatial function as a sum of other spatial functions. More...
#include <FunctionSum.h>


Public Member Functions | |
| FunctionSum (FunctionBase *f, double w=1.0) | |
| The constructor specifies the first function to sum. More... | |
| virtual | ~FunctionSum () |
| Empty destructor. | |
| bool | add (FunctionBase *f, double w=1.0) |
| Adds a function to the list of functions to sum. More... | |
| virtual unsigned char | getType () const |
| Returns the function type flag. | |
| virtual bool | inDomain (const Vec3 &X) const |
| Checks if a specified point is within the function domain. | |
| virtual bool | initPatch (size_t idx) |
| Returns true if current patch is affected by this function. | |
| virtual std::vector< double > | getValue (const Vec3 &X) const |
| Returns the function value as an array. | |
| virtual double | getScalarValue (const Vec3 &X) const |
| Returns a representative scalar equivalent of the function value. | |
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 | |
| FunctionSum () | |
| Constructor to allow empty initialization in subclasses. | |
Protected Member Functions inherited from FunctionBase | |
| FunctionBase () | |
| The constructor is protected to allow sub-class instances only. | |
Private Types | |
| typedef std::pair< FunctionBase *, double > | WeightedFunc |
| Convenience type. | |
Private Attributes | |
| std::vector< WeightedFunc > | comps |
| List of weighted functions to sum. | |
Additional Inherited Members | |
Protected Attributes inherited from FunctionBase | |
| size_t | ncmp |
| Number of components in the return value. | |
Unary spatial function as a sum of other spatial functions.
|
inlineexplicit |
The constructor specifies the first function to sum.
| [in] | f | Pointer to a function to sum |
| [in] | w | Weighting factor. If negative, take max value instead. |
References add().
| bool FunctionSum::add | ( | FunctionBase * | f, |
| double | w = 1.0 |
||
| ) |
Adds a function to the list of functions to sum.
| [in] | f | Pointer to a function to sum |
| [in] | w | Weighting factor. If negative, take max value instead. |
References comps, FunctionBase::dim(), and FunctionBase::ncmp.
Referenced by FunctionSum().