Interpolator class used for managing available interpolator algorithms and providing basic support functions with operations common to every derived class.
More...
#include <gmInterpolator.h>
|
virtual | ~GmInterpolator () |
| Virtual destructor.
|
|
bool | isValid () const |
| Is this a valid object? Invalid objects can arise, for example, if the interpolator type given in the constructor is not appropriate for this interpolator class kind.
|
|
const GmInterpolatorObject * | interpolatorObject () const |
| Returns the interpolator object used by this interpolator.
|
|
const GmMesh * | mesh () const |
| Returns the mesh associated with this interpolator. Can be NULL.
|
|
QString | interpolatorTypeToStr () const |
| Returns a string representing the interpolator object.
|
|
|
| GmInterpolator (GmInterpolatorKind kind, GmInterpolatorType type, const QVariant &typeParam, const GmValueAccessor *coordAccessor, const GmMesh *mesh, bool skipTests=false) |
| Interpolator basic constructor. Protected since this class should be used only as a base class for the real interpolator classes. More...
|
|
bool | interpolate (GmInterpolatorCoordinateSetBinding *pointSet, GmInterpolatorInputDataBinding *inData, GmInterpolatorOutputDataBinding *outData, const GmInterpolatorOutputCoordinateBinding &coord) const |
| Generic interpolation routine, receiving the needed data through several binding objects. More...
|
|
void | gaussToNodesInterpolate (GmInterpolatorGaussCoordinateSetBinding *pointSet, GmInterpolatorInputDataBinding *inData, GmInterpolatorOutputMultiDataBinding *outData) const |
| Generic interpolation routine for calculating multiple values, especifically node values from a point cloud internal to an element. More...
|
|
|
const GmInterpolatorObject * | _interp |
| The interpolator object for the requested interpolation type. NULL if this interpolator is invalid.
|
|
QVariant | _interpParam |
| The interpolator parameter received on the constructor.
|
|
const GmValueAccessor * | _coordAc |
| The accessor for node coordinates.
|
|
const GmMesh * | _mesh |
| The mesh containing the source data points. Can be NULL since it is required by only some interpolators.
|
|
Interpolator class used for managing available interpolator algorithms and providing basic support functions with operations common to every derived class.
This class should not be used directly (except for its public static functions). Use classes such as GmNodeToElementPointInterpolator, GmGaussToElementNodeInterpolator and friends instead.
◆ GmInterpolator()
Interpolator basic constructor. Protected since this class should be used only as a base class for the real interpolator classes.
This constructor instances the interpolator object that will be used for executing the interpolation by calling GmInterpolator::interpolatorObjectFromType() and also stores internally the given accessors, mesh and type parameters.
If the given type /parameter is invalid or incompatible with the interpolator kind, the constructed object will be invalid (_interp member == NULL) and can not be used.
This should be checked by a call to GmInterpolator::isValid().
- Parameters
-
kind | The interpolator kind. Used to check if the interpolator type is compatible with the interpolator kind |
type | The required interpolator type |
typeParam | Extra parameter used by the interpolator |
coordAccessor | Accessor for retrieving node coordinates. Needed also to calculate |
Gauss points coordinates.
- Parameters
-
mesh | The mesh associated with the coordinate accessor. Required only if the underlying interpolator requires mesh information. |
skipTests | If set to true, the constructor will NOT check if the obtained interpolator is really valid, supporting the requested kind, etc. Should be used only if the derived class intends to do this checks by itself. |
◆ gaussToNodesInterpolate()
Generic interpolation routine for calculating multiple values, especifically node values from a point cloud internal to an element.
- Parameters
-
pointSet | The object providing coordinates for the set of points containing the known values upon which the interpolation will be based |
inData | The object storing values for each point in pointSet. Can store single or multiple values for each point. |
outData | The object storing the data structure where calculated results will be stored. |
◆ interpolate()
Generic interpolation routine, receiving the needed data through several binding objects.
- Parameters
-
pointSet | The object providing coordinates for the set of points containing the known values upon which the interpolation will be based |
inData | The object storing values for each point in pointSet. Can store single or multiple values for each point. |
outData | The object storing the data structure where calculated results will be stored. |
coord | An object providing the coordinate of the interpolated point, either in cartesian or natural coordinates, according to the interpolator requirements. |
◆ interpolatorObjectFromType()
Factory function for returning the interpolator object associated with the requested interpolator type.
IMPORTANT: This function returns the SAME object for all calls with the same type. This makes it a fast function and no allocation is needed.
◆ strToInterpolatorType()
int GmInterpolator::strToInterpolatorType |
( |
QString |
str, |
|
|
bool |
acceptsNo = false |
|
) |
| |
|
static |
Converts a string to a GmInterpolatorType. Returns -1 if no match is found. Returns GM_DEFAULT_INTERPOLATOR for empty strings.
The acceptsNo parameter controls if this function accepts the "no" string. If true, returns GM_NO_INTERPOLATOR for str == "no". If false, returns -1.
The documentation for this class was generated from the following files: