24 const unsigned int component_in_dim_plus_1,
25 const double coordinate_value)
30 output[component_in_dim_plus_1] = coordinate_value;
31 for (
int d = 0; d < dim; ++d)
33 const unsigned int component_to_write_to =
34 ::internal::coordinate_to_one_dim_higher<dim>(
35 component_in_dim_plus_1, d);
36 output[component_to_write_to] = point[d];
50 const unsigned int direction,
64 const unsigned int component)
const
71 return function->value(full_point, component);
79 const unsigned int component)
const
87 function->gradient(full_point, component);
93 for (
unsigned int d = 0; d < dim; ++d)
95 const unsigned int index_to_write_from =
97 grad[d] = full_gradient[index_to_write_from];
107 const unsigned int component)
const
115 function->hessian(full_point, component);
121 for (
unsigned int i = 0; i < dim; ++i)
123 const unsigned int i_to_write_from =
124 internal::coordinate_to_one_dim_higher<dim>(restricted_direction, i);
125 for (
unsigned int j = 0; j < dim; ++j)
127 const unsigned int j_to_write_from =
128 internal::coordinate_to_one_dim_higher<dim>(restricted_direction,
130 hess[i][j] = full_hessian[i_to_write_from][j_to_write_from];
154 const unsigned int component)
const
158 return function->value(full_point, component);
166 const unsigned int component)
const
171 function->gradient(full_point, component);
185 const unsigned int component)
const
190 function->hessian(full_point, component);
202#include "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
Tensor< 1, dim > gradient(const Point< dim > &point, const unsigned int component) const override
const unsigned int restricted_direction
const SmartPointer< const Function< dim+1 > > function
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 SmartPointer< 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)