50 return nearest_ != -1;
80 return scalar(1) - weight1_ - weight2_;
109 if (weight < scalar(0))
113 else if (weight > scalar(1))
132 if (weight < scalar(0))
136 else if (weight > scalar(1))
164 weight1_ = weights[1];
165 weight2_ = weights[2];
176 else if (next1_ == -1 || next1_ == nearest_)
178 return input[nearest_];
183 input[nearest_] * (1-weight1_-weight2_)
184 +
input[next1_] * (weight1_)
185 +
input[next2_] * (weight2_)
scalar weight2() const
The weighting for the second neighbour point, this also corresponds to the logical location (interval...
scalar weight1() const
The weighting for the first neighbour point, this also corresponds to the logical location (interval ...
Barycentric2D< scalar > barycentric2D
A scalar version of the templated Barycentric2D.
label next2() const
The second neighbour control point, or -1 if !good()
bool good() const
True if there is an associated nearest point.
T interpolate(const UList< T > &input) const
Linear interpolated value between nearest and next locations.
lumpedPointInterpolator()
Default construct, with zero weighting and invalid ids.
label nearest() const
The nearest control point, or -1 if !good()
label next1() const
The first neighbour control point, or -1 if !good()
A simple linear interpolator between two locations, which are referenced by index.
static Istream & input(Istream &is, IntRange< T > &range)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
scalar weight0() const
The weighting for the nearest point.
void set(const triFace &ids, const barycentric2D &weights)
Assign all control points and their weights.
label next() const
The first neighbour control point - identical to next1()
static constexpr const zero Zero
Global zero (0)