Class implementing cubic splines. More...

#include <Spline.hpp>

Classes

struct  ComparatorX_
 Helper class needed to sort the input sampling points. More...
 

Public Types

enum  SplineType { Full , Natural , Periodic , Monotonic }
 The type of the spline to be created. More...
 

Public Member Functions

 Spline ()
 Default constructor for a spline. More...
 
 Spline (Scalar x0, Scalar x1, Scalar y0, Scalar y1, Scalar m0, Scalar m1)
 Convenience constructor for a full spline with just two sampling points. More...
 
template<class ScalarArrayX , class ScalarArrayY >
 Spline (size_t nSamples, const ScalarArrayX &x, const ScalarArrayY &y, SplineType splineType=Natural, bool sortInputs=true)
 Convenience constructor for a natural or a periodic spline. More...
 
template<class PointArray >
 Spline (size_t nSamples, const PointArray &points, SplineType splineType=Natural, bool sortInputs=true)
 Convenience constructor for a natural or a periodic spline. More...
 
template<class ScalarContainer >
 Spline (const ScalarContainer &x, const ScalarContainer &y, SplineType splineType=Natural, bool sortInputs=true)
 Convenience constructor for a natural or a periodic spline. More...
 
template<class PointContainer >
 Spline (const PointContainer &points, SplineType splineType=Natural, bool sortInputs=true)
 Convenience constructor for a natural or a periodic spline. More...
 
template<class ScalarArray >
 Spline (size_t nSamples, const ScalarArray &x, const ScalarArray &y, Scalar m0, Scalar m1, bool sortInputs=true)
 Convenience constructor for a full spline. More...
 
template<class PointArray >
 Spline (size_t nSamples, const PointArray &points, Scalar m0, Scalar m1, bool sortInputs=true)
 Convenience constructor for a full spline. More...
 
template<class ScalarContainerX , class ScalarContainerY >
 Spline (const ScalarContainerX &x, const ScalarContainerY &y, Scalar m0, Scalar m1, bool sortInputs=true)
 Convenience constructor for a full spline. More...
 
template<class PointContainer >
 Spline (const PointContainer &points, Scalar m0, Scalar m1, bool sortInputs=true)
 Convenience constructor for a full spline. More...
 
void set (Scalar x0, Scalar x1, Scalar y0, Scalar y1, Scalar m0, Scalar m1)
 Set the sampling points and the boundary slopes of the spline with two sampling points. More...
 
template<class ScalarArrayX , class ScalarArrayY >
void setXYArrays (size_t nSamples, const ScalarArrayX &x, const ScalarArrayY &y, Scalar m0, Scalar m1, bool sortInputs=true)
 Set the sampling points and the boundary slopes of a full spline using C-style arrays. More...
 
template<class ScalarContainerX , class ScalarContainerY >
void setXYContainers (const ScalarContainerX &x, const ScalarContainerY &y, Scalar m0, Scalar m1, bool sortInputs=true)
 Set the sampling points and the boundary slopes of a full spline using STL-compatible containers. More...
 
template<class PointArray >
void setArrayOfPoints (size_t nSamples, const PointArray &points, Scalar m0, Scalar m1, bool sortInputs=true)
 Set the sampling points and the boundary slopes of a full spline using a C-style array. More...
 
template<class XYContainer >
void setContainerOfPoints (const XYContainer &points, Scalar m0, Scalar m1, bool sortInputs=true)
 Set the sampling points and the boundary slopes of a full spline using a STL-compatible container of array-like objects. More...
 
template<class XYContainer >
void setContainerOfTuples (const XYContainer &points, Scalar m0, Scalar m1, bool sortInputs=true)
 Set the sampling points and the boundary slopes of a full spline using a STL-compatible container of tuple-like objects. More...
 
template<class ScalarArrayX , class ScalarArrayY >
void setXYArrays (size_t nSamples, const ScalarArrayX &x, const ScalarArrayY &y, SplineType splineType=Natural, bool sortInputs=true)
 Set the sampling points natural spline using C-style arrays. More...
 
template<class ScalarContainerX , class ScalarContainerY >
void setXYContainers (const ScalarContainerX &x, const ScalarContainerY &y, SplineType splineType=Natural, bool sortInputs=true)
 Set the sampling points of a natural spline using STL-compatible containers. More...
 
template<class PointArray >
void setArrayOfPoints (size_t nSamples, const PointArray &points, SplineType splineType=Natural, bool sortInputs=true)
 Set the sampling points of a natural spline using a C-style array. More...
 
template<class XYContainer >
void setContainerOfPoints (const XYContainer &points, SplineType splineType=Natural, bool sortInputs=true)
 Set the sampling points of a natural spline using a STL-compatible container of array-like objects. More...
 
template<class XYContainer >
void setContainerOfTuples (const XYContainer &points, SplineType splineType=Natural, bool sortInputs=true)
 Set the sampling points of a natural spline using a STL-compatible container of tuple-like objects. More...
 
template<class Evaluation >
bool applies (const Evaluation &x) const
 Return true iff the given x is in range [x1, xn]. More...
 
size_t numSamples () const
 Return the number of (x, y) values. More...
 
Scalar xAt (size_t sampleIdx) const
 Return the x value of a given sampling point. More...
 
Scalar valueAt (size_t sampleIdx) const
 Return the x value of a given sampling point. More...
 
void printCSV (Scalar xi0, Scalar xi1, size_t k, std::ostream &os=std::cout) const
 Prints k tuples of the format (x, y, dx/dy, isMonotonic) to stdout. More...
 
template<class Evaluation >
Evaluation eval (const Evaluation &x, bool extrapolate=false) const
 Evaluate the spline at a given position. More...
 
template<class Evaluation >
Evaluation evalDerivative (const Evaluation &x, bool extrapolate=false) const
 Evaluate the spline's derivative at a given position. More...
 
template<class Evaluation >
Evaluation evalSecondDerivative (const Evaluation &x, bool extrapolate=false) const
 Evaluate the spline's second derivative at a given position. More...
 
template<class Evaluation >
Evaluation evalThirdDerivative (const Evaluation &x, bool extrapolate=false) const
 Evaluate the spline's third derivative at a given position. More...
 
