26 std::pair<double, double> &value_bounds,
27 std::array<std::pair<double, double>, dim> &gradient_bounds,
28 const unsigned int component)
31 const double value = function.
value(center, component);
38 double taylor_bound_f = 0;
40 for (
unsigned int i = 0; i < dim; ++i)
44 taylor_bound_f +=
std::abs(gradient[i]) * dx_i;
48 double taylor_bound_dfdxi = 0;
50 for (
unsigned int j = 0; j < dim; ++j)
54 taylor_bound_dfdxi +=
std::abs(hessian[i][j]) * dx_j;
55 taylor_bound_f += .5 *
std::abs(hessian[i][j]) * dx_i * dx_j;
58 gradient_bounds[i].first = gradient[i] - taylor_bound_dfdxi;
59 gradient_bounds[i].second = gradient[i] + taylor_bound_dfdxi;
62 value_bounds.first = value - taylor_bound_f;
63 value_bounds.second = value + taylor_bound_f;
68#include "base/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 > &)