A simple linear interpolator between two locations, which are referenced by index. More...
#include <lumpedPointInterpolator.H>
Public Member Functions | |
| lumpedPointInterpolator () | |
| Default construct, with zero weighting and invalid ids. | |
| lumpedPointInterpolator (const label id) | |
| Construct with nearest id. | |
| ~lumpedPointInterpolator ()=default | |
| Destructor. | |
| bool | good () const |
| True if there is an associated nearest point. | |
| bool | valid () const |
| Same as good(). | |
| label | nearest () const |
| The nearest control point, or -1 if !good(). | |
| label | next () const |
| The first neighbour control point - identical to next1(). | |
| label | next1 () const |
| The first neighbour control point, or -1 if !good(). | |
| label | next2 () const |
| The second neighbour control point, or -1 if !good(). | |
| scalar | weight0 () const |
| The weighting for the nearest point. | |
| scalar | weight1 () const |
| The weighting for the first neighbour point, this also corresponds to the logical location (interval 0-1). | |
| scalar | weight2 () const |
| The weighting for the second neighbour point, this also corresponds to the logical location (interval 0-1). | |
| void | nearest (const label id) |
| Assign the nearest point, clearing any neighbour. | |
| void | next (const label id, const scalar weight) |
| Assign single neighbour control point and its weight. | |
| void | next (const label id, const scalar weight, const label position) |
| Assign the neighbour control point and its weight. | |
| void | set (const triFace &ids, const barycentric2D &weights) |
| Assign all control points and their weights. | |
| template<class T> | |
| T | interpolate (const UList< T > &input) const |
| Linear interpolated value between nearest and next locations. | |
A simple linear interpolator between two locations, which are referenced by index.
When the interpolator is built for based on searching for nearest and next-nearest points, the interpolation will typically cover a (0-0.5) range rather than a (0-1) range. The (0.5-1) range implies a flip in the relationship of nearest vs. next-nearest.
Definition at line 55 of file lumpedPointInterpolator.H.
|
inline |
Default construct, with zero weighting and invalid ids.
Definition at line 23 of file lumpedPointInterpolatorI.H.
References lumpedPointInterpolator().
Referenced by lumpedPointInterpolator().


|
inlineexplicit |
Construct with nearest id.
Definition at line 29 of file lumpedPointInterpolatorI.H.
References Foam::Zero.
|
default |
Destructor.
|
inline |
True if there is an associated nearest point.
Definition at line 41 of file lumpedPointInterpolatorI.H.
Referenced by valid().

|
inline |
Same as good().
Definition at line 108 of file lumpedPointInterpolator.H.
References good().

|
inline |
The nearest control point, or -1 if !good().
Definition at line 47 of file lumpedPointInterpolatorI.H.
|
inline |
The first neighbour control point - identical to next1().
Definition at line 53 of file lumpedPointInterpolatorI.H.
Referenced by nearest().

|
inline |
The first neighbour control point, or -1 if !good().
Definition at line 59 of file lumpedPointInterpolatorI.H.
|
inline |
The second neighbour control point, or -1 if !good().
Definition at line 65 of file lumpedPointInterpolatorI.H.
|
inline |
The weighting for the nearest point.
Definition at line 71 of file lumpedPointInterpolatorI.H.
|
inline |
The weighting for the first neighbour point, this also corresponds to the logical location (interval 0-1).
Definition at line 77 of file lumpedPointInterpolatorI.H.
|
inline |
The weighting for the second neighbour point, this also corresponds to the logical location (interval 0-1).
Definition at line 83 of file lumpedPointInterpolatorI.H.
|
inline |
Assign the nearest point, clearing any neighbour.
Definition at line 89 of file lumpedPointInterpolatorI.H.
References next(), and Foam::Zero.

|
inline |
Assign single neighbour control point and its weight.
Definition at line 96 of file lumpedPointInterpolatorI.H.
References Foam::Zero.
|
inline |
Assign the neighbour control point and its weight.
| position | Use 0 or 1 for first/second |
Definition at line 118 of file lumpedPointInterpolatorI.H.
|
inline |
Assign all control points and their weights.
The triFace points [0,1,2] correspond to [nearest,next1,next2], respectively
Definition at line 147 of file lumpedPointInterpolatorI.H.
Linear interpolated value between nearest and next locations.
Definition at line 163 of file lumpedPointInterpolatorI.H.
References Foam::T(), and Foam::Zero.
