Spline for two sampling points. More...
#include <dumux/common/spline.hh>
Spline for two sampling points.
For this type of spline there is no natural spline.
Public Member Functions | |
Spline () | |
template<class ScalarArrayX , class ScalarArrayY > | |
Spline (const ScalarArrayX &x, const ScalarArrayY &y, Scalar m0, Scalar m1) | |
Convenience constructor for a full spline. More... | |
template<class PointArray > | |
Spline (const PointArray &points, Scalar m0, Scalar m1) | |
Convenience constructor for a full spline. More... | |
Spline (Scalar x0, Scalar x1, Scalar y0, Scalar y1, Scalar m0, Scalar m1) | |
Convenience constructor for a full spline. More... | |
int | numSamples () const |
Returns the number of sampling points. 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. More... | |
template<class ScalarContainer > | |
void | setXYArrays (int nSamples, const ScalarContainer &x, const ScalarContainer &y, Scalar m0, Scalar m1) |
Set the sampling points and the boundary slopes of the spline. More... | |
template<class ScalarContainerX , class ScalarContainerY > | |
void | setXYContainers (const ScalarContainerX &x, const ScalarContainerY &y, Scalar m0, Scalar m1) |
Set the sampling points and the boundary slopes of the spline. More... | |
template<class PointArray > | |
void | setArrayOfPoints (int nSamples, const PointArray &points, Scalar m0, Scalar m1) |
Set the sampling points and the boundary slopes of the spline. More... | |
template<class PointContainer > | |
void | setContainerOfPoints (const PointContainer &points, Scalar m0, Scalar m1) |
Set the sampling points and the boundary slopes from an STL-like container of points. More... | |
template<class TupleContainer > | |
void | setContainerOfTuples (const TupleContainer &tuples, Scalar m0, Scalar m1) |
Set the sampling points and the boundary slopes from an STL-like container of tuples. More... | |
Protected Member Functions | |
void | assignXY_ (Scalar x0, Scalar x1, Scalar y0, Scalar y1) |
Scalar | x_ (int i) const |
Returns the x coordinate of the i-th sampling point. More... | |
Scalar | y_ (int i) const |
Returns the y coordinate of the i-th sampling point. More... | |
Scalar | moment_ (int i) const |
Returns the moment (i.e. second derivative) of the spline at the i-th sampling point. More... | |
Protected Attributes | |
Vector | xPos_ |
Vector | yPos_ |
Vector | m_ |
|
inline |
|
inline |
Convenience constructor for a full spline.
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.
points | An array of \((x,y)\) tuples 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.
x0 | The \(x\) value of the first sampling point |
x1 | The \(x\) value of the second sampling point |
y0 | The \(y\) value of the first sampling point |
y1 | The \(y\) value of the second sampling point |
m0 | The slope of the spline at \(x_0\) |
m1 | The slope of the spline at \(x_n\) |
|
inlineprotected |
|
inlineprotected |
Returns the moment (i.e. second derivative) of the spline at the i-th sampling point.
|
inline |
Returns the number of sampling points.
|
inline |
Set the sampling points and the boundary slopes of the spline.
x0 | The \(x\) value of the first sampling point |
x1 | The \(x\) value of the second sampling point |
y0 | The \(y\) value of the first sampling point |
y1 | The \(y\) value of the second sampling point |
m0 | The slope of the spline at \(x_0\) |
m1 | The slope of the spline at \(x_1\) |
|
inline |
Set the sampling points and the boundary slopes of the spline.
nSamples | The number of sampling points (must be >= 2) |
points | An array of \((x,y)\) tuples of the spline's sampling points |
m0 | The slope of the spline at \(x_0\) |
m1 | The slope of the spline at \(x_1\) |
|
inline |
Set the sampling points and the boundary slopes from an STL-like container of points.
points | An array of \((x,y)\) tuples of the spline's sampling points |
m0 | The slope of the spline at \(x_0\) |
m1 | The slope of the spline at \(x_1\) |
|
inline |
Set the sampling points and the boundary slopes from an STL-like container of tuples.
tuples | An array of \((x,y)\) tuples of the spline's sampling points |
m0 | The slope of the spline at \(x_0\) |
m1 | The slope of the spline at \(x_1\) |
|
inline |
Set the sampling points and the boundary slopes of the spline.
nSamples | The number of sampling points (must be >= 2) |
x | An array containing the \(x\) values of the sampling points |
y | An array containing the \(y\) values of the sampling points |
m0 | The slope of the spline at \(x_0\) |
m1 | The slope of the spline at \(x_1\) |
|
inline |
Set the sampling points and the boundary slopes of the spline.
x | An array containing the \(x\) values of the sampling points |
y | An array containing the \(y\) values of the sampling points |
m0 | The slope of the spline at \(x_0\) |
m1 | The slope of the spline at \(x_1\) |
|
inlineprotected |
Returns the x coordinate of the i-th sampling point.
|
inlineprotected |
Returns the y coordinate of the i-th sampling point.
|
protected |
|
protected |
|
protected |