18 #ifndef BUBBLEPROFILER_GSL_INTERPOLATOR_HPP_INCLUDED 19 #define BUBBLEPROFILER_GSL_INTERPOLATOR_HPP_INCLUDED 28 #include <gsl/gsl_spline.h> 29 #include <gsl/gsl_version.h> 43 const Eigen::VectorXd& y_old,
44 const Eigen::VectorXd& x_new);
56 const Eigen::VectorXd& y_old,
57 int n_old,
const Eigen::VectorXd& x_new,
73 #ifdef GSL_MAJOR_VERSION 74 #if (GSL_MAJOR_VERSION >= 2) 134 gsl_interp_accel_free(a);
148 std::unique_ptr<gsl_interp_accel, GSL_accel_deleter>
accelerator{
nullptr};
149 std::unique_ptr<gsl_spline, GSL_spline_deleter>
interpolant{
nullptr};
std::unique_ptr< gsl_interp_accel, GSL_accel_deleter > accelerator
std::unique_ptr< gsl_spline, GSL_spline_deleter > interpolant
void set_interpolation_type(Interpolation_type t)
Sets the method used to perform interpolation.
void reset(Interpolation_type, int)
void operator()(gsl_spline *s) const
double evaluate_deriv_at(double) const
Evaluates derivative of computed interpolant at a point.
double evaluate_at(double) const
Evaluates computed interpolant at a point.
double evaluate_second_deriv_at(double) const
Evaluates second derivative of computed interpolant at a point.
void construct_interpolant(const Eigen::VectorXd &, const Eigen::VectorXd &)
Computes interpolant using given x and y values.
Eigen::VectorXd interpolate_f_at(const Eigen::VectorXd &x_old, const Eigen::VectorXd &y_old, const Eigen::VectorXd &x_new)
Computes interpolated function values at a new set of grid points.
void check_interpolant_computed() const
Interpolation_type interp_type
void operator()(gsl_interp_accel *a) const
~GSL_interpolator()=default
const gsl_interp_type * to_gsl_interp_type(Interpolation_type) const
void check_within_bounds(double) const
GSL_interpolator & operator=(const GSL_interpolator &)
Provides routines for carrying out 1D interpolation.