37 const scalarField& xNew,
38 const scalarField& xOld,
39 const Field<Type>& yOld
42 Field<Type> yNew(xNew.size());
57 const scalarField& xOld,
58 const Field<Type>& yOld
61 label
n = xOld.size();
64 if (
n == 1 ||
x <= xOld[0])
76 return (
x - xOld[0])/(xOld[1] - xOld[0])*(yOld[1] - yOld[0]) + yOld[0];
81 while (hi <
n && xOld[hi] <
x)
88 const Type&
y1 = yOld[lo];
89 const Type& y2 = yOld[hi];
112 scalar
mu = (
x - xOld[lo])/(xOld[hi] - xOld[lo]);
122 +
mu*((2*
y0 - 5*
y1 + 4*y2 - y3) +
mu*(-
y0 + 3*
y1 - 3*y2 + y3))
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
void size(const label n)
Older name for setAddressableSize.
Interpolates y values from one curve to another with a different x distribution.
dimensionedScalar y0(const dimensionedScalar &ds)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
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.