122 indices[1] = index_ + 1;
153 const label n =
max(i2 - i1 + (i1 == iClip1) + (i2 == iClip2), 1);
156 bool changed =
false;
157 if (indices.
size() !=
n)
165 if (indices[indexi] == indexi +
max(i1, 0))
195 const scalar d =
samples_[i1 + 1] - t1;
197 weights[0] +=
sign*(1 -
f)*d/2;
199 weights[1] +=
sign*(1 +
f)*d/2;
203 if (i1 != i2)
for (
label i = i1 + 1; i <= iClip2; i ++)
206 indices[i - iClip1] = i;
207 weights[i - iClip1] +=
sign*d/2;
208 indices[i - iClip1 + 1] = i + 1;
209 weights[i - iClip1 + 1] +=
sign*d/2;
216 const scalar d =
samples_[i2 + 1] - t2;
218 weights[
n - 2] -=
sign*(1 -
f)*d/2;
219 indices[
n - 1] = i2 + 1;
220 weights[
n - 1] -=
sign*(1 +
f)*d/2;
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
void resize(const label)
Alias for setSize(const label)
void size(const label)
Override size to be inconsistent with allocated storage.
T & first()
Return the first element of the list.
T & last()
Return the last element of the list.
Abstract base class for interpolating in 1D.
const scalarField & samples_
Cached samples.
virtual bool integrationWeights(scalar t1, scalar t2, labelList &indices, scalarField &weights) const
Calculate weights and indices to calculate integrand of t1..t2.
linearInterpolationWeights(const scalarField &samples)
Construct from components.
virtual bool valueWeights(const scalar t, labelList &indices, scalarField &weights) const
Calculate weights and indices to calculate t from samples.
A class for handling words, derived from string.
dimensionedScalar sign(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
label findLower(const ListType &, typename ListType::const_reference, const label stary, const BinaryOp &bop)
Find last element < given value in sorted list and return index,.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
defineTypeNameAndDebug(combustionModel, 0)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
scalarField samples(nIntervals, 0)