DFT-EFE
 
Loading...
Searching...
No Matches
dftefe::utils::Spline Class Reference

#include <Spline.h>

Public Types

enum  spline_type { linear = 10 , cspline = 30 , cspline_hermite = 31 }
 
enum  bd_type { first_deriv = 1 , second_deriv = 2 }
 

Public Member Functions

 Spline ()
 
 Spline (const std::vector< double > &X, const std::vector< double > &Y, spline_type type=cspline, bool make_monotonic=false, bd_type left=second_deriv, double left_value=0.0, bd_type right=second_deriv, double right_value=0.0)
 
void set_boundary (bd_type left, double left_value, bd_type right, double right_value)
 
void set_points (const std::vector< double > &x, const std::vector< double > &y, spline_type type=cspline)
 
bool make_monotonic ()
 
double operator() (double x) const
 
std::vector< double > coefficients (double x) const
 
double deriv (int order, double x) const
 
std::vector< double > get_x () const
 
std::vector< double > get_y () const
 
double get_x_min () const
 
double get_x_max () const
 
std::string info () const
 

Private Member Functions

void set_coeffs_from_b ()
 
size_t find_closest (double x) const
 

Private Attributes

std::vector< double > d_x
 
std::vector< double > d_y
 
std::vector< double > d_b
 
std::vector< double > d_c
 
std::vector< double > d_d
 
double d_c0
 
spline_type d_type
 
bd_type d_left
 
bd_type d_right
 
double d_left_value
 
double d_right_value
 
bool d_made_monotonic
 

Member Enumeration Documentation

◆ bd_type

Enumerator
first_deriv 
second_deriv 

◆ spline_type

Enumerator
linear 
cspline 
cspline_hermite 

Constructor & Destructor Documentation

◆ Spline() [1/2]

dftefe::utils::Spline::Spline ( )

◆ Spline() [2/2]

dftefe::utils::Spline::Spline ( const std::vector< double > &  X,
const std::vector< double > &  Y,
spline_type  type = cspline,
bool  make_monotonic = false,
bd_type  left = second_deriv,
double  left_value = 0.0,
bd_type  right = second_deriv,
double  right_value = 0.0 
)
Here is the call graph for this function:

Member Function Documentation

◆ coefficients()

std::vector< double > dftefe::utils::Spline::coefficients ( double  x) const
Here is the call graph for this function:

◆ deriv()

double dftefe::utils::Spline::deriv ( int  order,
double  x 
) const
Here is the call graph for this function:

◆ find_closest()

size_t dftefe::utils::Spline::find_closest ( double  x) const
private
Here is the caller graph for this function:

◆ get_x()

std::vector< double > dftefe::utils::Spline::get_x ( ) const
inline

◆ get_x_max()

double dftefe::utils::Spline::get_x_max ( ) const
inline

◆ get_x_min()

double dftefe::utils::Spline::get_x_min ( ) const
inline

◆ get_y()

std::vector< double > dftefe::utils::Spline::get_y ( ) const
inline

◆ info()

std::string dftefe::utils::Spline::info ( ) const

◆ make_monotonic()

bool dftefe::utils::Spline::make_monotonic ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator()()

double dftefe::utils::Spline::operator() ( double  x) const
Here is the call graph for this function:

◆ set_boundary()

void dftefe::utils::Spline::set_boundary ( Spline::bd_type  left,
double  left_value,
Spline::bd_type  right,
double  right_value 
)

◆ set_coeffs_from_b()

void dftefe::utils::Spline::set_coeffs_from_b ( )
private
Here is the caller graph for this function:

◆ set_points()

void dftefe::utils::Spline::set_points ( const std::vector< double > &  x,
const std::vector< double > &  y,
spline_type  type = cspline 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ d_b

std::vector<double> dftefe::utils::Spline::d_b
private

◆ d_c

std::vector<double> dftefe::utils::Spline::d_c
private

◆ d_c0

double dftefe::utils::Spline::d_c0
private

◆ d_d

std::vector<double> dftefe::utils::Spline::d_d
private

◆ d_left

bd_type dftefe::utils::Spline::d_left
private

◆ d_left_value

double dftefe::utils::Spline::d_left_value
private

◆ d_made_monotonic

bool dftefe::utils::Spline::d_made_monotonic
private

◆ d_right

bd_type dftefe::utils::Spline::d_right
private

◆ d_right_value

double dftefe::utils::Spline::d_right_value
private

◆ d_type

spline_type dftefe::utils::Spline::d_type
private

◆ d_x

std::vector<double> dftefe::utils::Spline::d_x
private

◆ d_y

std::vector<double> dftefe::utils::Spline::d_y
private

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