template<class Evaluation >
Evaluation intersect (const Evaluation &a, const Evaluation &b, const Evaluation &c, const Evaluation &d) const
 Find the intersections of the spline with a cubic polynomial in the whole interval, throws Opm::MathError exception if there is more or less than one solution. More...
 
template<class Evaluation >
Evaluation intersectInterval (Scalar x0, Scalar x1, const Evaluation &a, const Evaluation &b, const Evaluation &c, const Evaluation &d) const
 Find the intersections of the spline with a cubic polynomial in a sub-interval of the spline, throws Opm::MathError exception if there is more or less than one solution. More...
 
int monotonic (Scalar x0, Scalar x1, bool extrapolate=false) const
 Returns 1 if the spline is monotonically increasing, -1 if the spline is mononously decreasing and 0 if the spline is not monotonous in the interval (x0, x1). More...
 
int monotonic () const
 Same as monotonic(x0, x1), but with the entire range of the spline as interval. More...
 

Protected Member Functions

void sortInput_ ()
 Sort the sample points in ascending order of their x value. More...
 
void reverseSamplingPoints_ ()
 Reverse order of the elements in the arrays which contain the sampling points. More...
 
void setNumSamples_ (size_t nSamples)
 Resizes the internal vectors to store the sample points. More...
 
void makeFullSpline_ (Scalar m0, Scalar m1)
 Create a natural spline from the already set sampling points. More...
 
void makeNaturalSpline_ ()
 Create a natural spline from the already set sampling points. More...
 
void makePeriodicSpline_ ()
 Create a periodic spline from the already set sampling points. More...
 
template<class DestVector , class SourceVector >
void assignSamplingPoints_ (DestVector &destX, DestVector &destY, const SourceVector &srcX, const SourceVector &srcY, unsigned nSamples)
 Set the sampling point vectors. More...
 
template<class DestVector , class ListIterator >
void assignFromArrayList_ (DestVector &destX, DestVector &destY, const ListIterator &srcBegin, const ListIterator &srcEnd, unsigned nSamples)
 
template<class DestVector , class ListIterator >
void assignFromTupleList_ (DestVector &destX, DestVector &destY, ListIterator srcBegin, ListIterator srcEnd, unsigned nSamples)
 Set the sampling points. More...
 
template<class Vector , class Matrix >
void makeFullSystem_ (Matrix &M, Vector &d, Scalar m0, Scalar m1)
 Make the linear system of equations Mx = d which results in the moments of the full spline. More...
 
template<class Vector , class Matrix >
void makeNaturalSystem_ (Matrix &M, Vector &d)
 Make the linear system of equations Mx = d which results in the moments of the natural spline. More...
 
template<class Matrix , class Vector >
void makePeriodicSystem_ (Matrix &M, Vector &d)
 Make the linear system of equations Mx = d which results in the moments of the periodic spline. More...
 
template<class Vector >
void makeMonotonicSpline_ (Vector &slopes)
 Create a monotonic spline from the already set sampling points. More...
 
template<class MomentsVector , class SlopeVector >
void setSlopesFromMoments_ (SlopeVector &slopes, const MomentsVector &moments)
 Convert the moments at the sample points to slopes. More...
 
template<class Evaluation >
Evaluation eval_ (const Evaluation &x, size_t i) const
 
template<class Evaluation >
Evaluation evalDerivative_ (const Evaluation &x, size_t i) const
 
template<class Evaluation >
Evaluation evalDerivative2_ (const Evaluation &x, size_t i) const
 
template<class Evaluation >
Evaluation evalDerivative3_ (const Evaluation &x, size_t i) const
 
template<class Evaluation >
Evaluation h00_ (const Evaluation &t) const
 
template<class Evaluation >
Evaluation h10_ (const Evaluation &t) const
 
template<class Evaluation >
Evaluation h01_ (const Evaluation &t) const
 
template<class Evaluation >
Evaluation h11_ (const Evaluation &t) const
 
template<class Evaluation >
Evaluation h00_prime_ (const Evaluation &t) const
 
template<class Evaluation >
Evaluation h10_prime_ (const Evaluation &t) const
 
template<class Evaluation >
Evaluation h01_prime_ (const Evaluation &t) const
 
template<class Evaluation >
Evaluation h11_prime_ (const Evaluation &t) const
 
template<class Evaluation >
Evaluation h00_prime2_ (const Evaluation &t) const
 
template<class Evaluation >
Evaluation h10_prime2_ (const Evaluation &t) const
 
template<class Evaluation >
Evaluation h01_prime2_ (const Evaluation &t) const
 
template<class Evaluation >
Evaluation h11_prime2_ (const Evaluation &t) const
 
template<class Evaluation >
Scalar h00_prime3_ (const Evaluation &) const
 
template<class Evaluation >
Scalar h10_prime3_ (const Evaluation &) const
 
template<class Evaluation >
Scalar h01_prime3_ (const Evaluation &) const
 
template<class Evaluation >
Scalar h11_prime3_ (const Evaluation &) const
 
int monotonic_ (size_t i, Scalar x0, Scalar x1, int &r) const
 
template<class Evaluation >
size_t intersectSegment_ (Evaluation *sol, size_t segIdx, const Evaluation &a, const Evaluation &b, const Evaluation &c, const Evaluation &d, Scalar x0=-1e30, Scalar x1=1e30) const
 Find all the intersections of a segment of the spline with a cubic polynomial within a specified interval. More...
 
size_t segmentIdx_ (Scalar x) const
 
Scalar h_ (size_t i) const
 Returns x[i] - x[i - 1]. More...
 
Scalar x_ (size_t i) const
 Returns the y coordinate of the i-th sampling point. More...
 
Scalar y_ (size_t i) const
 Returns the y coordinate of the i-th sampling point. More...
 
Scalar slope_ (size_t i) const
 Returns the slope (i.e. first derivative) of the spline at the i-th sampling point. More...
 
Scalar a_ (size_t i) const
 
Scalar b_ (size_t i) const
 
Scalar c_ (size_t i) const
 
Scalar d_ (size_t i) const
 

Protected Attributes

Vector xPos_
 
Vector yPos_
 
Vector slopeVec_
 

Detailed Description

template<class Scalar>
class Opm::Spline< Scalar >

Class implementing cubic splines.

This class supports full, natural, periodic and monotonic cubic splines.

Full a splines $s(x)$ are splines which, given $n$ sampling points $x_1, \dots, x_n$, fulfill the following conditions

