virtual Tensor<1,dim> gradient (const Point<dim> &p,
const unsigned int component = 0) const;
+ virtual SymmetricTensor<2,dim> hessian (const Point<dim> &p,
+ const unsigned int component = 0) const;
+
+ virtual double laplacian(const Point< dim > &p,
+ const unsigned int component = 0) const;
+
std::size_t memory_consumption () const;
private:
gsl_spline_init (cspline, &interpolation_points[0], &interpolation_values[0], n);
}
+
+
template <int dim>
CSpline<dim>::~CSpline()
{
}
+
template <int dim>
double
CSpline<dim>::value (const Point<dim> &p,
}
+
template <int dim>
Tensor<1,dim>
CSpline<dim>::gradient (const Point<dim> &p,
}
+
+ template <int dim>
+ double
+ CSpline<dim>::laplacian (const Point<dim> &p,
+ const unsigned int) const
+ {
+ const double &x = p[0];
+ Assert (x >= interpolation_points.front() && x <= interpolation_points.back(),
+ ExcCSplineRange(x,interpolation_points.front(),interpolation_points.back()));
+
+ return gsl_spline_eval_deriv2 (cspline, x, acc);
+ }
+
+
+
+ template <int dim>
+ SymmetricTensor<2,dim>
+ CSpline<dim>::hessian (const Point<dim> &p,
+ const unsigned int) const
+ {
+ Tensor<2,dim> res;
+ res[0][0] = laplacian(p);
+ return res;
+ }
+
+
+
template <int dim>
std::size_t
CSpline<dim>::memory_consumption () const