25 const unsigned int component_in_dim_plus_1,
26 const double coordinate_value)
31 output(component_in_dim_plus_1) = coordinate_value;
32 for (
int d = 0;
d < dim; ++
d)
34 const unsigned int component_to_write_to =
35 ::internal::coordinate_to_one_dim_higher<dim>(
36 component_in_dim_plus_1,
d);
37 output(component_to_write_to) =
point(
d);
51 const unsigned int direction,
52 const double coordinate_value)
54 , restricted_direction(direction)
55 , coordinate_value(coordinate_value)
65 const unsigned int component)
const
72 return function->value(full_point, component);
80 const unsigned int component)
const
88 function->gradient(full_point, component);
94 for (
int d = 0;
d < dim; ++
d)
96 const unsigned int index_to_write_from =
97 internal::coordinate_to_one_dim_higher<dim>(restricted_direction,
d);
98 grad[
d] = full_gradient[index_to_write_from];
108 const unsigned int component)
const
112 restricted_direction,
116 function->hessian(full_point, component);
122 for (
int i = 0; i < dim; ++i)
124 const unsigned int i_to_write_from =
125 internal::coordinate_to_one_dim_higher<dim>(restricted_direction, i);
126 for (
int j = 0; j < dim; ++j)
128 const unsigned int j_to_write_from =
129 internal::coordinate_to_one_dim_higher<dim>(restricted_direction,
131 hess[i][j] = full_hessian[i_to_write_from][j_to_write_from];
141 const unsigned int open_direction,
143 : function(&function)
144 , open_direction(open_direction)
155 const unsigned int component)
const
159 return function->value(full_point, component);
167 const unsigned int component)
const
172 function->gradient(full_point, component);
177 grad[0] = full_gradient[open_direction];
186 const unsigned int component)
const
191 function->hessian(full_point, component);
196 hess[0][0] = full_hessian[open_direction][open_direction];
203#include "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< spacedim > point(const gp_Pnt &p, const double tolerance=1e-10)
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
Point< dim+1 > create_higher_dim_point(const Point< dim > &point, const unsigned int component_in_dim_plus_1, const double coordinate_value)