19 #ifdef DEAL_II_WITH_GSL
28 const std::vector<double> &y_)
29 : interpolation_points(x_)
30 , interpolation_values(y_)
46 acc = gsl_interp_accel_alloc();
48 cspline = gsl_spline_alloc(gsl_interp_cspline, n);
61 gsl_interp_accel_free(acc);
62 gsl_spline_free(cspline);
76 std::lock_guard<std::mutex> lock(acc_mutex);
78 const double x = p[0];
79 Assert(x >= interpolation_points.front() &&
80 x <= interpolation_points.back(),
82 interpolation_points.front(),
83 interpolation_points.back()));
85 return gsl_spline_eval(cspline, x, acc);
97 std::lock_guard<std::mutex> lock(acc_mutex);
99 const double x = p[0];
100 Assert(x >= interpolation_points.front() &&
101 x <= interpolation_points.back(),
103 interpolation_points.front(),
104 interpolation_points.back()));
106 const double deriv = gsl_spline_eval_deriv(cspline, x, acc);
121 std::lock_guard<std::mutex> lock(acc_mutex);
123 const double x = p[0];
124 Assert(x >= interpolation_points.front() &&
125 x <= interpolation_points.back(),
127 interpolation_points.front(),
128 interpolation_points.back()));
130 return gsl_spline_eval_deriv2(cspline, x, acc);
140 res[0][0] = laplacian(p);
152 return sizeof(*this) + 2 *
sizeof(
double) * interpolation_values.size();