22 const unsigned int component_in_dim_plus_1,
23 const double coordinate_value)
28 output[component_in_dim_plus_1] = coordinate_value;
29 for (
int d = 0; d < dim; ++d)
31 const unsigned int component_to_write_to =
32 ::internal::coordinate_to_one_dim_higher<dim>(
33 component_in_dim_plus_1, d);
34 output[component_to_write_to] = point[d];
48 const unsigned int direction,
49 const double coordinate_value)
51 , restricted_direction(direction)
52 , coordinate_value(coordinate_value)
62 const unsigned int component)
const
69 return function->value(full_point, component);
77 const unsigned int component)
const
85 function->gradient(full_point, component);
91 for (
unsigned int d = 0; d < dim; ++d)
93 const unsigned int index_to_write_from =
94 internal::coordinate_to_one_dim_higher<dim>(restricted_direction, d);
95 grad[d] = full_gradient[index_to_write_from];
105 const unsigned int component)
const
109 restricted_direction,
113 function->hessian(full_point, component);
119 for (
unsigned int i = 0; i < dim; ++i)
121 const unsigned int i_to_write_from =
122 internal::coordinate_to_one_dim_higher<dim>(restricted_direction, i);
123 for (
unsigned int j = 0; j < dim; ++j)
125 const unsigned int j_to_write_from =
126 internal::coordinate_to_one_dim_higher<dim>(restricted_direction,
128 hess[i][j] = full_hessian[i_to_write_from][j_to_write_from];
138 const unsigned int open_direction,
140 : function(&function)
141 , open_direction(open_direction)
152 const unsigned int component)
const
156 return function->value(full_point, component);
164 const unsigned int component)
const
169 function->gradient(full_point, component);
174 grad[0] = full_gradient[open_direction];
183 const unsigned int component)
const
188 function->hessian(full_point, component);
193 hess[0][0] = full_hessian[open_direction][open_direction];
200#include "base/function_restriction.inst"
double value(const Point< dim > &point, const unsigned int component) const override
Tensor< 1, dim > gradient(const Point< dim > &point, const unsigned int component) const override
const unsigned int restricted_direction
SymmetricTensor< 2, dim > hessian(const Point< dim > &point, const unsigned int component) const override
CoordinateRestriction(const Function< dim+1 > &function, const unsigned int direction, const double coordinate_value)
PointRestriction(const Function< dim+1 > &function, const unsigned int open_direction, const Point< dim > &point)
const unsigned int open_direction
double value(const Point< 1 > &point, const unsigned int component) const override
Tensor< 1, 1 > gradient(const Point< 1 > &point, const unsigned int component) const override
SymmetricTensor< 2, 1 > hessian(const Point< 1 > &point, const unsigned int component) const override
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define AssertIndexRange(index, range)
Point< dim+1 > create_higher_dim_point(const Point< dim > &point, const unsigned int component_in_dim_plus_1, const double coordinate_value)