\begin{align*}
   s(x_i)   & = y_i \quad \forall i \in \{1, \dots, n \} \\
   s'(x_1)  & = m_1 \\
   s'(x_n)  & = m_n
  \end{align*}

for any given boundary slopes $m_1$ and $m_n$.

Natural splines which are defined by

\begin{align*}
     s(x_i)     & = y_i \quad \forall i \in \{1, \dots, n \} \\
     s''(x_1)   & = 0 \\
     s''(x_n)   & = 0
*\end{align*}

For periodic splines of splines the slopes at the boundaries are identical:

\begin{align*}
     s(x_i)     & = y_i \quad \forall i \in \{1, \dots, n \} \\
     s'(x_1)    & = s'(x_n) \\
     s''(x_1)   & = s''(x_n) \;.
*\end{align*}

Finally, there are monotonic splines which guarantee that the curve is confined by its sampling points, i.e.,

\[
y_i \leq s(x) \leq y_{i+1} \quad \text{for} x_i \leq x \leq x_{i+1} \;.
  \]

For more information on monotonic splines, see http://en.wikipedia.org/wiki/Monotone_cubic_interpolation

Full, natural and periodic splines are continuous in their first and second derivatives, i.e.,

\[
s \in \mathcal{C}^2
  \]

holds for such splines. Monotonic splines are only continuous up to their first derivative, i.e., for these only

\[
s \in \mathcal{C}^1
  \]

is true.

Member Enumeration Documentation

◆ SplineType

template<class Scalar >
enum Opm::Spline::SplineType

The type of the spline to be created.

To specfiy the acutal curve, use one of the set() methods.

Enumerator
Full 
Natural 
Periodic 
Monotonic 

Constructor & Destructor Documentation

◆ Spline() [1/10]

template<class Scalar >
Opm::Spline< Scalar >::Spline ( )
inline

Default constructor for a spline.

To specfiy the acutal curve, use one of the set() methods.

◆ Spline() [2/10]

template<class Scalar >
Opm::Spline< Scalar >::Spline ( Scalar  x0,
Scalar  x1,
Scalar  y0,
Scalar  y1,
Scalar  m0,
Scalar  m1 
)
inline

Convenience constructor for a full spline with just two sampling points.

Parameters
x0The $x$ value of the first sampling point
x1The $x$ value of the second sampling point
y0The $y$ value of the first sampling point
y1The $y$ value of the second sampling point
m0The slope of the spline at $x_0$
m1The slope of the spline at $x_1$

References Opm::Spline< Scalar >::set().

◆ Spline() [3/10]

template<class Scalar >
template<class ScalarArrayX , class ScalarArrayY >
Opm::Spline< Scalar >::Spline ( size_t  nSamples,
const ScalarArrayX &  x,
const ScalarArrayY &  y,
SplineType  splineType = Natural,
bool  sortInputs = true 
)
inline

Convenience constructor for a natural or a periodic spline.

Parameters
nSamplesThe number of sampling points (must be > 2)
xAn array containing the $x$ values of the spline's sampling points
yAn array containing the $y$ values of the spline's sampling points
periodicIndicates whether a natural or a periodic spline should be created

References Opm::Spline< Scalar >::setXYArrays().

◆ Spline() [4/10]

template<class Scalar >
template<class PointArray >
Opm::Spline< Scalar >::Spline ( size_t  nSamples,
const PointArray &  points,
SplineType  splineType = Natural,
bool  sortInputs = true 
)
inline

Convenience constructor for a natural or a periodic spline.

Parameters
nSamplesThe number of sampling points (must be > 2)
pointsAn array of $(x,y)$ tuples of the spline's sampling points
periodicIndicates whether a natural or a periodic spline should be created

References Opm::Spline< Scalar >::setArrayOfPoints().

◆ Spline() [5/10]

template<class Scalar >
template<class ScalarContainer >
Opm::Spline< Scalar >::Spline ( const ScalarContainer &  x,
const ScalarContainer &  y,
SplineType  splineType = Natural,
bool  sortInputs = true 
)
inline

Convenience constructor for a natural or a periodic spline.

Parameters
xAn array containing the $x$ values of the spline's sampling points (must have a size() method)
yAn array containing the $y$ values of the spline's sampling points (must have a size() method)
periodicIndicates whether a natural or a periodic spline should be created

References Opm::Spline< Scalar >::setXYContainers().

◆ Spline() [6/10]

template<class Scalar >
template<class PointContainer >
Opm::Spline< Scalar >::Spline ( const PointContainer &  points,
SplineType  splineType = Natural,
bool  sortInputs = true 
)
inline

Convenience constructor for a natural or a periodic spline.

Parameters
pointsAn array of $(x,y)$ tuples of the spline's sampling points (must have a size() method)
periodicIndicates whether a natural or a periodic spline should be created

References Opm::Spline< Scalar >::setContainerOfPoints().

◆ Spline() [7/10]

template<class Scalar >
template<class ScalarArray >
Opm::Spline< Scalar >::Spline ( size_t  nSamples,
const ScalarArray &  x,
const ScalarArray &  y,
Scalar  m0,
Scalar  m1,
bool  sortInputs = true 
)
inline

Convenience constructor for a full spline.

Parameters
nSamplesThe number of sampling points (must be >= 2)
xAn array containing the $x$ values of the spline's sampling points
yAn array containing the $y$ values of the spline's sampling points
m0The slope of the spline at $x_0$
m1The slope of the spline at $x_n$
sortInputsIndicates whether the sample points should be sorted (this is not necessary if they are already sorted in ascending or descending order)

References Opm::Spline< Scalar >::setXYArrays().

◆ Spline() [8/10]

template<class Scalar >
template<class PointArray >
Opm::Spline< Scalar >::Spline ( size_t  nSamples,
const PointArray &  points,
Scalar  m0,
Scalar  m1,
bool  sortInputs = true 
)
inline

Convenience constructor for a full spline.

Parameters
nSamplesThe number of sampling points (must be >= 2)
pointsAn array containing the $x$ and $x$ values of the spline's sampling points
m0The slope of the spline at $x_0$
m1The slope of the spline at $x_n$
sortInputsIndicates whether the sample points should be sorted (this is not necessary if they are already sorted in ascending or descending order)

