36 const scalarField& xNew,
37 const scalarField& xOld,
38 const Field<Type>& yOld
41 Field<Type> yNew(xNew.size());
60 label
n = xOld.
size();
63 if (
n == 1 ||
x < xOld[0])
75 return (
x - xOld[0])/(xOld[1] - xOld[0])*(yOld[1] - yOld[0]) + yOld[0];
80 while (hi <
n && xOld[hi] <
x)
87 const Type&
y1 = yOld[lo];
88 const Type& y2 = yOld[hi];
111 scalar
mu = (
x - xOld[lo])/(xOld[hi] - xOld[lo]);
121 +
mu*((2*
y0 - 5*
y1 + 4*y2 - y3) +
mu*(-
y0 + 3*
y1 - 3*y2 + y3))
Generic templated field type.
void size(const label n)
Older name for setAddressableSize.
const volScalarField & mu
Interpolates y values from one curve to another with a different x distribution.
dimensionedScalar y0(const dimensionedScalar &ds)
dimensionedScalar y1(const dimensionedScalar &ds)
Field< Type > interpolateSplineXY(const scalarField &xNew, const scalarField &xOld, const Field< Type > &yOld)
Specialisations of Field<T> for scalar, vector and tensor.
#define forAll(list, i)
Loop across all elements in list.