version 3.10.0
Loading...
Searching...
No Matches
Dumux::Spline< Scalar, -1 > Class Template Reference

Specialization of a spline with the number of sampling points only known at run time. More...

#include <dumux/common/spline.hh>

Inheritance diagram for Dumux::Spline< Scalar, -1 >:

Description

template<class Scalar>
class Dumux::Spline< Scalar, -1 >

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.
 
template<class ScalarArrayX, class ScalarArrayY>
 Spline (int nSamples, const ScalarArrayX &x, const ScalarArrayY &y)
 Convenience constructor for a natural spline.
 
template<class PointArray>
 Spline (int nSamples, const PointArray &points)
 Convenience constructor for a natural spline.
 
template<class ScalarContainer>
 Spline (const ScalarContainer &x, const ScalarContainer &y)
 Convenience constructor for a natural spline.
 
template<class PointContainer>
 Spline (const PointContainer &points)
 Convenience constructor for a natural spline.
 
template<class ScalarArray>
 Spline (int nSamples, const ScalarArray &x, const ScalarArray &y, Scalar m0, Scalar m1)
 Convenience constructor for a full spline.
 
template<class PointArray>
 Spline (int nSamples, const PointArray &points, Scalar m0, Scalar m1)
 Convenience constructor for a full spline.
 
template<class ScalarContainerX, class ScalarContainerY>
 Spline (const ScalarContainerX &x, const ScalarContainerY &y, Scalar m0, Scalar m1)
 Convenience constructor for a full spline.
 
template<class PointContainer>
 Spline (const PointContainer &points, Scalar m0, Scalar m1)
 Convenience constructor for a full spline.
 
 Spline ()
 Default constructor for a spline.
 
 Spline (const ScalarArray &x, const ScalarArray &y)
 Convenience constructor for a full spline.
 
 Spline (const PointArray &points)
 Convenience constructor for a full spline.
 
 Spline (const ScalarArray &x, const ScalarArray &y, Scalar m0, Scalar m1)
 Convenience constructor for a full spline.
 
 Spline (const PointArray &points, Scalar m0, Scalar m1)
 Convenience constructor for a full spline.
 

Constructor & Destructor Documentation

◆ Spline() [1/14]

template<class Scalar>
Dumux::Spline< Scalar, -1 >::Spline ( )
inline

To specify the actual curve, use one of the set() methods.

◆ Spline() [2/14]

template<class Scalar>
template<class ScalarArrayX, class ScalarArrayY>
Dumux::Spline< Scalar, -1 >::Spline ( int nSamples,
const ScalarArrayX & x,
const ScalarArrayY & y )
inline
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

◆ Spline() [3/14]

template<class Scalar>
template<class PointArray>
Dumux::Spline< Scalar, -1 >::Spline ( int nSamples,
const PointArray & points )
inline
Parameters
nSamplesThe number of sampling points (must be > 2)
pointsAn array of \((x,y)\) tuples of the spline's sampling points

◆ Spline() [4/14]

template<class Scalar>
template<class ScalarContainer>
Dumux::Spline< Scalar, -1 >::Spline ( const ScalarContainer & x,
const ScalarContainer & y )
inline
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)

◆ Spline() [5/14]

template<class Scalar>
template<class PointContainer>
Dumux::Spline< Scalar, -1 >::Spline ( const PointContainer & points)
inline
Parameters
pointsAn array of \((x,y)\) tuples of the spline's sampling points (must have a size() method)

◆ Spline() [6/14]

template<class Scalar>
template<class ScalarArray>
Dumux::Spline< Scalar, -1 >::Spline ( int nSamples,
const ScalarArray & x,
const ScalarArray & y,
Scalar m0,
Scalar m1 )
inline
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\)

◆ Spline() [7/14]

template<class Scalar>
template<class PointArray>
Dumux::Spline< Scalar, -1 >::Spline ( int nSamples,
const PointArray & points,
Scalar m0,
Scalar m1 )
inline
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\)

◆ Spline() [8/14]

template<class Scalar>
template<class ScalarContainerX, class ScalarContainerY>
Dumux::Spline< Scalar, -1 >::Spline ( const ScalarContainerX & x,
const ScalarContainerY & y,
Scalar m0,
Scalar m1 )
inline
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\)

◆ Spline() [9/14]

template<class Scalar>
template<class PointContainer>
Dumux::Spline< Scalar, -1 >::Spline ( const PointContainer & points,
Scalar m0,
Scalar m1 )
inline
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\)

◆ Spline() [10/14]

Dumux::Spline< Scalar, numSamples >::Spline ( )
inline

To specify the actual curve, use one of the set() methods.

◆ Spline() [11/14]

Dumux::Spline< Scalar, numSamples >::Spline ( const ScalarArray & x,
const ScalarArray & y )
inline
Parameters
xAn array containing the \(x\) values of the spline's sampling points
yAn array containing the \(y\) values of the spline's sampling points

◆ Spline() [12/14]

Dumux::Spline< Scalar, numSamples >::Spline ( const PointArray & points)
inline
Parameters
pointsAn array of \((x,y)\) tuples of the spline's sampling points

◆ Spline() [13/14]

Dumux::Spline< Scalar, numSamples >::Spline ( const ScalarArray & x,
const ScalarArray & y,
Scalar m0,
Scalar m1 )
inline
Parameters
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\)

◆ Spline() [14/14]

Dumux::Spline< Scalar, numSamples >::Spline ( const PointArray & points,
Scalar m0,
Scalar m1 )
inline
Parameters
pointsAn array of \((x,y)\) tuples of the spline's sampling points
m0The slope of the spline at \(x_0\)
m1The slope of the spline at \(x_n\)

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