References Opm::Spline< Scalar >::setArrayOfPoints().

◆ Spline() [9/10]

template<class Scalar >
template<class ScalarContainerX , class ScalarContainerY >
Opm::Spline< Scalar >::Spline ( const ScalarContainerX &  x,
const ScalarContainerY &  y,
Scalar  m0,
Scalar  m1,
bool  sortInputs = true 
)
inline

Convenience constructor for a full spline.

Parameters
xAn array containing the $x$ values of the spline's sampling points (must have a size() method)
yAn array containing the $y$ values of the spline's sampling points (must have a size() method)
m0The slope of the spline at $x_0$
m1The slope of the spline at $x_n$
sortInputsIndicates whether the sample points should be sorted (this is not necessary if they are already sorted in ascending or descending order)

References Opm::Spline< Scalar >::setXYContainers().

◆ Spline() [10/10]

template<class Scalar >
template<class PointContainer >
Opm::Spline< Scalar >::Spline ( const PointContainer &  points,
Scalar  m0,
Scalar  m1,
bool  sortInputs = true 
)
inline

Convenience constructor for a full spline.

Parameters
pointsAn array of $(x,y)$ tuples of the spline's sampling points (must have a size() method)
m0The slope of the spline at $x_0$
m1The slope of the spline at $x_n$
sortInputsIndicates whether the sample points should be sorted (this is not necessary if they are already sorted in ascending or descending order)

References Opm::Spline< Scalar >::setContainerOfPoints().

Member Function Documentation

◆ a_()

template<class Scalar >
Scalar Opm::Spline< Scalar >::a_ ( size_t  i) const
inlineprotected

◆ applies()

template<class Scalar >
template<class Evaluation >
bool Opm::Spline< Scalar >::applies ( const Evaluation &  x) const
inline

◆ assignFromArrayList_()

template<class Scalar >
template<class DestVector , class ListIterator >
void Opm::Spline< Scalar >::assignFromArrayList_ ( DestVector &  destX,
DestVector &  destY,
const ListIterator &  srcBegin,
const ListIterator &  srcEnd,
unsigned  nSamples 
)
inlineprotected

◆ assignFromTupleList_()

template<class Scalar >
template<class DestVector , class ListIterator >
void Opm::Spline< Scalar >::assignFromTupleList_ ( DestVector &  destX,
DestVector &  destY,
ListIterator  srcBegin,
ListIterator  srcEnd,
unsigned  nSamples 
)
inlineprotected

Set the sampling points.

Here we assume that the elements of the source vector have an [] operator where v[0] is the x value and v[1] is the y value if the sampling point.

◆ assignSamplingPoints_()

template<class Scalar >
template<class DestVector , class SourceVector >
void Opm::Spline< Scalar >::assignSamplingPoints_ ( DestVector &  destX,
DestVector &  destY,
const SourceVector &  srcX,
const SourceVector &  srcY,
unsigned  nSamples 
)
inlineprotected

Set the sampling point vectors.

This takes care that the order of the x-values is ascending, although the input must be ordered already!

◆ b_()

template<class Scalar >
Scalar Opm::Spline< Scalar >::b_ ( size_t  i) const
inlineprotected

◆ c_()

template<class Scalar >
Scalar Opm::Spline< Scalar >::c_ ( size_t  i) const
inlineprotected

◆ d_()

template<class Scalar >
Scalar Opm::Spline< Scalar >::d_ ( size_t  i) const
inlineprotected

◆ eval()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::eval ( const Evaluation &  x,
bool  extrapolate = false 
) const
inline

Evaluate the spline at a given position.

Parameters
xThe value on the abscissa where the spline ought to be evaluated
extrapolateIf this parameter is set to true, the spline will be extended beyond its range by straight lines, if false calling extrapolate for $ x \not [x_{min}, x_{max}]$ will cause a failed assertation.

References Opm::Spline< Scalar >::applies(), Opm::Spline< Scalar >::eval_(), Opm::Spline< Scalar >::evalDerivative_(), Opm::Spline< Scalar >::numSamples(), Opm::scalarValue(), Opm::Spline< Scalar >::segmentIdx_(), Opm::Spline< Scalar >::xAt(), and Opm::Spline< Scalar >::y_().

Referenced by Opm::Spline< Scalar >::printCSV(), Opm::SomertonThermalConductionLaw< FluidSystem, ScalarT, ParamsT >::regularizedSqrt_(), and Opm::RegularizedVanGenuchten< TraitsT, ParamsT >::twoPhaseSatPcnw().

◆ eval_()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::eval_ ( const Evaluation &  x,
size_t  i 
) const
inlineprotected

◆ evalDerivative()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::evalDerivative ( const Evaluation &  x,
bool  extrapolate = false 
) const
inline

Evaluate the spline's derivative at a given position.

Parameters
xThe value on the abscissa where the spline's derivative ought to be evaluated
extrapolateIf this parameter is set to true, the spline will be extended beyond its range by straight lines, if false calling extrapolate for $ x \not [x_{min}, x_{max}]$ will cause a failed assertation.

References Opm::Spline< Scalar >::applies(), Opm::Spline< Scalar >::evalDerivative_(), Opm::Spline< Scalar >::numSamples(), Opm::scalarValue(), Opm::Spline< Scalar >::segmentIdx_(), and Opm::Spline< Scalar >::xAt().

Referenced by Opm::Spline< Scalar >::printCSV().

◆ evalDerivative2_()

◆ evalDerivative3_()

◆ evalDerivative_()

◆ evalSecondDerivative()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::evalSecondDerivative ( const Evaluation &  x,
bool  extrapolate = false 
) const
inline

Evaluate the spline's second derivative at a given position.

Parameters
xThe value on the abscissa where the spline's derivative ought to be evaluated
extrapolateIf this parameter is set to true, the spline will be extended beyond its range by straight lines, if false calling extrapolate for $ x \not [x_{min}, x_{max}]$ will cause a failed assertation.

References Opm::Spline< Scalar >::applies(), Opm::Spline< Scalar >::evalDerivative2_(), Opm::scalarValue(), and Opm::Spline< Scalar >::segmentIdx_().

◆ evalThirdDerivative()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::evalThirdDerivative ( const Evaluation &  x,
bool  extrapolate = false 
) const
inline

Evaluate the spline's third derivative at a given position.

