64 Assert(values.size() ==
this->n() || values.size() == 0,
82 const unsigned int n_sub = polynomial_space.n();
87 std::lock_guard<std::mutex> lock(mutex);
89 p_values.resize((values.size() == 0) ? 0 :
n_sub);
95 polynomial_space.evaluate(unit_point,
100 p_fourth_derivatives);
103 for (
unsigned int i = 0; i < p_values.size(); ++i)
104 for (
unsigned int j = 0;
j < dim; ++
j)
105 values[i +
j *
n_sub][
j] = p_values[i];
108 for (
unsigned int i = 0; i < p_grads.size(); ++i)
109 for (
unsigned int j = 0;
j < dim; ++
j)
113 for (
unsigned int i = 0; i < p_grad_grads.size(); ++i)
114 for (
unsigned int j = 0;
j < dim; ++
j)
119 unsigned int start = dim *
n_sub;
122 std::vector<std::vector<double>>
monovali(dim, std::vector<double>(4));
123 std::vector<std::vector<double>>
monovalk(dim, std::vector<double>(4));
131 "available for dim == 2, or dim == 3"));
135 for (
unsigned int d = 0; d < dim; ++d)
136 monomials[0].value(unit_point(d),
monovali[d]);
137 if (values.size() != 0)
140 values[start][1] = -unit_point(1) *
monovali[0][1];
141 values[start + 1][0] = unit_point(0) *
monovali[1][1];
142 values[start + 1][1] = -
monovali[1][0];
147 grads[start][0][1] = 0.;
152 grads[start + 1][1][0] = 0.;
183 for (
unsigned int i = 0; i <
n_curls; ++i, start += dim)
185 for (
unsigned int d = 0; d < dim; ++d)
188 monomials[i + 1].value(unit_point(d),
monovali[d]);
190 monomials[this->degree() - 1 - i].value(unit_point(d),
194 if (values.size() != 0)
201 values[start][2] = 0.;
204 values[start + 1][1] =
208 values[start + 1][0] = 0.;
211 values[start + 2][2] =
215 values[start + 2][1] = 0.;
225 grads[start][1][0] = 0.;
228 grads[start][2][0] = 0.;
229 grads[start][2][1] = 0.;
230 grads[start][2][2] = 0.;
233 grads[start + 1][1][2] =
235 grads[start + 1][1][0] =
237 grads[start + 1][2][1] = 0.;
240 grads[start + 1][0][1] = 0.;
241 grads[start + 1][0][2] = 0.;
242 grads[start + 1][0][0] = 0.;
245 grads[start + 2][2][0] =
247 grads[start + 2][2][1] =
249 grads[start + 2][0][2] = 0.;
252 grads[start + 2][1][2] = 0.;
253 grads[start + 2][1][0] = 0.;
254 grads[start + 2][1][1] = 0.;
void evaluate(const Point< dim > &unit_point, std::vector< Tensor< 1, dim > > &values, std::vector< Tensor< 2, dim > > &grads, std::vector< Tensor< 3, dim > > &grad_grads, std::vector< Tensor< 4, dim > > &third_derivatives, std::vector< Tensor< 5, dim > > &fourth_derivatives) const override