Abstract
These types define the general function contract and common support for input and output vectors, compound functions, and transformed functions.
-
class analyticFunction : public dtOO::labelHandling, public dtOO::renderInterface
Abstract base class for analytic mappings between vector spaces.
An analytic function maps an input vector of type aFX to an output vector of type aFY. Derived classes define the input and output dimensions, input bounds, evaluation, cloning, and transformation behavior.
Input percent coordinates are normalized to [0, 1] in each direction. Convenience overloads evaluate one-, two-, and three-dimensional functions and return their output components as standard vectors.
Subclassed by dtOO::scaFunction, dtOO::vec2dFunction, dtOO::vec3dFunction
Public Functions
-
virtual analyticFunction *clone(void) const = 0
Create a deep copy of this function.
-
virtual analyticFunction *weakClone(void) const
Create a copy that may share immutable internal data with this function.
-
virtual analyticFunction *cloneTransformed(dtTransformer const *const dtT) const = 0
Create a copy transformed by the supplied transformer.
-
virtual analyticFunction *create(void) const = 0
Create a default instance of the concrete function type.
-
virtual void dump(void) const
Write the label, dynamic class name, and textual representation to the log.
-
virtual std::string dumpToString(void) const
Return a textual representation of this function.
-
virtual aFY Y(aFX const &xx) const = 0
Evaluate the function.
- Parameters:
xx – Input vector in native coordinates.
- Returns:
Function value.
-
virtual dtInt xDim(void) const = 0
Return the input-space dimension.
-
virtual dtInt yDim(void) const = 0
Return the output-space dimension.
-
virtual dtReal xMin(dtInt const &dir) const = 0
Return the lower bound of an input direction.
-
virtual dtReal xMax(dtInt const &dir) const = 0
Return the upper bound of an input direction.
-
virtual aFX x_percent(aFX const &xx) const
Convert normalized input coordinates to native coordinates.
- Parameters:
xx – One percent coordinate in [0, 1] per input direction.
- Returns:
Native input coordinates.
-
virtual aFX percent_x(aFX const &xx) const
Convert native input coordinates to normalized coordinates.
- Parameters:
xx – Native input coordinates.
- Returns:
One percent coordinate in [0, 1] per input direction.
-
virtual aFX invY(aFY const &yy) const
Numerically invert the function for an output value.
- Parameters:
yy – Target output vector.
- Throws:
Exception – if the numerical minimization does not converge.
- Returns:
Native input coordinates that produce the target output.
-
virtual bool isCompound(void) const
Return whether this function consists of multiple component functions.
-
virtual vectorHandling<analyticFunction*> const &vecRef(void) const
Return the component functions of a compound function.
-
virtual std::map<int, dtInt> const &mapRef(void) const
Return the mapping between compound-function and component indices.
-
virtual bool isTransformed(void) const
Return whether this function represents a transformed function.
-
virtual std::pair<aFY, aFY> yBoundingBox(void) const
Return lower and upper output bounds, if provided by the implementation.
-
std::vector<dtReal> const operator()(dtReal const &xx) const
Evaluate a one-dimensional function.
- Throws:
Exception – if xDim() is not one.
Public Static Functions
-
static aFX aFXThreeD(dtReal const &x0, dtReal const &x1, dtReal const &x2)
Create a three-dimensional input vector.
-
static aFY aFYThreeD(dtReal const &x0, dtReal const &x1, dtReal const &x2)
Create a three-dimensional output vector.
-
static aFY aFY_aFX(aFX const &xx)
Convert an input vector to an output vector with identical components.
-
virtual analyticFunction *clone(void) const = 0
-
class aFX : public std::vector<dtReal>
Input-coordinate vector used by analytic functions.
Public Functions
-
std::vector<dtReal> toStdVector(void)
Return the coordinates as a standard vector.
-
std::vector<dtReal> toStdVector(void)
-
class aFY : public std::vector<dtReal>
Output-value vector returned by analytic functions.
Public Functions
-
std::vector<dtReal> stdVector(void)
Return the values as a standard vector.
-
std::vector<dtReal> stdVector(void)
-
template<typename funT, typename invFunT>
class analyticFunctionCombination : public funT Combines a forward function with a separate function used for inversion.
-
template<typename funT>
class analyticFunctionCompound : public funT Adds tagged component-function ownership to an analytic function type.
Public Functions
-
void trojanHorse(vectorHandling<analyticFunction*> const &vec, std::map<int, dtInt> const &pos_tag)
Adopt externally owned components instead of cloning them.
The caller retains ownership of the supplied components.
-
funT &addComponent(funT const &toAdd)
Clone and append a component, assigning the next available tag.
-
bool isTrojan(void) const
Return whether this instance references externally owned components.
-
void trojanHorse(vectorHandling<analyticFunction*> const &vec, std::map<int, dtInt> const &pos_tag)
-
template<typename funT>
class analyticFunctionCompoundTrojanHorse Non-owning mutator for the components of a compound analytic function.
-
template<typename funT>
class analyticFunctionTransformed : public funT Decorates a function by applying a transformer to two- or three-dimensional outputs.
Public Functions
-
void setTransformer(dtTransformer const *const dtT)
Clone and replace the transformer used by this decorator.
-
void setTransformer(dtTransformer const *const dtT)
These classes define scalar, two-component vector, and three-component vector output interfaces. The dimension-specific classes define the one-, two-, and three-dimensional input interfaces from which concrete functions derive.
-
class scaFunction : public dtOO::analyticFunction
Base class for analytic functions with a scalar output.
Subclassed by dtOO::scaOneD, dtOO::scaThreeD, dtOO::scaTwoD
-
class scaOneD : public dtOO::scaFunction
Function with scalar argument and scalar return value.
An instance of
scaOneDis defined in the range [ _xxMin, _xxMax ]. This class implements functions for handling scalar arguments.Subclassed by dtOO::scaCurve2dOneD, dtOO::scaLinearOneD, dtOO::scaMuParserOneD, dtOO::scaOneDPolyInterface
Public Functions
-
virtual scaOneD *cloneTransformed(dtTransformer const *const dtT) const = 0
Create a copy transformed by the supplied transformer.
-
virtual dtReal YFloat(aFX const &xx) const
Function value.
- Parameters:
xx – Argument.
- Throws:
dtOO::eGeneral – If dimension of xx>1.
-
virtual dtReal invYFloat(dtReal const &yy) const
Inverse function.
- Parameters:
yy – Function value.
-
dtReal YFloatPercent(dtReal const &xP) const
Function value at argument given in percent.
- Parameters:
xP – Argument given in percent.
-
void setMinMax(dtReal const min, dtReal const max)
Define argument range of function.
- Parameters:
min – Minimum argument value.
max – Maximum argument value.
-
void setMin(dtReal const min)
Define minimum argument bound of function.
- Parameters:
min – Minimum argument value.
-
void setMax(dtReal const max)
Define maximum argument bound of function.
- Parameters:
max – Maximum argument value.
-
virtual dtInt xDim(void) const
Return dimension of argument.
-
virtual dtReal xMin(dtInt const &dir) const
Return minimal argument bound of function.
-
virtual dtReal xMax(dtInt const &dir) const
Return maximal argument bound of function.
-
dtReal getLength(void) const
Compute length of function.
Method approximates the length of the function f(x). This corresponds to:
\[ \int_{xMin}^{xMax} f dx \]Integration is performed as numerical integration with a step size of +1.0E-08.
-
dtReal x_percent(dtReal const &xx) const
Convert function argument from percent to current range.
- Parameters:
xx – Percent value of function argument range.
-
dtReal percent_x(dtReal const &xx) const
Convert function argument from current range to percent.
- Parameters:
xx – Current value of function argument range.
-
dtReal DYFloat(dtReal const &xx) const
First derivative of function.
Derivative is calculated numerically by an approximation.
- Parameters:
xx – Function argument value.
-
virtual scaOneD *cloneTransformed(dtTransformer const *const dtT) const = 0
-
class scaOneDPolyInterface : public dtOO::scaOneD
Interface for scalar one-dimensional functions parameterized by degrees of freedom.
Subclassed by dtOO::sca3PPointsBSplineOneD, dtOO::scaTanhGradingOneD, dtOO::scaTanhUnitGradingOneD
Public Functions
-
virtual scaOneDPolyInterface *clone(void) const = 0
Create a deep copy of this function.
-
virtual dtInt nDOF(void) const = 0
Return the number of adjustable degrees of freedom.
-
virtual void setDOF(std::vector<dtReal> const value) = 0
Set all adjustable degrees of freedom.
-
virtual scaOneDPolyInterface *clone(void) const = 0
-
class scaTwoD : public dtOO::scaFunction
Base class for scalar functions of two independent variables.
Subclassed by dtOO::scaMuParserTwoD
Public Functions
-
virtual scaTwoD *cloneTransformed(dtTransformer const *const dtT) const = 0
Create a copy transformed by the supplied transformer.
-
dtReal YFloatPercent(dtReal const &xP0, dtReal const &xP1) const
Evaluate at normalized coordinates in [0, 1].
-
virtual dtInt xDim(void) const
Return the input-space dimension.
-
virtual dtReal xMin(dtInt const &dir) const
Return the lower bound of an input direction.
-
virtual dtReal xMax(dtInt const &dir) const
Return the upper bound of an input direction.
-
std::vector<dtReal> DYFloat(aFX const &xx) const
Numerically compute the partial derivatives at an input vector.
-
virtual scaTwoD *cloneTransformed(dtTransformer const *const dtT) const = 0
-
class scaThreeD : public dtOO::scaFunction
Base class for scalar functions of three independent variables.
Subclassed by dtOO::scaMuParserThreeD
Public Functions
-
virtual scaThreeD *cloneTransformed(dtTransformer const *const dtT) const = 0
Create a copy transformed by the supplied transformer.
-
dtReal YFloatPercent(dtReal const &xP0, dtReal const &xP1, dtReal const &xP2) const
Evaluate at normalized coordinates in [0, 1].
-
virtual dtInt xDim(void) const
Return the input-space dimension.
-
virtual dtReal xMin(dtInt const &dir) const
Return the lower bound of an input direction.
-
virtual dtReal xMax(dtInt const &dir) const
Return the upper bound of an input direction.
-
std::vector<dtReal> DYFloat(aFX const &xx) const
Numerically compute the partial derivatives at an input vector.
-
virtual scaThreeD *cloneTransformed(dtTransformer const *const dtT) const = 0
-
class vec2dFunction : public dtOO::analyticFunction
Base class for analytic functions that return two-dimensional points.
Subclassed by dtOO::vec2dOneD, dtOO::vec2dTwoD
Public Functions
-
virtual vec2dFunction *clone(void) const = 0
Create a deep copy of this function.
-
virtual dtInt yDim(void) const
Return the output-space dimension.
-
virtual vec2dFunction *clone(void) const = 0
-
class vec2dOneD : public dtOO::vec2dFunction
Base class for parameterized curves in two-dimensional space.
Subclassed by dtOO::vec2dCurve2dOneD
Public Functions
-
virtual vec2dOneD *cloneTransformed(dtTransformer const *const dtT) const = 0
Create a copy transformed by the supplied transformer.
-
virtual aFY Y(aFX const &xx) const
Evaluate the function.
- Parameters:
xx – Input vector in native coordinates.
- Returns:
Function value.
-
virtual dtInt xDim(void) const
Return the input-space dimension.
-
virtual dtReal xMin(dtInt const &dir) const
Return the lower bound of an input direction.
-
virtual dtReal xMax(dtInt const &dir) const
Return the upper bound of an input direction.
-
virtual dtVector2 DYdtVector2(dtReal const &xx) const
Numerically compute the curve tangent at a native parameter.
-
dtVector2 unitNdtVector2(dtReal const &xx) const
Return the unit normal at a native parameter.
-
dtVector2 unitNdtVector2Percent(dtReal const &xx) const
Return the unit normal at a normalized parameter.
-
dtPoint2 YdtPoint2Percent(dtReal const &xx) const
Evaluate the curve at a normalized parameter.
-
dtReal length(dtReal const &x1) const
Return the arc length from the minimum parameter through x1.
-
dtReal length(void) const
Return the arc length over the full parameter interval.
-
virtual vec2dOneD *cloneTransformed(dtTransformer const *const dtT) const = 0
-
class vec2dTwoD : public dtOO::vec2dFunction
Base class for two-parameter mappings into two-dimensional space.
Subclassed by dtOO::vec2dBiLinearTwoD, dtOO::vec2dMuParserTwoD, dtOO::vec2dMultiBiLinearTwoD, dtOO::vec2dSurface2dTwoD
Public Functions
-
virtual vec2dTwoD *cloneTransformed(dtTransformer const *const dtT) const = 0
Create a copy transformed by the supplied transformer.
-
virtual aFY Y(aFX const &xx) const = 0
Evaluate the function.
- Parameters:
xx – Input vector in native coordinates.
- Returns:
Function value.
-
virtual dtInt xDim(void) const
Return the input-space dimension.
-
virtual dtReal xMin(dtInt const &dir) const
Return the lower bound of an input direction.
-
virtual dtReal xMax(dtInt const &dir) const
Return the upper bound of an input direction.
-
virtual std::vector<dtVector2> DYdtVector2(aFX const &xx) const
Numerically compute the two partial derivative vectors.
-
dtPoint2 YdtPoint2Percent(aFX const &xx) const
Evaluate the mapping at normalized input coordinates.
-
virtual vec2dTwoD *cloneTransformed(dtTransformer const *const dtT) const = 0
-
class vec3dFunction : public dtOO::analyticFunction
Base class for analytic functions that return three-dimensional points.
Subclassed by dtOO::vec3dOneD, dtOO::vec3dThreeD, dtOO::vec3dTwoD
Public Functions
-
virtual vec3dFunction *clone(void) const = 0
Create a deep copy of this function.
-
virtual dtInt yDim(void) const
Return the output-space dimension.
-
virtual vec3dFunction *clone(void) const = 0
-
class vec3dOneD : public dtOO::vec3dFunction
Base class for parameterized curves in three-dimensional space.
Subclassed by dtOO::vec3dCurve2dInSurfaceOneD, dtOO::vec3dCurveOneD, dtOO::vec3dMuParserOneD
Public Functions
-
virtual vec3dOneD *cloneTransformed(dtTransformer const *const dtT) const = 0
Create a copy transformed by the supplied transformer.
-
virtual aFY Y(aFX const &xx) const = 0
Evaluate the function.
- Parameters:
xx – Input vector in native coordinates.
- Returns:
Function value.
-
virtual dtInt xDim(void) const
Return the input-space dimension.
-
virtual dtReal xMin(dtInt const &dir) const
Return the lower bound of an input direction.
-
virtual dtReal xMax(dtInt const &dir) const
Return the upper bound of an input direction.
-
virtual dtVector3 DYdtVector3(dtReal const &xx) const
Numerically compute the curve tangent at a native parameter.
-
virtual dtVector3 DYdtVector3Percent(dtReal const &xx) const
Numerically compute the curve tangent at a normalized parameter.
-
dtPoint3 YdtPoint3Percent(dtReal const &xx) const
Evaluate the curve at a normalized parameter.
-
dtReal length(dtReal const &x1) const
Return the arc length from the minimum parameter through x1.
-
dtReal length(void) const
Return the arc length over the full parameter interval.
-
dtReal operator%(const dtReal &percent) const
Return the native parameter corresponding to a normalized value.
-
virtual vec3dOneD *cloneTransformed(dtTransformer const *const dtT) const = 0
-
class vec3dTwoD : public dtOO::vec3dFunction
Base class for two-parameter mappings into three-dimensional space.
Subclassed by dtOO::vec3dBiLinearTwoD, dtOO::vec3dMuParserTwoD, dtOO::vec3dSurfaceTwoD, dtOO::vec3dThickedTwoD
Public Functions
-
virtual vec3dTwoD *cloneTransformed(dtTransformer const *const dtT) const = 0
Create a copy transformed by the supplied transformer.
-
virtual aFY Y(aFX const &xx) const = 0
Evaluate the function.
- Parameters:
xx – Input vector in native coordinates.
- Returns:
Function value.
-
virtual dtInt xDim(void) const
Return the input-space dimension.
-
virtual dtReal xMin(dtInt const &dir) const
Return the lower bound of an input direction.
-
virtual dtReal xMax(dtInt const &dir) const
Return the upper bound of an input direction.
-
virtual std::vector<dtVector3> DYdtVector3(aFX const &xx) const
Numerically compute the two partial derivative vectors.
-
dtVector3 unitNdtVector3(aFX const &xx) const
Return the unit surface normal at native input coordinates.
-
dtVector3 unitNdtVector3Percent(aFX const &xx) const
Return the unit surface normal at normalized input coordinates.
-
dtPoint3 YdtPoint3Percent(aFX const &xx) const
Evaluate the mapping at normalized input coordinates.
-
aFX operator%(const aFX &percent) const
Convert normalized coordinates to native input coordinates.
-
virtual vec3dTwoD *cloneTransformed(dtTransformer const *const dtT) const = 0
-
class vec3dThreeD : public dtOO::vec3dFunction
Base class for three-parameter mappings into three-dimensional space.
Subclassed by dtOO::vec3dBoxThreeD, dtOO::vec3dMuParserThreeD, dtOO::vec3dTransVolThreeD, dtOO::vec3dTriLinearThreeD
Public Functions
-
virtual vec3dThreeD *clone(void) const = 0
Create a deep copy of this function.
-
virtual vec3dThreeD *cloneTransformed(dtTransformer const *const dtT) const = 0
Create a copy transformed by the supplied transformer.
-
virtual vec3dThreeD *create(void) const = 0
Create a default instance of the concrete function type.
-
virtual aFY Y(aFX const &xx) const = 0
Evaluate the function.
- Parameters:
xx – Input vector in native coordinates.
- Returns:
Function value.
-
virtual dtInt xDim(void) const
Return the input-space dimension.
-
virtual dtReal xMin(dtInt const &dir) const
Return the lower bound of an input direction.
-
virtual dtReal xMax(dtInt const &dir) const
Return the upper bound of an input direction.
-
virtual std::vector<dtVector3> DYdtVector3(aFX const &xx) const
Numerically compute the three partial derivative vectors.
-
dtPoint3 YdtPoint3Percent(aFX const &xx) const
Evaluate the mapping at normalized input coordinates.
-
virtual vec3dThreeD *clone(void) const = 0
Concrete
These concrete and adapting classes use analyticFunction or one of the
function superclasses to implement scalar and vector mappings.
-
class sca3PPointsBSplineOneD : public dtOO::scaOneDPolyInterface
Scalar cubic B-spline defined by three control points.
Subclassed by dtOO::analyticFunctionCompound< sca3PPointsBSplineOneD >
Public Functions
-
sca3PPointsBSplineOneD(dtReal const &xB, dtReal const &yB, dtReal const &xA, dtReal const &yA)
Construct a unit-interval spline through fixed endpoints and two user-supplied intermediate points.
- Parameters:
xB – First intermediate point abscissa.
yB – First intermediate point ordinate.
xA – Second intermediate point abscissa.
yA – Second intermediate point ordinate.
-
virtual sca3PPointsBSplineOneD *clone(void) const
Create a deep copy of this function.
-
virtual sca3PPointsBSplineOneD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual sca3PPointsBSplineOneD *create(void) const
Create a default instance of the concrete function type.
-
virtual dtInt nDOF(void) const
Return the number of B-spline degrees of freedom.
-
virtual void setDOF(std::vector<dtReal> const value)
Update the B-spline degrees of freedom.
-
sca3PPointsBSplineOneD(dtReal const &xB, dtReal const &yB, dtReal const &xA, dtReal const &yA)
-
class scaCurve2dOneD : public dtOO::scaOneD
Scalar function obtained from the ordinate of a two-dimensional curve.
Public Functions
-
virtual scaCurve2dOneD *clone(void) const
Create a deep copy of this function.
-
virtual scaCurve2dOneD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual scaCurve2dOneD *create(void) const
Create a default instance of the concrete function type.
-
dtCurve2d const *constPtrDtCurve2d(void) const
Return the underlying curve as a const pointer.
-
dtCurve2d *ptrDtCurve2d(void)
Return the underlying curve for modification.
-
void translate(dtVector2 const vector)
Translate the underlying curve by a vector.
-
std::vector<dtPoint2> getControlPoints(void) const
Return the control points of the underlying curve.
-
virtual scaCurve2dOneD *clone(void) const
-
class scaLinearOneD : public dtOO::scaOneD
Scalar affine interpolation between two input/output point pairs.
Public Functions
-
virtual scaLinearOneD *clone(void) const
Create a deep copy of this function.
-
virtual scaLinearOneD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual scaLinearOneD *create(void) const
Create a default instance of the concrete function type.
-
virtual dtReal invYFloat(dtReal const &yy) const
Inverse function.
- Parameters:
yy – Function value.
-
virtual scaLinearOneD *clone(void) const
-
class scaMuParserOneD : public dtOO::scaOneD
Scalar
muParserfunction with one function argument.Binding to
muParserlibrary. The function is created via astringexpression.Public Functions
-
scaMuParserOneD(std::string const expression, std::string const argument)
Create a simple function, e.g by
fun = scaMuParserOneD(“5.*xx*xx+(2*xx)”, “xx”)
- Parameters:
expression – Function expression.
argument – Argument.
- Throws:
dtOO::eGeneral – Catch `muParser` and throw exception.
-
virtual scaMuParserOneD *clone(void) const
Create a deep copy of this function.
-
virtual scaMuParserOneD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual scaMuParserOneD *create(void) const
Create a default instance of the concrete function type.
-
void setArgumentRange(dtReal xMin, dtReal xMax)
Set the native input interval accepted by the parsed expression.
-
scaMuParserOneD(std::string const expression, std::string const argument)
-
class scaMuParserThreeD : public dtOO::scaThreeD
Scalar three-variable expression evaluated by muParser.
Public Functions
-
scaMuParserThreeD(std::string const expression, std::string const argOne, std::string const argTwo, std::string const argThree)
- Parameters:
expression – muParser expression that evaluates to a scalar.
argOne – Name of the first expression variable.
argTwo – Name of the second expression variable.
argThree – Name of the third expression variable.
-
virtual scaMuParserThreeD *clone(void) const
Create a deep copy of this function.
-
virtual scaMuParserThreeD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual scaMuParserThreeD *create(void) const
Create a default instance of the concrete function type.
-
scaMuParserThreeD(std::string const expression, std::string const argOne, std::string const argTwo, std::string const argThree)
-
class scaMuParserTwoD : public dtOO::scaTwoD
Scalar two-variable expression evaluated by muParser.
Public Functions
-
scaMuParserTwoD(std::string const expression, std::string const argOne, std::string const argTwo)
- Parameters:
expression – muParser expression that evaluates to a scalar.
argOne – Name of the first expression variable.
argTwo – Name of the second expression variable.
-
virtual scaMuParserTwoD *clone(void) const
Create a deep copy of this function.
-
virtual scaMuParserTwoD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual scaMuParserTwoD *create(void) const
Create a default instance of the concrete function type.
-
scaMuParserTwoD(std::string const expression, std::string const argOne, std::string const argTwo)
-
template<typename funT>
class scaMultiOneD : public funT Joins scalar one-dimensional functions over their respective input ranges.
-
class scaTanhGradingOneD : public dtOO::scaOneDPolyInterface
Scalar hyperbolic-tangent grading function with adjustable coefficients.
Subclassed by dtOO::analyticFunctionCompound< scaTanhGradingOneD >
Public Functions
-
scaTanhGradingOneD(std::vector<dtReal> cc, dtReal const &gg, dtReal const &ggMin, dtReal const &ggMax)
- Parameters:
cc – Coefficients of the hyperbolic-tangent expression.
gg – Current grading factor.
ggMin – Minimum permitted grading factor.
ggMax – Maximum permitted grading factor.
-
virtual scaTanhGradingOneD *clone(void) const
Create a deep copy of this function.
-
virtual scaTanhGradingOneD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual scaTanhGradingOneD *create(void) const
Create a default instance of the concrete function type.
-
virtual dtInt nDOF(void) const
Return the number of grading degrees of freedom.
-
virtual void setDOF(std::vector<dtReal> const value)
Update the grading degrees of freedom.
-
scaTanhGradingOneD(std::vector<dtReal> cc, dtReal const &gg, dtReal const &ggMin, dtReal const &ggMax)
-
class scaTanhUnitGradingOneD : public dtOO::scaOneDPolyInterface
Unit-interval scalar hyperbolic-tangent grading with adjustable coefficients.
Subclassed by dtOO::analyticFunctionCompound< scaTanhUnitGradingOneD >
Public Functions
-
scaTanhUnitGradingOneD(std::vector<dtReal> cc, dtReal const &gg, dtReal const &ggMin, dtReal const &ggMax)
- Parameters:
cc – Coefficients of the unit-interval grading expression.
gg – Current grading factor.
ggMin – Minimum permitted grading factor.
ggMax – Maximum permitted grading factor.
-
virtual scaTanhUnitGradingOneD *clone(void) const
Create a deep copy of this function.
-
virtual scaTanhUnitGradingOneD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual scaTanhUnitGradingOneD *create(void) const
Create a default instance of the concrete function type.
-
virtual dtInt nDOF(void) const
Return the number of grading degrees of freedom.
-
virtual void setDOF(std::vector<dtReal> const value)
Update the grading degrees of freedom.
-
scaTanhUnitGradingOneD(std::vector<dtReal> cc, dtReal const &gg, dtReal const &ggMin, dtReal const &ggMax)
-
class transIntCube
Transfinite interpolation of a cube bounded by six surface mappings.
Public Functions
-
transIntCube(map2dTo3d const *const aS0, map2dTo3d const *const aS1, map2dTo3d const *const aS2, map2dTo3d const *const aS3, map2dTo3d const *const aS4, map2dTo3d const *const aS5)
Construct the cube from its normalized-coordinate boundary surfaces.
- Parameters:
aS0 – Surface at z = 1.
aS1 – Surface at x = 0.
aS2 – Surface at z = 0.
aS3 – Surface at x = 1.
aS4 – Surface at y = 0.
aS5 – Surface at y = 1.
-
dtPoint3 getValue(dtReal const xx, dtReal const yy, dtReal const zz) const
Evaluate the interpolated volume at normalized cube coordinates.
-
transIntCube(map2dTo3d const *const aS0, map2dTo3d const *const aS1, map2dTo3d const *const aS2, map2dTo3d const *const aS3, map2dTo3d const *const aS4, map2dTo3d const *const aS5)
-
class vec2dBiLinearTwoD : public dtOO::vec2dTwoD
Bilinear mapping of a quadrilateral into two-dimensional space.
Public Functions
-
vec2dBiLinearTwoD(dtPoint2 const &p0, dtPoint2 const &p1, dtPoint2 const &p2, dtPoint2 const &p3)
Construct from the four corners of the parameter-space quadrilateral.
(v) A |
p3 p2 +—–—+
+—–—+ –> (u) p0 p1according to: http://en.wikipedia.org/wiki/Bilinear_interpolation
-
vec2dBiLinearTwoD(dtPoint2 const &p0, dtPoint2 const &p2)
Construct an axis-aligned quadrilateral from opposite corners.
-
virtual vec2dBiLinearTwoD *clone(void) const
Create a deep copy of this function.
-
virtual vec2dBiLinearTwoD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec2dBiLinearTwoD *create(void) const
Create a default instance of the concrete function type.
-
virtual aFY Y(aFX const &xx) const
Evaluate the function.
- Parameters:
xx – Input vector in native coordinates.
- Returns:
Function value.
-
vec2dBiLinearTwoD(dtPoint2 const &p0, dtPoint2 const &p1, dtPoint2 const &p2, dtPoint2 const &p3)
-
class vec2dCurve2dOneD : public dtOO::vec2dOneD
Two-dimensional curve backed by a dtCurve2d geometry object.
Public Functions
-
virtual vec2dCurve2dOneD *clone(void) const
Create a deep copy of this function.
-
virtual vec2dCurve2dOneD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec2dCurve2dOneD *create(void) const
Create a default instance of the concrete function type.
-
dtCurve2d const *ptrDtCurve2d(void) const
Return the underlying curve geometry.
-
virtual vec2dCurve2dOneD *clone(void) const
-
class vec2dMuParserTwoD : public dtOO::vec2dTwoD
Two-dimensional vector expression of two variables evaluated by muParser.
Public Functions
-
vec2dMuParserTwoD(std::string const expression, std::string const argOne, std::string const argTwo)
- Parameters:
expression – muParser expression that evaluates to two components.
argOne – Name of the first expression variable.
argTwo – Name of the second expression variable.
-
virtual vec2dMuParserTwoD *clone(void) const
Create a deep copy of this function.
-
virtual vec2dMuParserTwoD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec2dMuParserTwoD *create(void) const
Create a default instance of the concrete function type.
-
vec2dMuParserTwoD(std::string const expression, std::string const argOne, std::string const argTwo)
-
class vec2dMultiBiLinearTwoD : public dtOO::vec2dTwoD
Piecewise bilinear mapping assembled from a two-dimensional point grid.
Public Functions
-
vec2dMultiBiLinearTwoD(twoDArrayHandling<dtPoint2> const &pp)
Construct piecewise bilinear patches from a rectangular point grid.
-
virtual vec2dMultiBiLinearTwoD *clone(void) const
Create a deep copy of this function.
-
virtual vec2dMultiBiLinearTwoD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec2dMultiBiLinearTwoD *create(void) const
Create a default instance of the concrete function type.
-
vec2dMultiBiLinearTwoD(twoDArrayHandling<dtPoint2> const &pp)
-
class vec2dSurface2dTwoD : public dtOO::vec2dTwoD
Two-parameter mapping backed by a planar surface geometry object.
Public Functions
-
virtual vec2dSurface2dTwoD *clone(void) const
Create a deep copy of this function.
-
virtual vec2dSurface2dTwoD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec2dSurface2dTwoD *create(void) const
Create a default instance of the concrete function type.
-
virtual aFY Y(aFX const &xx) const
Evaluate the function.
- Parameters:
xx – Input vector in native coordinates.
- Returns:
Function value.
-
dtSurface2d const *ptrDtSurface2d(void) const
Return the underlying surface geometry.
-
virtual vec2dSurface2dTwoD *clone(void) const
-
class vec3dBiLinearTwoD : public dtOO::vec3dTwoD
Bilinear mapping of a quadrilateral into three-dimensional space.
Public Functions
-
vec3dBiLinearTwoD(dtPoint3 const &p0, dtPoint3 const &p1, dtPoint3 const &p2, dtPoint3 const &p3)
Construct from the four corners of the parameter-space quadrilateral.
(v) A |
p3 p2 +—–—+
+—–—+ –> (u) p0 p1according to: http://en.wikipedia.org/wiki/Bilinear_interpolation
-
virtual vec3dBiLinearTwoD *clone(void) const
Create a deep copy of this function.
-
virtual vec3dBiLinearTwoD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec3dBiLinearTwoD *create(void) const
Create a default instance of the concrete function type.
-
vec3dBiLinearTwoD(dtPoint3 const &p0, dtPoint3 const &p1, dtPoint3 const &p2, dtPoint3 const &p3)
-
class vec3dBoxThreeD : public dtOO::vec3dThreeD
Trilinear mapping of an axis-aligned box defined by opposite corners.
Subclassed by dtOO::analyticFunctionCompound< vec3dBoxThreeD >
Public Functions
-
virtual vec3dBoxThreeD *clone(void) const
Create a deep copy of this function.
-
virtual vec3dBoxThreeD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec3dBoxThreeD *create(void) const
Create a default instance of the concrete function type.
-
virtual aFY Y(aFX const &xx) const
Evaluate the function.
- Parameters:
xx – Input vector in native coordinates.
- Returns:
Function value.
-
virtual bool closed(dtInt const &dir) const
- Todo:
Fix closed method. Currently return value is always false!
-
virtual vec3dBoxThreeD *clone(void) const
-
class vec3dCurve2dInSurfaceOneD : public dtOO::vec3dOneD
Three-dimensional curve obtained by embedding a 2D curve in a surface.
Public Functions
-
virtual vec3dCurve2dInSurfaceOneD *clone(void) const
Create a deep copy of this function.
-
virtual vec3dCurve2dInSurfaceOneD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec3dCurve2dInSurfaceOneD *create(void) const
Create a default instance of the concrete function type.
-
virtual aFY Y(aFX const &xx) const
Evaluate the function.
- Parameters:
xx – Input vector in native coordinates.
- Returns:
Function value.
-
virtual bool closed(dtInt const &dir) const
- Todo:
: What if surface is closed and curve goes in periodic direction?
-
virtual vec3dCurve2dInSurfaceOneD *clone(void) const
-
class vec3dCurveOneD : public dtOO::vec3dOneD
Three-dimensional curve backed by a dtCurve geometry object.
Subclassed by dtOO::analyticFunctionCompound< vec3dCurveOneD >
Public Functions
-
virtual vec3dCurveOneD *clone(void) const
Create a deep copy of this function.
-
virtual vec3dCurveOneD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec3dCurveOneD *create(void) const
Create a default instance of the concrete function type.
-
virtual aFY Y(aFX const &xx) const
Evaluate the function.
- Parameters:
xx – Input vector in native coordinates.
- Returns:
Function value.
-
dtCurve *ptrDtCurve(void) const
Return the underlying curve geometry for modification.
-
dtCurve const *const ptrConstDtCurve(void) const
Return the underlying curve geometry as a const pointer.
-
virtual vec3dCurveOneD *clone(void) const
-
class vec3dMuParserOneD : public dtOO::vec3dOneD
Three-dimensional vector expression of one variable evaluated by muParser.
Public Functions
-
vec3dMuParserOneD(std::string const expression, std::string const argOne)
- Parameters:
expression – muParser expression that evaluates to three components.
argOne – Name of the expression variable.
-
virtual vec3dMuParserOneD *clone(void) const
Create a deep copy of this function.
-
virtual vec3dMuParserOneD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec3dMuParserOneD *create(void) const
Create a default instance of the concrete function type.
-
vec3dMuParserOneD(std::string const expression, std::string const argOne)
-
class vec3dMuParserThreeD : public dtOO::vec3dThreeD
Three-dimensional vector expression of three variables evaluated by muParser.
Public Functions
-
vec3dMuParserThreeD(std::string const expression, std::string const argOne, std::string const argTwo, std::string const argThree)
- Parameters:
expression – muParser expression that evaluates to three components.
argOne – Name of the first expression variable.
argTwo – Name of the second expression variable.
argThree – Name of the third expression variable.
-
virtual vec3dMuParserThreeD *clone(void) const
Create a deep copy of this function.
-
virtual vec3dMuParserThreeD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec3dMuParserThreeD *create(void) const
Create a default instance of the concrete function type.
-
vec3dMuParserThreeD(std::string const expression, std::string const argOne, std::string const argTwo, std::string const argThree)
-
class vec3dMuParserTwoD : public dtOO::vec3dTwoD
Three-dimensional vector expression of two variables evaluated by muParser.
Public Functions
-
vec3dMuParserTwoD(std::string const expression, std::string const argOne, std::string const argTwo)
- Parameters:
expression – muParser expression that evaluates to three components.
argOne – Name of the first expression variable.
argTwo – Name of the second expression variable.
-
virtual vec3dMuParserTwoD *clone(void) const
Create a deep copy of this function.
-
virtual vec3dMuParserTwoD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec3dMuParserTwoD *create(void) const
Create a default instance of the concrete function type.
-
vec3dMuParserTwoD(std::string const expression, std::string const argOne, std::string const argTwo)
-
template<typename funT>
class vec3dMultiThreeD : public funT Joins three-dimensional volume mappings over their respective input boxes.
Public Functions
-
class vec3dSurfaceTwoD : public dtOO::vec3dTwoD
Two-parameter three-dimensional mapping backed by a surface geometry object.
Subclassed by dtOO::analyticFunctionCompound< vec3dSurfaceTwoD >
Public Functions
-
virtual vec3dSurfaceTwoD *clone(void) const
Create a deep copy of this function.
-
virtual vec3dSurfaceTwoD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec3dSurfaceTwoD *create(void) const
Create a default instance of the concrete function type.
-
virtual aFY Y(aFX const &xx) const
Evaluate the function.
- Parameters:
xx – Input vector in native coordinates.
- Returns:
Function value.
-
dtSurface *ptrDtSurface(void) const
Return the underlying surface geometry for modification.
-
dtSurface const *constPtrDtSurface(void) const
Return the underlying surface geometry as a const pointer.
-
virtual vec3dSurfaceTwoD *clone(void) const
-
class vec3dThickedTwoD : public dtOO::vec3dTwoD
Add a scalar function \(s(\underline{x})\) value to a vector function \(\underline{f}(u,v)\) according to
\[ \underline{t}(u,v) = \underline{f}(u,v) + s(\underline{x}) \left( \underline{n}_f(u,v) - \left( \underline{n}_f(u,v) \cdot \underline{c} \right) \cdot \underline{c} \right) \text{.} \]The reference vector \(\underline{c}\) is supplied when constructing the mapping.Public Functions
-
vec3dThickedTwoD(vec3dTwoD const *const ff, vec3dTwoD const *const tt, dtVector3 const nf)
- Parameters:
ff – Base surface mapping.
tt – Thickness mapping.
nf – User-defined reference vector used to project the normal.
-
virtual vec3dThickedTwoD *clone(void) const
Create a deep copy of this function.
-
virtual vec3dThickedTwoD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec3dThickedTwoD *create(void) const
Create a default instance of the concrete function type.
-
virtual aFY Y(aFX const &xx) const
Evaluate the function.
- Parameters:
xx – Input vector in native coordinates.
- Returns:
Function value.
-
virtual bool closed(dtInt const &dir) const
- Todo:
Is this correct? Is it never closed?
-
vec3dThickedTwoD(vec3dTwoD const *const ff, vec3dTwoD const *const tt, dtVector3 const nf)
-
class vec3dTransVolThreeD : public dtOO::vec3dThreeD
Transfinite volume mapping constructed from six boundary-surface mappings.
Subclassed by dtOO::analyticFunctionCompound< vec3dTransVolThreeD >
Public Functions
-
vec3dTransVolThreeD(vec3dTwoD const *const v3d2d0, vec3dTwoD const *const v3d2d1, vec3dTwoD const *const v3d2d2, vec3dTwoD const *const v3d2d3, vec3dTwoD const *const v3d2d4, vec3dTwoD const *const v3d2d5)
Construct the volume from its normalized-coordinate boundary surfaces.
- Parameters:
v3d2d0 – Surface at z = 1.
v3d2d1 – Surface at x = 0.
v3d2d2 – Surface at z = 0.
v3d2d3 – Surface at x = 1.
v3d2d4 – Surface at y = 0.
v3d2d5 – Surface at y = 1.
-
virtual vec3dTransVolThreeD *clone(void) const
Create a deep copy of this function.
-
virtual vec3dTransVolThreeD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec3dTransVolThreeD *create(void) const
Create a default instance of the concrete function type.
-
virtual aFY Y(aFX const &xx) const
Evaluate the function.
- Parameters:
xx – Input vector in native coordinates.
- Returns:
Function value.
-
virtual bool closed(dtInt const &dir) const
- Todo:
Fix closed method. Currently return value is always false!
-
vec3dTransVolThreeD(vec3dTwoD const *const v3d2d0, vec3dTwoD const *const v3d2d1, vec3dTwoD const *const v3d2d2, vec3dTwoD const *const v3d2d3, vec3dTwoD const *const v3d2d4, vec3dTwoD const *const v3d2d5)
-
class vec3dTriLinearThreeD : public dtOO::vec3dThreeD
Trilinear mapping of a hexahedron defined by its eight corner points.
Public Functions
-
vec3dTriLinearThreeD(dtPoint3 const &p000, dtPoint3 const &p100, dtPoint3 const &p010, dtPoint3 const &p110, dtPoint3 const &p001, dtPoint3 const &p101, dtPoint3 const &p011, dtPoint3 const &p111)
according to: https://en.wikipedia.org/wiki/Trilinear_interpolation
-
virtual vec3dTriLinearThreeD *clone(void) const
Create a deep copy of this function.
-
virtual vec3dTriLinearThreeD *cloneTransformed(dtTransformer const *const dtT) const
Create a copy transformed by the supplied transformer.
-
virtual vec3dTriLinearThreeD *create(void) const
Create a default instance of the concrete function type.
-
vec3dTriLinearThreeD(dtPoint3 const &p000, dtPoint3 const &p100, dtPoint3 const &p010, dtPoint3 const &p110, dtPoint3 const &p001, dtPoint3 const &p101, dtPoint3 const &p011, dtPoint3 const &p111)