Specialization of a spline with the number of sampling points only known at run time. More...
#include <dumux/common/spline.hh>
Specialization of a spline with the number of sampling points only known at run time.
This class implements a spline \(s(x)\) for which, given \(n\) sampling points \(x_1, \dots, x_n\), the following conditions hold
\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\). Alternatively, natural splines are supported 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*}
Public Member Functions | |
Spline () | |
Default constructor for a spline. More... | |
template<class ScalarArrayX , class ScalarArrayY > | |
Spline (int nSamples, const ScalarArrayX &x, const ScalarArrayY &y) | |
Convenience constructor for a natural spline. More... | |
template<class PointArray > | |
Spline (int nSamples, const PointArray &points) | |
Convenience constructor for a natural spline. More... | |
template<class ScalarContainer > | |
Spline (const ScalarContainer &x, const ScalarContainer &y) | |
Convenience constructor for a natural spline. More... | |
template<class PointContainer > | |
Spline (const PointContainer &points) | |
Convenience constructor for a natural spline. More... | |
template<class ScalarArray > | |
Spline (int nSamples, const ScalarArray &x, const ScalarArray &y, Scalar m0, Scalar m1) | |
Convenience constructor for a full spline. More... | |
template<class PointArray > | |
Spline (int nSamples, const PointArray &points, Scalar m0, Scalar m1) | |
Convenience constructor for a full spline. More... | |
template<class ScalarContainerX , class ScalarContainerY > | |
Spline (const ScalarContainerX &x, const ScalarContainerY &y, Scalar m0, Scalar m1) | |
Convenience constructor for a full spline. More... | |
template<class PointContainer > | |
Spline (const PointContainer &points, Scalar m0, Scalar m1) | |
Convenience constructor for a full spline. More... | |
|
inline |
Default constructor for a spline.
To specify the actual curve, use one of the set() methods.
|
inline |
Convenience constructor for a natural spline.
nSamples | The number of sampling points (must be > 2) |
x | An array containing the \(x\) values of the spline's sampling points |
y | An array containing the \(y\) values of the spline's sampling points |
|
inline |
Convenience constructor for a natural spline.
nSamples | The number of sampling points (must be > 2) |
points | An array of \((x,y)\) tuples of the spline's sampling points |
|
inline |
Convenience constructor for a natural spline.
x | An array containing the \(x\) values of the spline's sampling points (must have a size() method) |
y | An array containing the \(y\) values of the spline's sampling points (must have a size() method) |
|
inline |
Convenience constructor for a natural spline.
points | An array of \((x,y)\) tuples of the spline's sampling points (must have a size() method) |
|
inline |
Convenience constructor for a full spline.
nSamples | The number of sampling points (must be >= 2) |
x | An array containing the \(x\) values of the spline's sampling points |
y | An array containing the \(y\) values of the spline's sampling points |
m0 | The slope of the spline at \(x_0\) |
m1 | The slope of the spline at \(x_n\) |
|
inline |
Convenience constructor for a full spline.
nSamples | The number of sampling points (must be >= 2) |
points | An array containing the \(x\) and \(x\) values of the spline's sampling points |
m0 | The slope of the spline at \(x_0\) |
m1 | The slope of the spline at \(x_n\) |
|
inline |
Convenience constructor for a full spline.
x | An array containing the \(x\) values of the spline's sampling points (must have a size() method) |
y | An array containing the \(y\) values of the spline's sampling points (must have a size() method) |
m0 | The slope of the spline at \(x_0\) |
m1 | The slope of the spline at \(x_n\) |
|
inline |
Convenience constructor for a full spline.
points | An array of \((x,y)\) tuples of the spline's sampling points (must have a size() method) |
m0 | The slope of the spline at \(x_0\) |
m1 | The slope of the spline at \(x_n\) |