Parameters
xThe value on the abscissa where the spline's derivative ought to be evaluated
extrapolateIf this parameter is set to true, the spline will be extended beyond its range by straight lines, if false calling extrapolate for $ x \not [x_{min}, x_{max}]$ will cause a failed assertation.

References Opm::Spline< Scalar >::applies(), Opm::Spline< Scalar >::evalDerivative3_(), Opm::scalarValue(), and Opm::Spline< Scalar >::segmentIdx_().

◆ h00_()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::h00_ ( const Evaluation &  t) const
inlineprotected

◆ h00_prime2_()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::h00_prime2_ ( const Evaluation &  t) const
inlineprotected

◆ h00_prime3_()

template<class Scalar >
template<class Evaluation >
Scalar Opm::Spline< Scalar >::h00_prime3_ ( const Evaluation &  ) const
inlineprotected

◆ h00_prime_()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::h00_prime_ ( const Evaluation &  t) const
inlineprotected

◆ h01_()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::h01_ ( const Evaluation &  t) const
inlineprotected

◆ h01_prime2_()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::h01_prime2_ ( const Evaluation &  t) const
inlineprotected

◆ h01_prime3_()

template<class Scalar >
template<class Evaluation >
Scalar Opm::Spline< Scalar >::h01_prime3_ ( const Evaluation &  ) const
inlineprotected

◆ h01_prime_()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::h01_prime_ ( const Evaluation &  t) const
inlineprotected

◆ h10_()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::h10_ ( const Evaluation &  t) const
inlineprotected

◆ h10_prime2_()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::h10_prime2_ ( const Evaluation &  t) const
inlineprotected

◆ h10_prime3_()

template<class Scalar >
template<class Evaluation >
Scalar Opm::Spline< Scalar >::h10_prime3_ ( const Evaluation &  ) const
inlineprotected

◆ h10_prime_()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::h10_prime_ ( const Evaluation &  t) const
inlineprotected

◆ h11_()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::h11_ ( const Evaluation &  t) const
inlineprotected

◆ h11_prime2_()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::h11_prime2_ ( const Evaluation &  t) const
inlineprotected

◆ h11_prime3_()

template<class Scalar >
template<class Evaluation >
Scalar Opm::Spline< Scalar >::h11_prime3_ ( const Evaluation &  ) const
inlineprotected

◆ h11_prime_()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::h11_prime_ ( const Evaluation &  t) const
inlineprotected

◆ h_()

◆ intersect()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::intersect ( const Evaluation &  a,
const Evaluation &  b,
const Evaluation &  c,
const Evaluation &  d 
) const
inline

Find the intersections of the spline with a cubic polynomial in the whole interval, throws Opm::MathError exception if there is more or less than one solution.

References Opm::Spline< Scalar >::intersectInterval(), Opm::Spline< Scalar >::numSamples(), and Opm::Spline< Scalar >::xAt().

◆ intersectInterval()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::Spline< Scalar >::intersectInterval ( Scalar  x0,
Scalar  x1,
const Evaluation &  a,
const Evaluation &  b,
const Evaluation &  c,
const Evaluation &  d 
) const
inline

Find the intersections of the spline with a cubic polynomial in a sub-interval of the spline, throws Opm::MathError exception if there is more or less than one solution.

References Opm::Spline< Scalar >::applies(), Opm::Spline< Scalar >::intersectSegment_(), and Opm::Spline< Scalar >::segmentIdx_().

Referenced by Opm::Spline< Scalar >::intersect().

◆ intersectSegment_()

template<class Scalar >
template<class Evaluation >
size_t Opm::Spline< Scalar >::intersectSegment_ ( Evaluation *  sol,
size_t  segIdx,
const Evaluation &  a,
const Evaluation &  b,
const Evaluation &  c,
const Evaluation &  d,
Scalar  x0 = -1e30,
Scalar  x1 = 1e30 
) const
inlineprotected

Find all the intersections of a segment of the spline with a cubic polynomial within a specified interval.

References Opm::Spline< Scalar >::a_(), Opm::Spline< Scalar >::b_(), Opm::Spline< Scalar >::c_(), Opm::Spline< Scalar >::d_(), Opm::invertCubicPolynomial(), Opm::max(), Opm::min(), and Opm::Spline< Scalar >::x_().

Referenced by Opm::Spline< Scalar >::intersectInterval().

◆ makeFullSpline_()

template<class Scalar >
void Opm::Spline< Scalar >::makeFullSpline_ ( Scalar  m0,
Scalar  m1 
)
inlineprotected

◆ makeFullSystem_()

template<class Scalar >
template<class Vector , class Matrix >
void Opm::Spline< Scalar >::makeFullSystem_ ( Matrix M,
Vector &  d,
Scalar  m0,
Scalar  m1 
)
inlineprotected

Make the linear system of equations Mx = d which results in the moments of the full spline.

References Opm::Spline< Scalar >::h_(), Opm::Spline< Scalar >::makeNaturalSystem_(), Opm::Spline< Scalar >::numSamples(), and Opm::Spline< Scalar >::y_().

Referenced by Opm::Spline< Scalar >::makeFullSpline_(), and Opm::Spline< Scalar >::set().

◆ makeMonotonicSpline_()

template<class Scalar >
template<class Vector >
void Opm::Spline< Scalar >::makeMonotonicSpline_ ( Vector &  slopes)
inlineprotected

◆ makeNaturalSpline_()

◆ makeNaturalSystem_()

template<class Scalar >
template<class Vector , class Matrix >
void Opm::Spline< Scalar >::makeNaturalSystem_ ( Matrix M,
Vector &  d 
)
inlineprotected

Make the linear system of equations Mx = d which results in the moments of the natural spline.

References Opm::Spline< Scalar >::h_(), Opm::Spline< Scalar >::numSamples(), and Opm::Spline< Scalar >::y_().

Referenced by Opm::Spline< Scalar >::makeFullSystem_(), and Opm::Spline< Scalar >::makeNaturalSpline_().

◆ makePeriodicSpline_()

◆ makePeriodicSystem_()

template<class Scalar >
template<class Matrix , class Vector >
void Opm::Spline< Scalar >::makePeriodicSystem_ ( Matrix M,
Vector &  d 
)
inlineprotected

Make the linear system of equations Mx = d which results in the moments of the periodic spline.

