ASPECT
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 667 of file utilities.h.

## § 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
 x X coordinates of interpolation points. y Values in the interpolation points. cubic_spline Whether to construct a cubic spline or just do linear interpolation monotone_spline Whether 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.

## § m_x

 std::vector aspect::Utilities::tk::spline::m_x
private

x coordinates of points

Definition at line 692 of file utilities.h.

## § m_a

 std::vector 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 700 of file utilities.h.

## § m_b

 std::vector aspect::Utilities::tk::spline::m_b
private

Definition at line 700 of file utilities.h.

## § m_c

 std::vector aspect::Utilities::tk::spline::m_c
private

Definition at line 700 of file utilities.h.

## § m_y

 std::vector aspect::Utilities::tk::spline::m_y
private

Definition at line 700 of file utilities.h.

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