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,
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 =
95 grad[d] = full_gradient[index_to_write_from];
105 const unsigned int component)
const
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];
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);
183 const unsigned int component)
const
188 function->hessian(full_point, component);
200#include "base/function_restriction.inst"
Function(const unsigned int n_components=1, const time_type initial_time=0.0)
double value(const Point< dim > &point, const unsigned int component) const override
const ObserverPointer< const Function< dim+1 > > function
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)
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
const ObserverPointer< const Function< dim+1 > > function
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)