References Opm::Spline< Scalar >::h_(), Opm::Spline< Scalar >::numSamples(), Opm::TridiagonalMatrix< Scalar >::rows(), and Opm::Spline< Scalar >::y_().

Referenced by Opm::Spline< Scalar >::makePeriodicSpline_().

◆ monotonic() [1/2]

template<class Scalar >
int Opm::Spline< Scalar >::monotonic ( ) const
inline

Same as monotonic(x0, x1), but with the entire range of the spline as interval.

References Opm::Spline< Scalar >::monotonic(), Opm::Spline< Scalar >::numSamples(), and Opm::Spline< Scalar >::xAt().

Referenced by Opm::Spline< Scalar >::monotonic(), and Opm::Spline< Scalar >::printCSV().

◆ monotonic() [2/2]

template<class Scalar >
int Opm::Spline< Scalar >::monotonic ( Scalar  x0,
Scalar  x1,
bool  extrapolate = false 
) const
inline

Returns 1 if the spline is monotonically increasing, -1 if the spline is mononously decreasing and 0 if the spline is not monotonous in the interval (x0, x1).

In the corner case that the spline is constant within the given interval, this method returns 3.

References Opm::abs(), Opm::Spline< Scalar >::evalDerivative_(), Opm::Spline< Scalar >::monotonic_(), Opm::Spline< Scalar >::numSamples(), Opm::Spline< Scalar >::segmentIdx_(), Opm::Spline< Scalar >::x_(), and Opm::Spline< Scalar >::xAt().

◆ monotonic_()

template<class Scalar >
int Opm::Spline< Scalar >::monotonic_ ( size_t  i,
Scalar  x0,
Scalar  x1,
int &  r 
) const
inlineprotected

◆ numSamples()

◆ printCSV()

template<class Scalar >
void Opm::Spline< Scalar >::printCSV ( Scalar  xi0,
Scalar  xi1,
size_t  k,
std::ostream &  os = std::cout 
) const
inline

Prints k tuples of the format (x, y, dx/dy, isMonotonic) to stdout.

If the spline does not apply for parts of [x0, x1] it is extrapolated using a straight line. The result can be inspected using the following commands:

--------— snip --------— ./yourProgramm > spline.csv gnuplot

gnuplot> plot "spline.csv" using 1:2 w l ti "Curve", \ "spline.csv" using 1:3 w l ti "Derivative", \ "spline.csv" using 1:4 w p ti "Monotonic" --------— snap --------—

References Opm::Spline< Scalar >::applies(), Opm::Spline< Scalar >::eval(), Opm::Spline< Scalar >::evalDerivative(), Opm::max(), Opm::min(), Opm::Spline< Scalar >::monotonic(), Opm::Spline< Scalar >::numSamples(), Opm::Spline< Scalar >::x_(), and Opm::Spline< Scalar >::y_().

◆ reverseSamplingPoints_()

template<class Scalar >
void Opm::Spline< Scalar >::reverseSamplingPoints_ ( )
inlineprotected

◆ segmentIdx_()

◆ set()

template<class Scalar >
void Opm::Spline< Scalar >::set ( Scalar  x0,
Scalar  x1,
Scalar  y0,
Scalar  y1,
Scalar  m0,
Scalar  m1 
)
inline

Set the sampling points and the boundary slopes of the spline with two sampling points.

Parameters
x0The $x$ value of the first sampling point
x1The $x$ value of the second sampling point
y0The $y$ value of the first sampling point
y1The $y$ value of the second sampling point
m0The slope of the spline at $x_0$
m1The slope of the spline at $x_1$

References Opm::Spline< Scalar >::makeFullSystem_(), Opm::Spline< Scalar >::numSamples(), Opm::Spline< Scalar >::setSlopesFromMoments_(), Opm::Spline< Scalar >::slopeVec_, Opm::TridiagonalMatrix< Scalar >::solve(), Opm::Spline< Scalar >::xPos_, and Opm::Spline< Scalar >::yPos_.

Referenced by Opm::Spline< Scalar >::Spline().

◆ setArrayOfPoints() [1/2]

template<class Scalar >
template<class PointArray >
void Opm::Spline< Scalar >::setArrayOfPoints ( size_t  nSamples,
const PointArray &  points,
Scalar  m0,
Scalar  m1,
bool  sortInputs = true 
)
inline

Set the sampling points and the boundary slopes of a full spline using a C-style array.

This method uses a single array of sampling points, which are seen as an array-like object which provides access to the X and Y coordinates. In this context 'array-like' means that an access to the members is provided via the [] operator. (e.g. C arrays, std::vector, std::array, etc.) The array containing the sampling points must be of size 'nSamples' at least. Also, the number of sampling points must be larger than 1.

References Opm::Spline< Scalar >::makeFullSpline_(), Opm::Spline< Scalar >::numSamples(), Opm::Spline< Scalar >::reverseSamplingPoints_(), Opm::Spline< Scalar >::setNumSamples_(), Opm::Spline< Scalar >::sortInput_(), Opm::Spline< Scalar >::xPos_, and Opm::Spline< Scalar >::yPos_.

Referenced by Opm::Spline< Scalar >::Spline().

◆ setArrayOfPoints() [2/2]

template<class Scalar >
template<class PointArray >
void Opm::Spline< Scalar >::setArrayOfPoints ( size_t  nSamples,
const PointArray &  points,
SplineType  splineType = Natural,
bool  sortInputs = true 
)
inline

Set the sampling points of a natural spline using a C-style array.

This method uses a single array of sampling points, which are seen as an array-like object which provides access to the X and Y coordinates. In this context 'array-like' means that an access to the members is provided via the [] operator. (e.g. C arrays, std::vector, std::array, etc.) The array containing the sampling points must be of size 'nSamples' at least. Also, the number of sampling points must be larger than 1.

References Opm::Spline< Scalar >::makeMonotonicSpline_(), Opm::Spline< Scalar >::makeNaturalSpline_(), Opm::Spline< Scalar >::makePeriodicSpline_(), Opm::Spline< Scalar >::Monotonic, Opm::Spline< Scalar >::Natural, Opm::Spline< Scalar >::numSamples(), Opm::Spline< Scalar >::Periodic, Opm::Spline< Scalar >::reverseSamplingPoints_(), Opm::Spline< Scalar >::setNumSamples_(), Opm::Spline< Scalar >::slopeVec_, Opm::Spline< Scalar >::sortInput_(), Opm::Spline< Scalar >::xPos_, and Opm::Spline< Scalar >::yPos_.

◆ setContainerOfPoints() [1/2]

template<class Scalar >
template<class XYContainer >
void Opm::Spline< Scalar >::setContainerOfPoints ( const XYContainer &  points,
Scalar  m0,
Scalar  m1,
bool  sortInputs = true 
)
inline

Set the sampling points and the boundary slopes of a full spline using a STL-compatible container of array-like objects.

This method uses a single STL-compatible container of sampling points, which are assumed to be array-like objects storing the X and Y coordinates. "STL-compatible" means that the container provides access to iterators using the begin(), end() methods and also provides a size() method. Also, the number of entries in the X and the Y containers must be equal and larger than 1.

References Opm::Spline< Scalar >::makeFullSpline_(), Opm::Spline< Scalar >::numSamples(), Opm::Spline< Scalar >::reverseSamplingPoints_(), Opm::Spline< Scalar >::setNumSamples_(), Opm::Spline< Scalar >::sortInput_(), Opm::Spline< Scalar >::xPos_, and Opm::Spline< Scalar >::yPos_.

Referenced by Opm::Spline< Scalar >::Spline().

◆ setContainerOfPoints() [2/2]

template<class Scalar >
template<class XYContainer >
void Opm::Spline< Scalar >::setContainerOfPoints ( const XYContainer &  points,
SplineType  splineType = Natural,
bool  sortInputs = true 
)
inline

Set the sampling points of a natural spline using a STL-compatible container of array-like objects.

This method uses a single STL-compatible container of sampling points, which are assumed to be array-like objects storing the X and Y coordinates. "STL-compatible" means that the container provides access to iterators using the begin(), end() methods and also provides a size() method. Also, the number of entries in the X and the Y containers must be equal and larger than 1.

References Opm::Spline< Scalar >::makeMonotonicSpline_(), Opm::Spline< Scalar >::makeNaturalSpline_(), Opm::Spline< Scalar >::makePeriodicSpline_(), Opm::Spline< Scalar >::Monotonic, Opm::Spline< Scalar >::Natural, Opm::Spline< Scalar >::numSamples(), Opm::Spline< Scalar >::Periodic, Opm::Spline< Scalar >::reverseSamplingPoints_(), Opm::Spline< Scalar >::setNumSamples_(), Opm::Spline< Scalar >::slopeVec_, Opm::Spline< Scalar >::sortInput_(), Opm::Spline< Scalar >::xPos_, and Opm::Spline< Scalar >::yPos_.

◆ setContainerOfTuples() [1/2]

template<class Scalar >
template<class XYContainer >
void Opm::Spline< Scalar >::setContainerOfTuples ( const XYContainer &  points,
Scalar  m0,
Scalar  m1,
bool  sortInputs = true 
)
inline

Set the sampling points and the boundary slopes of a full spline using a STL-compatible container of tuple-like objects.

This method uses a single STL-compatible container of sampling points, which are assumed to be tuple-like objects storing the X and Y coordinates. "tuple-like" means that the objects provide access to the x values via std::get<0>(obj) and to the y value via std::get<1>(obj) (e.g. std::tuple or std::pair). "STL-compatible" means that the container provides access to iterators using the begin(), end() methods and also provides a size() method. Also, the number of entries in the X and the Y containers must be equal and larger than 1.

References Opm::Spline< Scalar >::makeFullSpline_(), Opm::Spline< Scalar >::numSamples(), Opm::Spline< Scalar >::reverseSamplingPoints_(), Opm::Spline< Scalar >::setNumSamples_(), Opm::Spline< Scalar >::sortInput_(), Opm::Spline< Scalar >::xPos_, and Opm::Spline< Scalar >::yPos_.

◆ setContainerOfTuples() [2/2]

template<class Scalar >
template<class XYContainer >
void Opm::Spline< Scalar >::setContainerOfTuples ( const XYContainer &  points,
SplineType  splineType = Natural,
bool  sortInputs = true 
)
inline

Set the sampling points of a natural spline using a STL-compatible container of tuple-like objects.

This method uses a single STL-compatible container of sampling points, which are assumed to be tuple-like objects storing the X and Y coordinates. "tuple-like" means that the objects provide access to the x values via std::get<0>(obj) and to the y value via std::get<1>(obj) (e.g. std::tuple or std::pair). "STL-compatible" means that the container provides access to iterators using the begin(), end() methods and also provides a size() method. Also, the number of entries in the X and the Y containers must be equal and larger than 1.

References Opm::Spline< Scalar >::makeMonotonicSpline_(), Opm::Spline< Scalar >::makeNaturalSpline_(), Opm::Spline< Scalar >::makePeriodicSpline_(), Opm::Spline< Scalar >::Monotonic, Opm::Spline< Scalar >::Natural, Opm::Spline< Scalar >::numSamples(), Opm::Spline< Scalar >::Periodic, Opm::Spline< Scalar >::reverseSamplingPoints_(), Opm::Spline< Scalar >::setNumSamples_(), Opm::Spline< Scalar >::slopeVec_, Opm::Spline< Scalar >::sortInput_(), Opm::Spline< Scalar >::xPos_, and Opm::Spline< Scalar >::yPos_.

◆ setNumSamples_()

◆ setSlopesFromMoments_()

template<class Scalar >
template<class MomentsVector , class SlopeVector >
void Opm::Spline< Scalar >::setSlopesFromMoments_ ( SlopeVector &  slopes,
const MomentsVector &  moments 
)
inlineprotected

Convert the moments at the sample points to slopes.

This requires to use cubic Hermite interpolation, but it is required because for monotonic splines the second derivative is not continuous.

References Opm::Spline< Scalar >::h_(), Opm::Spline< Scalar >::numSamples(), and Opm::Spline< Scalar >::y_().

Referenced by Opm::Spline< Scalar >::makeFullSpline_(), Opm::Spline< Scalar >::makeNaturalSpline_(), Opm::Spline< Scalar >::makePeriodicSpline_(), and Opm::Spline< Scalar >::set().

◆ setXYArrays() [1/2]

