GeMA
The GeMA main application
Interpolation methods

Each interpolation method in GeMA is responsible for calculating a weight vector storing the contribution of each known value to the interpolated value. In that way, the desired interpolated value can be calculated by:

\[ v = \frac {\sum{w_i v_i}} {\sum{w_i}} \]

where:

  • \(v\) is the interpolated result
  • \(v_i\) is the value at known point \(i\)
  • \(w_i\) is the interpolation weight for the known point \(i\)

Interpolation methods differ among each other by the strategy applied to calculate their weight vector \(w_i\), often taking into consideration the position of the known points, the location of the interpolation point and which known points should be considered.

When interpolating multi-dimensional data, the interpolation algorithm is applied individually to every dimension, so, a single set of weights can be used to interpolate several data sets.

Some of the available algorithms are also capable of providing an extrapolation matrix for transfering data calculated on a set of element interior points (in general its integration points) to the element nodes. This matrix is a weight matrix with size (n x m), where 'n' is the number of element nodes and 'm' the number of known points, that when multiplied by the known point values produces the element nodes interpolated values.

Index:

shape - Shape function interpolation

In this interpolation method, the element's shape functions are used to interpolate values. Can only be applied when working with element meshes.

Also supports extrapolation matrices, even when the number of known internal points (generally integration points, but not limited to them) is different from the number of element nodes. When the number of nodes is less than the number of known points, a least squares fit is used to minimize the reconstruction error. If the number of nodes is greater than the number of known points, a least squares fit with a regularization term is used. The implementation follows the model proposed in the paper "A local extrapolation method for finite elements", R. Durand, M.M. Farias, Advances in Engineering Software 67, 2014. For some anisotropic integration rules and element type combinations, the extrapolation matrix can not be built. On those cases, the creation of the extrapolation object will fail.

Weights: Per definition, the weight vector is equal to the element's shape function evaluated at the interpolation point natural coordinate.

Parameters: None.

Interpolation point coordinates: Natural coordinates.

Supports extrapolation: Yes.


lshape - Linear shape function interpolation

An interpolation method similar to the shape method that when working with quadratic elements (like quad8, tri6, hex20, etc) uses a linear set of shape functions from the equivalent linear element for the interpolation, instead of the quadratic element functions. Equal to shape for linear elements.

This interpolation method is important when executing super-parametric analysis, where the geometry is given by the full set of quadratic element nodes, but the analysis results are calculated only at the element "linear" nodes.


nn - Nearest Neighbor interpolation

In this interpolation method, the K closest points to the interpolation point are found and the average of their values is taken as the result. The value of K is given by an interpolator parameter. If missing, a value of 1 will be used reducing it to a nearest neighbor interpolation.

Weights: \(1/K\) for the K nearest points to the interpolation point and 0 to the others.

Parameters: The number of considered neighbors K. If not given, a value of 1 is assumed. Must be an integer value greater than 0.

Interpolation point coordinates: Cartesian coordinates.

Supports extrapolation: No.


idw - Inverse distance weighted interpolation

In this interpolation method, each known point weight is inversely proportional to the distance between the known point and the desired interpolated point. In that way, closer points will have greater influence on the interpolated result than far away points.

Weights:

\[ w_i = \frac{1}{||x_i - x||^p} \]

where:

  • \(||x_i - x||\) is the Euclidian distance between known point \(i\) and the interpolated point \(x\).
  • \(p\) is a power parameter given by the user. Default = 2.

Parameters: The power parameter \(p\). If not given, a value of 2.0 is assumed. Can be any real value.

Interpolation point coordinates: Cartesian coordinates.

Supports extrapolation: No.


mls - Moving least squares interpolation

In this interpolation method, the local function around the interpolation point is reconstructed with a radial basis function and the reconstruction error minimized by a weighted least squares fit.

IMPORTANT: MLS should run with at list 3 non-colinear source points (in 2D) or 4 non-coplanar source points (in 3D)! If not, result is not guaranteed.

Weights:

\[ w^T = x^T [X^T \phi X]^{-1} X^T \phi \]

where, considering 'n' equal to the number of known points and 'd' the coordinate dimension:

  • \(w\) is the (n x 1) desired weight column vector.
  • \(x\) is the (d+1 x 1) interpolation point coordinate vector with an added 1 to the beginning.
    ex: \([1, x, y, z]^T\)
  • \(X\) is the (n x d+1) matrix with known point coordinates with an added 1 column at the beginning.
    ex: \([ [1, x_1, y_1, z_1], [1, x_2, y_2, z_2], \dots, [1, x_n, y_n, z_n] ]\)
  • \(\phi\) is the (n x n) diagonal matrix with the radial basis function evaluated at the distance between the known point and the interpolation point.
    ex: \([ [rbf(r_1), 0, 0, \dots], [0, rbf(r_2), 0, \dots], \dots]\)
  • \(rbf(r_i)\) is the adopted radial basis function, \((1-r_i)^4(4r_i+1)\), with \(r_i\) equal to the Euclidian distance between the interpolation point and known point \(i\), normalized in the range between 0.0 and 0.5 (maximum \(r_i\) is transformed into 0.5).

Parameters: None.

Interpolation point coordinates: Cartesian coordinates.

Supports extrapolation: No.