41 return (0.75 - 2.5 * p[0] + 1.5 * p[1] +
42 1.5 * (p[0] * p[0] - p[1] * p[1]));
46 return (-0.25 - 0.5 * p[0] + 1.5 * p[1] +
47 1.5 * (p[0] * p[0] - p[1] * p[1]));
51 return (0.75 + 1.5 * p[0] - 2.5 * p[1] -
52 1.5 * (p[0] * p[0] - p[1] * p[1]));
56 return (-0.25 + 1.5 * p[0] - 0.5 * p[1] -
57 1.5 * (p[0] * p[0] - p[1] * p[1]));
71 if constexpr (dim == 2)
76 grad[0] = -2.5 + 3 * p[0];
77 grad[1] = 1.5 - 3 * p[1];
81 grad[0] = -0.5 + 3.0 * p[0];
82 grad[1] = 1.5 - 3.0 * p[1];
86 grad[0] = 1.5 - 3.0 * p[0];
87 grad[1] = -2.5 + 3.0 * p[1];
91 grad[0] = 1.5 - 3.0 * p[0];
92 grad[1] = -0.5 + 3.0 * p[1];
164 std::vector<double> &values,
170 const unsigned int n_pols = this->n();
171 Assert(values.size() == n_pols || values.empty(),
173 Assert(grads.size() == n_pols || grads.empty(),
175 Assert(grad_grads.size() == n_pols || grad_grads.empty(),
177 Assert(third_derivatives.size() == n_pols || third_derivatives.empty(),
179 Assert(fourth_derivatives.size() == n_pols || fourth_derivatives.empty(),
182 for (
unsigned int i = 0; i < n_pols; ++i)
184 if (values.size() != 0)
186 values[i] = compute_value(i, unit_point);
188 if (grads.size() != 0)
190 grads[i] = compute_grad(i, unit_point);
192 if (grad_grads.size() != 0)
194 grad_grads[i] = compute_grad_grad(i, unit_point);
196 if (third_derivatives.size() != 0)
198 third_derivatives[i] = compute_derivative<3>(i, unit_point);
200 if (fourth_derivatives.size() != 0)
202 fourth_derivatives[i] = compute_derivative<4>(i, unit_point);
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