template<class Scalar >
template<class ScalarArrayX , class ScalarArrayY >
void Opm::Spline< Scalar >::setXYArrays ( size_t  nSamples,
const ScalarArrayX &  x,
const ScalarArrayY &  y,
Scalar  m0,
Scalar  m1,
bool  sortInputs = true 
)
inline

Set the sampling points and the boundary slopes of a full spline using C-style arrays.

This method uses separate array-like objects for the values of the X and Y coordinates. In this context 'array-like' means that an access to the members is provided via the [] operator. (e.g. C arrays, std::vector, std::array, etc.) Each array must be of size 'nSamples' at least. Also, the number of sampling points must be larger than 1.

References Opm::Spline< Scalar >::makeFullSpline_(), Opm::Spline< Scalar >::numSamples(), Opm::Spline< Scalar >::reverseSamplingPoints_(), Opm::Spline< Scalar >::setNumSamples_(), Opm::Spline< Scalar >::sortInput_(), Opm::Spline< Scalar >::xPos_, and Opm::Spline< Scalar >::yPos_.

Referenced by Opm::Spline< Scalar >::Spline().

◆ setXYArrays() [2/2]

template<class Scalar >
template<class ScalarArrayX , class ScalarArrayY >
void Opm::Spline< Scalar >::setXYArrays ( size_t  nSamples,
const ScalarArrayX &  x,
const ScalarArrayY &  y,
SplineType  splineType = Natural,
bool  sortInputs = true 
)
inline

Set the sampling points natural spline using C-style arrays.

This method uses separate array-like objects for the values of the X and Y coordinates. In this context 'array-like' means that an access to the members is provided via the [] operator. (e.g. C arrays, std::vector, std::array, etc.) Each array must be of size 'nSamples' at least. Also, the number of sampling points must be larger than 1.

References Opm::Spline< Scalar >::makeMonotonicSpline_(), Opm::Spline< Scalar >::makeNaturalSpline_(), Opm::Spline< Scalar >::makePeriodicSpline_(), Opm::Spline< Scalar >::Monotonic, Opm::Spline< Scalar >::Natural, Opm::Spline< Scalar >::numSamples(), Opm::Spline< Scalar >::Periodic, Opm::Spline< Scalar >::reverseSamplingPoints_(), Opm::Spline< Scalar >::setNumSamples_(), Opm::Spline< Scalar >::slopeVec_, Opm::Spline< Scalar >::sortInput_(), Opm::Spline< Scalar >::xPos_, and Opm::Spline< Scalar >::yPos_.

◆ setXYContainers() [1/2]

template<class Scalar >
template<class ScalarContainerX , class ScalarContainerY >
void Opm::Spline< Scalar >::setXYContainers ( const ScalarContainerX &  x,
const ScalarContainerY &  y,
Scalar  m0,
Scalar  m1,
bool  sortInputs = true 
)
inline

Set the sampling points and the boundary slopes of a full spline using STL-compatible containers.

This method uses separate STL-compatible containers for the values of the sampling points' X and Y coordinates. "STL-compatible" means that the container provides access to iterators using the begin(), end() methods and also provides a size() method. Also, the number of entries in the X and the Y containers must be equal and larger than 1.

References Opm::Spline< Scalar >::makeFullSpline_(), Opm::Spline< Scalar >::numSamples(), Opm::Spline< Scalar >::reverseSamplingPoints_(), Opm::Spline< Scalar >::setNumSamples_(), Opm::Spline< Scalar >::sortInput_(), Opm::Spline< Scalar >::xPos_, and Opm::Spline< Scalar >::yPos_.

Referenced by Opm::SplineTwoPhaseMaterialParams< TraitsT >::setKrnSamples(), Opm::SplineTwoPhaseMaterialParams< TraitsT >::setKrwSamples(), Opm::SplineTwoPhaseMaterialParams< TraitsT >::setPcnwSamples(), and Opm::Spline< Scalar >::Spline().

◆ setXYContainers() [2/2]

template<class Scalar >
template<class ScalarContainerX , class ScalarContainerY >
void Opm::Spline< Scalar >::setXYContainers ( const ScalarContainerX &  x,
const ScalarContainerY &  y,
SplineType  splineType = Natural,
bool  sortInputs = true 
)
inline

Set the sampling points of a natural spline using STL-compatible containers.

This method uses separate STL-compatible containers for the values of the sampling points' X and Y coordinates. "STL-compatible" means that the container provides access to iterators using the begin(), end() methods and also provides a size() method. Also, the number of entries in the X and the Y containers must be equal and larger than 1.

References Opm::Spline< Scalar >::makeMonotonicSpline_(), Opm::Spline< Scalar >::makeNaturalSpline_(), Opm::Spline< Scalar >::makePeriodicSpline_(), Opm::Spline< Scalar >::Monotonic, Opm::Spline< Scalar >::Natural, Opm::Spline< Scalar >::numSamples(), Opm::Spline< Scalar >::Periodic, Opm::Spline< Scalar >::reverseSamplingPoints_(), Opm::Spline< Scalar >::setNumSamples_(), Opm::Spline< Scalar >::slopeVec_, Opm::Spline< Scalar >::sortInput_(), Opm::Spline< Scalar >::xPos_, and Opm::Spline< Scalar >::yPos_.

◆ slope_()

template<class Scalar >
Scalar Opm::Spline< Scalar >::slope_ ( size_t  i) const
inlineprotected

Returns the slope (i.e. first derivative) of the spline at the i-th sampling point.

References Opm::Spline< Scalar >::slopeVec_.

Referenced by Opm::Spline< Scalar >::eval_(), Opm::Spline< Scalar >::evalDerivative2_(), Opm::Spline< Scalar >::evalDerivative3_(), and Opm::Spline< Scalar >::evalDerivative_().

◆ sortInput_()

◆ valueAt()

template<class Scalar >
Scalar Opm::Spline< Scalar >::valueAt ( size_t  sampleIdx) const
inline

Return the x value of a given sampling point.

References Opm::Spline< Scalar >::y_().

◆ x_()

◆ xAt()

template<class Scalar >
Scalar Opm::Spline< Scalar >::xAt ( size_t  sampleIdx) const
inline

◆ y_()

Member Data Documentation

◆ slopeVec_

◆ xPos_

◆ yPos_


The documentation for this class was generated from the following file: