49 const std::vector<unsigned int> &renumber)
51 Assert(renumber.size() == index_map.size(),
55 for (
unsigned int i = 0; i < index_map.size(); ++i)
56 index_map_inverse[index_map[i]] = i;
58 std::vector<unsigned int> renumber_base;
59 for (
unsigned int i = 0; i < tensor_polys.n(); ++i)
60 renumber_base.push_back(renumber[i]);
62 tensor_polys.set_numbering(renumber_base);
130 std::vector<double> &values,
136 Assert(values.size() == tensor_polys.n() + 1 || values.empty(),
138 Assert(grads.size() == tensor_polys.n() + 1 || grads.empty(),
140 Assert(grad_grads.size() == tensor_polys.n() + 1 || grad_grads.empty(),
142 Assert(third_derivatives.size() == tensor_polys.n() + 1 ||
143 third_derivatives.empty(),
145 tensor_polys.n() + 1,
147 Assert(fourth_derivatives.size() == tensor_polys.n() + 1 ||
148 fourth_derivatives.empty(),
150 tensor_polys.n() + 1,
155 bool do_values =
false, do_grads =
false, do_grad_grads =
false;
156 bool do_3rd_derivatives =
false, do_4th_derivatives =
false;
157 if (values.empty() ==
false)
162 if (grads.empty() ==
false)
167 if (grad_grads.empty() ==
false)
169 grad_grads.pop_back();
170 do_grad_grads =
true;
172 if (third_derivatives.empty() ==
false)
174 third_derivatives.resize(tensor_polys.n());
175 do_3rd_derivatives =
true;
177 if (fourth_derivatives.empty() ==
false)
179 fourth_derivatives.resize(tensor_polys.n());
180 do_4th_derivatives =
true;
183 tensor_polys.evaluate(
184 p, values, grads, grad_grads, third_derivatives, fourth_derivatives);
189 values.push_back(1.);
191 grads.emplace_back();
193 grad_grads.emplace_back();
194 if (do_3rd_derivatives)
195 third_derivatives.emplace_back();
196 if (do_4th_derivatives)
197 fourth_derivatives.emplace_back();
void evaluate(const Point< dim > &unit_point, std::vector< double > &values, std::vector< Tensor< 1, dim > > &grads, std::vector< Tensor< 2, dim > > &grad_grads, std::vector< Tensor< 3, dim > > &third_derivatives, std::vector< Tensor< 4, dim > > &fourth_derivatives) const override