version 3.11-dev
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
Dumux::Spline< Scalar, numSamples > Class Template Reference

A 3rd order polynomial spline. More...

#include <dumux/common/spline.hh>

Inheritance diagram for Dumux::Spline< Scalar, numSamples >:

Description

template<class Scalar, int numSamples = 2>
class Dumux::Spline< Scalar, numSamples >

This class implements a spline s(x) for which, given n sampling points x1,,xn, the following conditions hold

s(xi)=yii{1,,n}s(x1)=m1s(xn)=mn

for any given boundary slopes m1 and mn. Alternatively, natural splines are supported which are defined by

s(xi)=yii{1,,n}s(x1)=0s(xn)=0

Public Member Functions

 Spline ()
 Default constructor for a spline. More...
 
template<class ScalarArray >
 Spline (const ScalarArray &x, const ScalarArray &y)
 Convenience constructor for a full spline. More...
 
template<class PointArray >
 Spline (const PointArray &points)
 Convenience constructor for a full spline. More...
 
template<class ScalarArray >
 Spline (const ScalarArray &x, const ScalarArray &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...
 

Constructor & Destructor Documentation

◆ Spline() [1/5]

template<class Scalar , int numSamples = 2>
Dumux::Spline< Scalar, numSamples >::Spline ( )
inline

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

◆ Spline() [2/5]

template<class Scalar , int numSamples = 2>
template<class ScalarArray >
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() [3/5]

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

◆ Spline() [4/5]

template<class Scalar , int numSamples = 2>
template<class ScalarArray >
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 x0
m1The slope of the spline at xn

◆ Spline() [5/5]

template<class Scalar , int numSamples = 2>
template<class PointArray >
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 x0
m1The slope of the spline at xn

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