ASPECT
Public Member Functions | Private Attributes | List of all members
aspect::Utilities::tk::spline Class Reference

Public Member Functions

void set_points (const std::vector< double > &x, const std::vector< double > &y, const bool cubic_spline=true, const bool monotone_spline=false)
 
double operator() (double x) const
 

Private Attributes

std::vector< double > m_x
 
std::vector< double > m_a
 
std::vector< double > m_b
 
std::vector< double > m_c
 
std::vector< double > m_y
 

Detailed Description

Class for cubic spline interpolation

Definition at line 685 of file utilities.h.

Member Function Documentation

§ set_points()

void aspect::Utilities::tk::spline::set_points ( const std::vector< double > &  x,
const std::vector< double > &  y,
const bool  cubic_spline = true,
const bool  monotone_spline = false 
)

Initialize the spline.

Parameters
xX coordinates of interpolation points.
yValues in the interpolation points.
cubic_splineWhether to construct a cubic spline or just do linear interpolation
monotone_splineWhether the cubic spline should be a monotone cubic spline. Requires cubic_spline to be set to true.

§ operator()()

double aspect::Utilities::tk::spline::operator() ( double  x) const

Evaluate spline at point x.

Member Data Documentation

§ m_x

std::vector<double> aspect::Utilities::tk::spline::m_x
private

x coordinates of points

Definition at line 710 of file utilities.h.

§ m_a

std::vector<double> aspect::Utilities::tk::spline::m_a
private

interpolation parameters [ f(x) = a*(x-x_i)^3 + b*(x-x_i)^2 + c*(x-x_i) + y_i ]

Definition at line 718 of file utilities.h.

§ m_b

std::vector<double> aspect::Utilities::tk::spline::m_b
private

Definition at line 718 of file utilities.h.

§ m_c

std::vector<double> aspect::Utilities::tk::spline::m_c
private

Definition at line 718 of file utilities.h.

§ m_y

std::vector<double> aspect::Utilities::tk::spline::m_y
private

Definition at line 718 of file utilities.h.


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