29 std::pair<double, double> & value_bounds,
30 std::array<std::pair<double, double>, dim> &gradient_bounds,
31 const unsigned int component)
34 const double value = function.
value(
center, component);
41 double taylor_bound_f = 0;
43 for (
unsigned int i = 0; i < dim; ++i)
47 taylor_bound_f +=
std::abs(gradient[i]) * dx_i;
51 double taylor_bound_dfdxi = 0;
53 for (
unsigned int j = 0; j < dim; ++j)
57 taylor_bound_dfdxi +=
std::abs(hessian[i][j]) * dx_j;
58 taylor_bound_f += .5 *
std::abs(hessian[i][j]) * dx_i * dx_j;
61 gradient_bounds[i].first = gradient[i] - taylor_bound_dfdxi;
62 gradient_bounds[i].second = gradient[i] + taylor_bound_dfdxi;
65 value_bounds.first = value - taylor_bound_f;
66 value_bounds.second = value + taylor_bound_f;
71#include "function_tools.inst"
Point< spacedim, Number > center() const
Number side_length(const unsigned int direction) const
virtual SymmetricTensor< 2, dim, RangeNumberType > hessian(const Point< dim > &p, const unsigned int component=0) const
virtual Tensor< 1, dim, RangeNumberType > gradient(const Point< dim > &p, const unsigned int component=0) const
virtual RangeNumberType value(const Point< dim > &p, const unsigned int component=0) const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)