36 const Field<Type>& yOld
39 Field<Type> yNew(xNew.size());
61 if (n == 1 || x < xOld[0])
73 return (x - xOld[0])/(xOld[1] - xOld[0])*(yOld[1] - yOld[0]) + yOld[0];
78 while (hi < n && xOld[hi] < x)
85 const Type&
y1 = yOld[lo];
86 const Type& y2 = yOld[hi];
109 scalar
mu = (x - xOld[lo])/(xOld[hi] - xOld[lo]);
119 + mu*((2*y0 - 5*y1 + 4*y2 - y3) + mu*(-y0 + 3*y1 - 3*y2 + y3))
#define forAll(list, i)
Loop across all elements in list.
void size(const label)
Override size to be inconsistent with allocated storage.
Interpolates y values from one curve to another with a different x distribution.
dimensionedScalar y0(const dimensionedScalar &ds)
Field< Type > interpolateSplineXY(const scalarField &xNew, const scalarField &xOld, const Field< Type > &yOld)
Pre-declare SubField and related Field type.
dimensionedScalar y1(const dimensionedScalar &ds)
volScalarField scalarField(fieldObject, mesh)
const dimensionedScalar mu
Atomic mass unit.
Specialisations of Field<T> for scalar, vector and tensor.