GemaCoreLib
The GeMA Core library
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
GmShapeInterpolatorObject Class Reference

Implements the Shape function and linear shape function interpolation methods. More...

#include <gmShapeInterpolatorObject.h>

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

Public Member Functions

virtual GmInterpolatorType type () const
 Returns the interpolator object type.
 
virtual bool supportsInterpolatorKind (GmInterpolatorKind kind) const
 Returns whether this interpolator object supports the given interpolator kind or not.
 
virtual bool requiresElement () const
 Does this interpolator object requires that the coordinate set provided to interpolationWeights() contains points from a single element, whose identity can be queried by a call to GmCoordinateSet::cell()? Default = false.
 
virtual bool requiresNaturalCoordinates () const
 Does this interpolator object requires that the coordinate passed as parameter to interpolationWeights() be expressed in natural coordinates? By default this is false and the provided coordinate should be cartesian coordinates.
 
virtual bool interpolationWeights (GmInterpolatorCoordinateSetBinding *pointSet, const GmVector &coord, const QVariant &typeParam, GmVector &weights) const
 Implements the GmInterpolatorObject::interpolationWeights() virtual function to calculate interpolation weights by using the elements shape functions. More...
 
virtual const GmMatrixgaussToNodesExtrapolationMatrix (GmInterpolatorGaussCoordinateSetBinding *pointSet, const QVariant &typeParam, GmMatrix &weights) const
 Basic function for returning the extrapolation matrix used by the GM_GAUSS_TO_NODE_INTERPOLATOR interpolator kind. More...
 
- Public Member Functions inherited from GmInterpolatorObject
virtual bool typeParamIsValid (const QVariant &v) const
 Is the given interpolator type parameter valid? The default implementation accepts only empty variants.
 
virtual QString typeParamToStr (const QVariant &v) const
 Converts an interpolator type parameter to a string.
 
virtual bool requiresMesh () const
 Does this interpolator object requires that the coordinate set provided to interpolationWeights() contains information about the underlying mesh, whose identity can be queried by a call to GmCoordinateSet::mesh()? Default = false.
 
virtual bool distanceBasedWeights (GmInterpolatorCoordinateSetBinding *pointSet, const GmVector &coord, const GmVector &squaredDistances, const QVariant &typeParam, GmVector &weights) const
 Worker function for the default implementation of interpolationWeights(). This is the function that needs to be reimplemented if the distance based approach used by interpolationWeights() is valid for this object. Otherwise, please reimplement interpolationWeights() itself. More...
 

Protected Member Functions

 GmShapeInterpolatorObject (bool linear)
 Constructor.
 
- Protected Member Functions inherited from GmInterpolatorObject
 GmInterpolatorObject ()
 Protected default constructor to make sure that Interpolator objects are created only by the GmInterpolator friend class.
 

Protected Attributes

const bool _linear
 Should we use a linear shape function instead of the original one?
 

Friends

class GmInterpolator
 

Detailed Description

Implements the Shape function and linear shape function interpolation methods.

IMPORTANT: When using this interpolator, the coordinate for the interpolation point must be given in the element's natural coordinate system.

Member Function Documentation

◆ gaussToNodesExtrapolationMatrix()

const GmMatrix & GmShapeInterpolatorObject::gaussToNodesExtrapolationMatrix ( GmInterpolatorGaussCoordinateSetBinding pointSet,
const QVariant typeParam,
GmMatrix weights 
) const
virtual

Basic function for returning the extrapolation matrix used by the GM_GAUSS_TO_NODE_INTERPOLATOR interpolator kind.

Given the set of coordinates for the known element points (usually integration points), this function should return an extrapolation weight matrix that, when multiplied by the point values, will return the interpolated values for the element nodes. If the point set has 'm' entries, the returned matrix will be an 'n x m' matrix where 'n' is the number of element nodes.

Depending on the interpolator type, the resulting matrix can be a constant matrix per integration rule/element type. In that case, the matrix does not need to be calculated and a reference to a fixed constant matrix can be returned. In those cases, instead of filling the given weight matrix with the values, the function can return a reference to that constant matrix and leave the provided matrix unchanged. On all other cases, the function should fill the weights parameter and return a reference to that parameter matrix.

Reimplemented from GmInterpolatorObject.

◆ interpolationWeights()

bool GmShapeInterpolatorObject::interpolationWeights ( GmInterpolatorCoordinateSetBinding pointSet,
const GmVector coord,
const QVariant typeParam,
GmVector weights 
) const
virtual

Implements the GmInterpolatorObject::interpolationWeights() virtual function to calculate interpolation weights by using the elements shape functions.

The given pointSet is used only for recovering the supporting element. The coordinates in 'coord' should be natural coordinates. See the documentation for GmInterpolatorObject::interpolationWeights() for aditional information on the function parameters.

Reimplemented from GmInterpolatorObject.


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