A monotone cubic spline.  
 More...
#include <dumux/common/monotonecubicspline.hh>
template<class Scalar = double>
class Dumux::MonotoneCubicSpline< Scalar >
- Note
- Construction after Fritsch & Butland (1984) (see https://doi.org/10.1137/0905021) 
- 
The resulting interpolation is globally monotone but only C^1 
|  | 
|  | MonotoneCubicSpline ()=default | 
|  | Default constructor. 
 | 
|  | 
|  | MonotoneCubicSpline (const std::vector< Scalar > &x, const std::vector< Scalar > &y) | 
|  | Construct a monotone cubic spline from the control points (x[i], y[i]) 
 | 
|  | 
| void | updatePoints (const std::vector< Scalar > &x, const std::vector< Scalar > &y) | 
|  | Create a monotone cubic spline from the control points (x[i], y[i]) 
 | 
|  | 
| Scalar | eval (const Scalar x) const | 
|  | Evaluate the y value at a given x value. 
 | 
|  | 
| Scalar | evalDerivative (const Scalar x) const | 
|  | Evaluate the first derivative dy/dx at a given x value. 
 | 
|  | 
| Scalar | evalInverse (const Scalar y) const | 
|  | Evaluate the inverse function. 
 | 
|  | 
◆ MonotoneCubicSpline() [1/2]
template<class Scalar = double> 
 
 
◆ MonotoneCubicSpline() [2/2]
template<class Scalar = double> 
 
- Note
- if the data set is monotone, monotonicity is preserved 
- Parameters
- 
  
    | x | a vector of x-coordinates |  | y | a vector of y-coordinates |  
 
 
 
◆ eval()
template<class Scalar = double> 
 
- Parameters
- 
  
  
- Note
- We extrapolate linearly if out of bounds 
 
 
◆ evalDerivative()
template<class Scalar = double> 
 
- Parameters
- 
  
  
- Note
- We extrapolate linearly if out of bounds 
 
 
◆ evalInverse()
template<class Scalar = double> 
 
- Parameters
- 
  
  
- Note
- We extrapolate linearly if out of bounds 
- 
Throws exception if inverse could not be found (e.g. not unique) 
 
 
◆ updatePoints()
template<class Scalar = double> 
 
- Parameters
- 
  
    | x | a vector of x-coordinates |  | y | a vector of y-coordinates |  
 
 
 
The documentation for this class was generated from the following file: