71 Assert(values.size() == this->n() || values.empty(),
73 Assert(grads.size() == this->n() || grads.empty(),
75 Assert(grad_grads.size() == this->n() || grad_grads.empty(),
77 Assert(third_derivatives.size() == this->n() || third_derivatives.empty(),
79 Assert(fourth_derivatives.size() == this->n() || fourth_derivatives.empty(),
82 const unsigned int n_sub = polynomial_space.n();
88 std::lock_guard<std::mutex> lock(mutex);
90 p_values.resize((values.empty()) ? 0 : n_sub);
91 p_grads.resize((grads.empty()) ? 0 : n_sub);
92 p_grad_grads.resize((grad_grads.empty()) ? 0 : n_sub);
93 p_third_derivatives.resize((third_derivatives.empty()) ? 0 : n_sub);
94 p_fourth_derivatives.resize((fourth_derivatives.empty()) ? 0 : n_sub);
96 for (
unsigned int d = 0; d < dim; ++d)
110 for (
unsigned int c = 0; c < dim; ++c)
111 p[c] = unit_point[(c + d) % dim];
113 polynomial_space.evaluate(p,
118 p_fourth_derivatives);
120 for (
unsigned int i = 0; i < p_values.size(); ++i)
121 values[i + d * n_sub][d] = p_values[i];
123 for (
unsigned int i = 0; i < p_grads.size(); ++i)
124 for (
unsigned int d1 = 0; d1 < dim; ++d1)
125 grads[i + d * n_sub][d][(d1 + d) % dim] = p_grads[i][d1];
127 for (
unsigned int i = 0; i < p_grad_grads.size(); ++i)
128 for (
unsigned int d1 = 0; d1 < dim; ++d1)
129 for (
unsigned int d2 = 0; d2 < dim; ++d2)
130 grad_grads[i + d * n_sub][d][(d1 + d) % dim][(d2 + d) % dim] =
131 p_grad_grads[i][d1][d2];
133 for (
unsigned int i = 0; i < p_third_derivatives.size(); ++i)
134 for (
unsigned int d1 = 0; d1 < dim; ++d1)
135 for (
unsigned int d2 = 0; d2 < dim; ++d2)
136 for (
unsigned int d3 = 0; d3 < dim; ++d3)
137 third_derivatives[i + d * n_sub][d][(d1 + d) % dim]
138 [(d2 + d) % dim][(d3 + d) % dim] =
139 p_third_derivatives[i][d1][d2][d3];
141 for (
unsigned int i = 0; i < p_fourth_derivatives.size(); ++i)
142 for (
unsigned int d1 = 0; d1 < dim; ++d1)
143 for (
unsigned int d2 = 0; d2 < dim; ++d2)
144 for (
unsigned int d3 = 0; d3 < dim; ++d3)
145 for (
unsigned int d4 = 0; d4 < dim; ++d4)
146 fourth_derivatives[i + d * n_sub][d][(d1 + d) % dim]
147 [(d2 + d) % dim][(d3 + d) % dim]
149 p_fourth_derivatives[i][d1][d2][d3][d4];
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
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)