17 #include "deal.II/base/polynomials_rt_bubbles.h" 18 #include <deal.II/base/quadrature_lib.h> 19 #include <deal.II/base/thread_management.h> 23 DEAL_II_NAMESPACE_OPEN
30 raviart_thomas_space (k-1),
32 n_pols(compute_n_pols(k))
36 for (
unsigned int i=0; i<
monomials.size(); ++i)
51 Assert(values.size()==n_pols || values.size()==0,
53 Assert(grads.size()==n_pols || grads.size()==0,
55 Assert(grad_grads.size()==n_pols || grad_grads.size()==0,
57 Assert(third_derivatives.size()==n_pols || third_derivatives.size()==0,
59 Assert(fourth_derivatives.size()==n_pols || fourth_derivatives.size()==0,
63 (void)third_derivatives;
64 Assert(third_derivatives.size()==0,
66 (void)fourth_derivatives;
67 Assert(fourth_derivatives.size()==0,
70 const unsigned int n_sub = raviart_thomas_space.n();
79 static std::vector<Tensor<1,dim> > p_values;
80 static std::vector<Tensor<2,dim> > p_grads;
81 static std::vector<Tensor<3,dim> > p_grad_grads;
82 static std::vector<Tensor<4,dim> > p_third_derivatives;
83 static std::vector<Tensor<5,dim> > p_fourth_derivatives;
85 p_values.resize((values.size() == 0) ? 0 : n_sub);
86 p_grads.resize((grads.size() == 0) ? 0 : n_sub);
87 p_grad_grads.resize((grad_grads.size() == 0) ? 0 : n_sub);
90 raviart_thomas_space.compute (unit_point, p_values, p_grads, p_grad_grads, p_third_derivatives, p_fourth_derivatives);
91 for (
unsigned int i=0; i<p_values.size(); ++i)
92 values[i] = p_values[i];
93 for (
unsigned int i=0; i<p_grads.size(); ++i)
94 grads[i] = p_grads[i];
95 for (
unsigned int i=0; i<p_grad_grads.size(); ++i)
96 grad_grads[i] = p_grad_grads[i];
101 const unsigned int n_derivatives = 3;
102 double monoval_plus[dim][n_derivatives+1];
103 double monoval[dim][n_derivatives+1];
105 double monoval_i[dim][n_derivatives+1];
106 double monoval_j[dim][n_derivatives+1];
107 double monoval_jplus[dim][n_derivatives+1];
109 unsigned int start = n_sub;
121 for (
unsigned int d=0; d<dim; ++d)
122 monomials[my_degree+1].value(unit_point(d), n_derivatives, monoval_plus[d]);
124 for (
unsigned int i=0; i<=my_degree; ++i, ++start)
126 for (
unsigned int d=0; d<dim; ++d)
127 monomials[i].value(unit_point(d), n_derivatives, monoval_i[d]);
129 if (values.size() != 0)
131 values[start][0] = monoval_i[0][0] * monoval_plus[1][1];
132 values[start][1] = -monoval_i[0][1] * monoval_plus[1][0];
134 values[start+my_degree+1][0] = -monoval_plus[0][0] * monoval_i[1][1];
135 values[start+my_degree+1][1] = monoval_plus[0][1] * monoval_i[1][0];
138 if (grads.size() != 0)
140 grads[start][0][0] = monoval_i[0][1] * monoval_plus[1][1];
141 grads[start][0][1] = monoval_i[0][0] * monoval_plus[1][2];
142 grads[start][1][0] = -monoval_i[0][2] * monoval_plus[1][0];
143 grads[start][1][1] = -monoval_i[0][1] * monoval_plus[1][1];
145 grads[start+my_degree+1][0][0] = -monoval_plus[0][1] * monoval_i[1][1];
146 grads[start+my_degree+1][0][1] = -monoval_plus[0][0] * monoval_i[1][2];
147 grads[start+my_degree+1][1][0] = monoval_plus[0][2] * monoval_i[1][0];
148 grads[start+my_degree+1][1][1] = monoval_plus[0][1] * monoval_i[1][1];
151 if (grad_grads.size() != 0)
153 grad_grads[start][0][0][0] = monoval_i[0][2] * monoval_plus[1][1];
154 grad_grads[start][0][0][1] = monoval_i[0][1] * monoval_plus[1][2];
155 grad_grads[start][0][1][0] = monoval_i[0][1] * monoval_plus[1][2];
156 grad_grads[start][0][1][1] = monoval_i[0][0] * monoval_plus[1][3];
157 grad_grads[start][1][0][0] = -monoval_i[0][3] * monoval_plus[1][0];
158 grad_grads[start][1][0][1] = -monoval_i[0][2] * monoval_plus[1][1];
159 grad_grads[start][1][1][0] = -monoval_i[0][2] * monoval_plus[1][1];
160 grad_grads[start][1][1][1] = -monoval_i[0][1] * monoval_plus[1][2];
162 grad_grads[start+my_degree+1][0][0][0] = -monoval_plus[0][2] * monoval_i[1][1];
163 grad_grads[start+my_degree+1][0][0][1] = -monoval_plus[0][1] * monoval_i[1][2];
164 grad_grads[start+my_degree+1][0][1][0] = -monoval_plus[0][1] * monoval_i[1][2];
165 grad_grads[start+my_degree+1][0][1][1] = -monoval_plus[0][0] * monoval_i[1][3];
166 grad_grads[start+my_degree+1][1][0][0] = monoval_plus[0][3] * monoval_i[1][0];
167 grad_grads[start+my_degree+1][1][0][1] = monoval_plus[0][2] * monoval_i[1][1];
168 grad_grads[start+my_degree+1][1][1][0] = monoval_plus[0][2] * monoval_i[1][1];
169 grad_grads[start+my_degree+1][1][1][1] = monoval_plus[0][1] * monoval_i[1][2];
186 for (
unsigned int d=0; d<dim; ++d)
188 monomials[my_degree+1].value(unit_point(d), n_derivatives, monoval_plus[d]);
189 monomials[my_degree].value(unit_point(d), n_derivatives, monoval[d]);
192 const unsigned int n_curls = (my_degree+1) * (2*my_degree + 1);
194 for (
unsigned int i=0; i<=my_degree; ++i)
196 for (
unsigned int d=0; d<dim; ++d)
197 monomials[i].value(unit_point(d), n_derivatives, monoval_i[d]);
199 for (
unsigned int j = 0; j<=my_degree; ++j)
201 for (
unsigned int d=0; d<dim; ++d)
203 monomials[j].value(unit_point(d), n_derivatives, monoval_j[d]);
204 monomials[j+1].value(unit_point(d), n_derivatives, monoval_jplus[d]);
207 if (values.size() != 0)
209 values[start][0] = monoval_i[0][0] * monoval_j[1][0] * monoval[2][0] *
static_cast<double>(j + my_degree + 2);
210 values[start][1] = -monoval_i[0][1] * monoval_jplus[1][0] * monoval[2][0];
211 values[start][2] = -monoval_i[0][1] * monoval_j[1][0] * monoval_plus[2][0];
213 values[start+n_curls][0] = -monoval_jplus[0][0] * monoval_i[1][1] * monoval[2][0];
214 values[start+n_curls][1] = monoval_j[0][0] * monoval_i[1][0] * monoval[2][0] *
static_cast<double>(j + my_degree + 2);
215 values[start+n_curls][2] = -monoval_j[0][0] * monoval_i[1][1] * monoval_plus[2][0];
217 values[start+2*n_curls][0] = -monoval_jplus[0][0] * monoval[1][0] * monoval_i[2][1];
218 values[start+2*n_curls][1] = -monoval_j[0][0] * monoval_plus[1][0] * monoval_i[2][1];
219 values[start+2*n_curls][2] = monoval_j[0][0] * monoval[1][0] * monoval_i[2][0] *
static_cast<double>(j + my_degree + 2);
225 values[start+1][0] = monoval_i[0][0] * monoval[1][0] * monoval_j[2][0] *
static_cast<double>(j + my_degree + 2);
226 values[start+1][1] = -monoval_i[0][1] * monoval_plus[1][0] * monoval_j[2][0];
227 values[start+1][2] = -monoval_i[0][1] * monoval[1][0] * monoval_jplus[2][0];
229 values[start+n_curls+1][0] = -monoval_plus[0][0] * monoval_i[1][1] * monoval_j[2][0];
230 values[start+n_curls+1][1] = monoval[0][0] * monoval_i[1][0] * monoval_j[2][0] *
static_cast<double>(j + my_degree + 2);
231 values[start+n_curls+1][2] = -monoval[0][0] * monoval_i[1][1] * monoval_jplus[2][0];
233 values[start+2*n_curls+1][0] = -monoval_plus[0][0] * monoval_j[1][0] * monoval_i[2][1];
234 values[start+2*n_curls+1][1] = -monoval[0][0] * monoval_jplus[1][0] * monoval_i[2][1];
235 values[start+2*n_curls+1][2] = monoval[0][0] * monoval_j[1][0] * monoval_i[2][0] *
static_cast<double>(j + my_degree + 2);
239 if (grads.size() != 0)
241 grads[start][0][0] = monoval_i[0][1] * monoval_j[1][0] * monoval[2][0] *
static_cast<double>(j + my_degree + 2);
242 grads[start][0][1] = monoval_i[0][0] * monoval_j[1][1] * monoval[2][0] *
static_cast<double>(j + my_degree + 2);
243 grads[start][0][2] = monoval_i[0][0] * monoval_j[1][0] * monoval[2][1] *
static_cast<double>(j + my_degree + 2);
244 grads[start][1][0] = -monoval_i[0][2] * monoval_jplus[1][0] * monoval[2][0];
245 grads[start][1][1] = -monoval_i[0][1] * monoval_jplus[1][1] * monoval[2][0];
246 grads[start][1][2] = -monoval_i[0][1] * monoval_jplus[1][0] * monoval[2][1];
247 grads[start][2][0] = -monoval_i[0][2] * monoval_j[1][0] * monoval_plus[2][0];
248 grads[start][2][1] = -monoval_i[0][1] * monoval_j[1][1] * monoval_plus[2][0];
249 grads[start][2][2] = -monoval_i[0][1] * monoval_j[1][0] * monoval_plus[2][1];
251 grads[start+n_curls][0][0] = -monoval_jplus[0][1] * monoval_i[1][1] * monoval[2][0];
252 grads[start+n_curls][0][1] = -monoval_jplus[0][0] * monoval_i[1][2] * monoval[2][0];
253 grads[start+n_curls][0][2] = -monoval_jplus[0][0] * monoval_i[1][1] * monoval[2][1];
254 grads[start+n_curls][1][0] = monoval_j[0][1] * monoval_i[1][0] * monoval[2][0] *
static_cast<double>(j + my_degree + 2);
255 grads[start+n_curls][1][1] = monoval_j[0][0] * monoval_i[1][1] * monoval[2][0] *
static_cast<double>(j + my_degree + 2);
256 grads[start+n_curls][1][2] = monoval_j[0][0] * monoval_i[1][0] * monoval[2][1] *
static_cast<double>(j + my_degree + 2);
257 grads[start+n_curls][2][0] = -monoval_j[0][1] * monoval_i[1][1] * monoval_plus[2][0];
258 grads[start+n_curls][2][1] = -monoval_j[0][0] * monoval_i[1][2] * monoval_plus[2][0];
259 grads[start+n_curls][2][2] = -monoval_j[0][0] * monoval_i[1][1] * monoval_plus[2][1];
261 grads[start+2*n_curls][0][0] = -monoval_jplus[0][1] * monoval[1][0] * monoval_i[2][1];
262 grads[start+2*n_curls][0][1] = -monoval_jplus[0][0] * monoval[1][1] * monoval_i[2][1];
263 grads[start+2*n_curls][0][2] = -monoval_jplus[0][0] * monoval[1][0] * monoval_i[2][2];
264 grads[start+2*n_curls][1][0] = -monoval_j[0][1] * monoval_plus[1][0] * monoval_i[2][1];
265 grads[start+2*n_curls][1][1] = -monoval_j[0][0] * monoval_plus[1][1] * monoval_i[2][1];
266 grads[start+2*n_curls][1][2] = -monoval_j[0][0] * monoval_plus[1][0] * monoval_i[2][2];
267 grads[start+2*n_curls][2][0] = monoval_j[0][1] * monoval[1][0] * monoval_i[2][0] *
static_cast<double>(j + my_degree + 2);
268 grads[start+2*n_curls][2][1] = monoval_j[0][0] * monoval[1][1] * monoval_i[2][0] *
static_cast<double>(j + my_degree + 2);
269 grads[start+2*n_curls][2][2] = monoval_j[0][0] * monoval[1][0] * monoval_i[2][1] *
static_cast<double>(j + my_degree + 2);
273 grads[start+1][0][0] = monoval_i[0][1] * monoval[1][0] * monoval_j[2][0] *
static_cast<double>(j + my_degree + 2);
274 grads[start+1][0][1] = monoval_i[0][0] * monoval[1][1] * monoval_j[2][0] *
static_cast<double>(j + my_degree + 2);
275 grads[start+1][0][2] = monoval_i[0][0] * monoval[1][0] * monoval_j[2][1] *
static_cast<double>(j + my_degree + 2);
276 grads[start+1][1][0] = -monoval_i[0][2] * monoval_plus[1][0] * monoval_j[2][0];
277 grads[start+1][1][1] = -monoval_i[0][1] * monoval_plus[1][1] * monoval_j[2][0];
278 grads[start+1][1][2] = -monoval_i[0][1] * monoval_plus[1][0] * monoval_j[2][1];
279 grads[start+1][2][0] = -monoval_i[0][2] * monoval[1][0] * monoval_jplus[2][0];
280 grads[start+1][2][1] = -monoval_i[0][1] * monoval[1][1] * monoval_jplus[2][0];
281 grads[start+1][2][2] = -monoval_i[0][1] * monoval[1][0] * monoval_jplus[2][1];
283 grads[start+n_curls+1][0][0] = -monoval_plus[0][1] * monoval_i[1][1] * monoval_j[2][0];
284 grads[start+n_curls+1][0][1] = -monoval_plus[0][0] * monoval_i[1][2] * monoval_j[2][0];
285 grads[start+n_curls+1][0][2] = -monoval_plus[0][0] * monoval_i[1][1] * monoval_j[2][1];
286 grads[start+n_curls+1][1][0] = monoval[0][1] * monoval_i[1][0] * monoval_j[2][0] *
static_cast<double>(j + my_degree + 2);
287 grads[start+n_curls+1][1][1] = monoval[0][0] * monoval_i[1][1] * monoval_j[2][0] *
static_cast<double>(j + my_degree + 2);
288 grads[start+n_curls+1][1][2] = monoval[0][0] * monoval_i[1][0] * monoval_j[2][1] *
static_cast<double>(j + my_degree + 2);
289 grads[start+n_curls+1][2][0] = -monoval[0][1] * monoval_i[1][1] * monoval_jplus[2][0];
290 grads[start+n_curls+1][2][1] = -monoval[0][0] * monoval_i[1][2] * monoval_jplus[2][0];
291 grads[start+n_curls+1][2][2] = -monoval[0][0] * monoval_i[1][1] * monoval_jplus[2][1];
293 grads[start+2*n_curls+1][0][0] = -monoval_plus[0][1] * monoval_j[1][0] * monoval_i[2][1];
294 grads[start+2*n_curls+1][0][1] = -monoval_plus[0][0] * monoval_j[1][1] * monoval_i[2][1];
295 grads[start+2*n_curls+1][0][2] = -monoval_plus[0][0] * monoval_j[1][0] * monoval_i[2][2];
296 grads[start+2*n_curls+1][1][0] = -monoval[0][1] * monoval_jplus[1][0] * monoval_i[2][1];
297 grads[start+2*n_curls+1][1][1] = -monoval[0][0] * monoval_jplus[1][1] * monoval_i[2][1];
298 grads[start+2*n_curls+1][1][2] = -monoval[0][0] * monoval_jplus[1][0] * monoval_i[2][2];
299 grads[start+2*n_curls+1][2][0] = monoval[0][1] * monoval_j[1][0] * monoval_i[2][0] *
static_cast<double>(j + my_degree + 2);
300 grads[start+2*n_curls+1][2][1] = monoval[0][0] * monoval_j[1][1] * monoval_i[2][0] *
static_cast<double>(j + my_degree + 2);
301 grads[start+2*n_curls+1][2][2] = monoval[0][0] * monoval_j[1][0] * monoval_i[2][1] *
static_cast<double>(j + my_degree + 2);
305 if (grad_grads.size() != 0)
307 grad_grads[start][0][0][0] = monoval_i[0][2] * monoval_j[1][0] * monoval[2][0] *
static_cast<double>(j + my_degree + 2);
308 grad_grads[start][0][0][1] = monoval_i[0][1] * monoval_j[1][1] * monoval[2][0] *
static_cast<double>(j + my_degree + 2);
309 grad_grads[start][0][0][2] = monoval_i[0][1] * monoval_j[1][0] * monoval[2][1] *
static_cast<double>(j + my_degree + 2);
310 grad_grads[start][0][1][0] = monoval_i[0][1] * monoval_j[1][1] * monoval[2][0] *
static_cast<double>(j + my_degree + 2);
311 grad_grads[start][0][1][1] = monoval_i[0][0] * monoval_j[1][2] * monoval[2][0] *
static_cast<double>(j + my_degree + 2);
312 grad_grads[start][0][1][2] = monoval_i[0][0] * monoval_j[1][1] * monoval[2][1] *
static_cast<double>(j + my_degree + 2);
313 grad_grads[start][0][2][0] = monoval_i[0][1] * monoval_j[1][0] * monoval[2][1] *
static_cast<double>(j + my_degree + 2);
314 grad_grads[start][0][2][1] = monoval_i[0][0] * monoval_j[1][1] * monoval[2][1] *
static_cast<double>(j + my_degree + 2);
315 grad_grads[start][0][2][2] = monoval_i[0][0] * monoval_j[1][0] * monoval[2][2] *
static_cast<double>(j + my_degree + 2);
316 grad_grads[start][1][0][0] = -monoval_i[0][3] * monoval_jplus[1][0] * monoval[2][0];
317 grad_grads[start][1][0][1] = -monoval_i[0][2] * monoval_jplus[1][1] * monoval[2][0];
318 grad_grads[start][1][0][2] = -monoval_i[0][2] * monoval_jplus[1][0] * monoval[2][1];
319 grad_grads[start][1][1][0] = -monoval_i[0][2] * monoval_jplus[1][1] * monoval[2][0];
320 grad_grads[start][1][1][1] = -monoval_i[0][1] * monoval_jplus[1][2] * monoval[2][0];
321 grad_grads[start][1][1][2] = -monoval_i[0][1] * monoval_jplus[1][1] * monoval[2][1];
322 grad_grads[start][1][2][0] = -monoval_i[0][2] * monoval_jplus[1][0] * monoval[2][1];
323 grad_grads[start][1][2][1] = -monoval_i[0][1] * monoval_jplus[1][1] * monoval[2][1];
324 grad_grads[start][1][2][2] = -monoval_i[0][1] * monoval_jplus[1][0] * monoval[2][2];
325 grad_grads[start][2][0][0] = -monoval_i[0][3] * monoval_j[1][0] * monoval_plus[2][0];
326 grad_grads[start][2][0][1] = -monoval_i[0][2] * monoval_j[1][1] * monoval_plus[2][0];
327 grad_grads[start][2][0][2] = -monoval_i[0][2] * monoval_j[1][0] * monoval_plus[2][1];
328 grad_grads[start][2][1][0] = -monoval_i[0][2] * monoval_j[1][1] * monoval_plus[2][0];
329 grad_grads[start][2][1][1] = -monoval_i[0][1] * monoval_j[1][2] * monoval_plus[2][0];
330 grad_grads[start][2][1][2] = -monoval_i[0][1] * monoval_j[1][1] * monoval_plus[2][1];
331 grad_grads[start][2][2][0] = -monoval_i[0][2] * monoval_j[1][0] * monoval_plus[2][1];
332 grad_grads[start][2][2][1] = -monoval_i[0][1] * monoval_j[1][1] * monoval_plus[2][1];
333 grad_grads[start][2][2][2] = -monoval_i[0][1] * monoval_j[1][0] * monoval_plus[2][2];
335 grad_grads[start+n_curls][0][0][0] = -monoval_jplus[0][2] * monoval_i[1][1] * monoval[2][0];
336 grad_grads[start+n_curls][0][0][1] = -monoval_jplus[0][1] * monoval_i[1][2] * monoval[2][0];
337 grad_grads[start+n_curls][0][0][2] = -monoval_jplus[0][1] * monoval_i[1][1] * monoval[2][1];
338 grad_grads[start+n_curls][0][1][0] = -monoval_jplus[0][1] * monoval_i[1][2] * monoval[2][0];
339 grad_grads[start+n_curls][0][1][1] = -monoval_jplus[0][0] * monoval_i[1][3] * monoval[2][0];
340 grad_grads[start+n_curls][0][1][2] = -monoval_jplus[0][0] * monoval_i[1][2] * monoval[2][1];
341 grad_grads[start+n_curls][0][2][0] = -monoval_jplus[0][1] * monoval_i[1][1] * monoval[2][1];
342 grad_grads[start+n_curls][0][2][1] = -monoval_jplus[0][0] * monoval_i[1][2] * monoval[2][1];
343 grad_grads[start+n_curls][0][2][2] = -monoval_jplus[0][0] * monoval_i[1][1] * monoval[2][2];
344 grad_grads[start+n_curls][1][0][0] = monoval_j[0][2] * monoval_i[1][0] * monoval[2][0] *
static_cast<double>(j + my_degree + 2);
345 grad_grads[start+n_curls][1][0][1] = monoval_j[0][1] * monoval_i[1][1] * monoval[2][0] *
static_cast<double>(j + my_degree + 2);
346 grad_grads[start+n_curls][1][0][2] = monoval_j[0][1] * monoval_i[1][0] * monoval[2][1] *
static_cast<double>(j + my_degree + 2);
347 grad_grads[start+n_curls][1][1][0] = monoval_j[0][1] * monoval_i[1][1] * monoval[2][0] *
static_cast<double>(j + my_degree + 2);
348 grad_grads[start+n_curls][1][1][1] = monoval_j[0][0] * monoval_i[1][2] * monoval[2][0] *
static_cast<double>(j + my_degree + 2);
349 grad_grads[start+n_curls][1][1][2] = monoval_j[0][0] * monoval_i[1][1] * monoval[2][1] *
static_cast<double>(j + my_degree + 2);
350 grad_grads[start+n_curls][1][2][0] = monoval_j[0][1] * monoval_i[1][0] * monoval[2][1] *
static_cast<double>(j + my_degree + 2);
351 grad_grads[start+n_curls][1][2][1] = monoval_j[0][0] * monoval_i[1][1] * monoval[2][1] *
static_cast<double>(j + my_degree + 2);
352 grad_grads[start+n_curls][1][2][2] = monoval_j[0][0] * monoval_i[1][0] * monoval[2][2] *
static_cast<double>(j + my_degree + 2);
353 grad_grads[start+n_curls][2][0][0] = -monoval_j[0][2] * monoval_i[1][1] * monoval_plus[2][0];
354 grad_grads[start+n_curls][2][0][1] = -monoval_j[0][1] * monoval_i[1][2] * monoval_plus[2][0];
355 grad_grads[start+n_curls][2][0][2] = -monoval_j[0][1] * monoval_i[1][1] * monoval_plus[2][1];
356 grad_grads[start+n_curls][2][1][0] = -monoval_j[0][1] * monoval_i[1][2] * monoval_plus[2][0];
357 grad_grads[start+n_curls][2][1][1] = -monoval_j[0][0] * monoval_i[1][3] * monoval_plus[2][0];
358 grad_grads[start+n_curls][2][1][2] = -monoval_j[0][0] * monoval_i[1][2] * monoval_plus[2][1];
359 grad_grads[start+n_curls][2][2][0] = -monoval_j[0][1] * monoval_i[1][1] * monoval_plus[2][1];
360 grad_grads[start+n_curls][2][2][1] = -monoval_j[0][0] * monoval_i[1][2] * monoval_plus[2][1];
361 grad_grads[start+n_curls][2][2][2] = -monoval_j[0][0] * monoval_i[1][1] * monoval_plus[2][2];
363 grad_grads[start+2*n_curls][0][0][0] = -monoval_jplus[0][2] * monoval[1][0] * monoval_i[2][1];
364 grad_grads[start+2*n_curls][0][0][1] = -monoval_jplus[0][1] * monoval[1][1] * monoval_i[2][1];
365 grad_grads[start+2*n_curls][0][0][2] = -monoval_jplus[0][1] * monoval[1][0] * monoval_i[2][2];
366 grad_grads[start+2*n_curls][0][1][0] = -monoval_jplus[0][1] * monoval[1][1] * monoval_i[2][1];
367 grad_grads[start+2*n_curls][0][1][1] = -monoval_jplus[0][0] * monoval[1][2] * monoval_i[2][1];
368 grad_grads[start+2*n_curls][0][1][2] = -monoval_jplus[0][0] * monoval[1][1] * monoval_i[2][2];
369 grad_grads[start+2*n_curls][0][2][0] = -monoval_jplus[0][1] * monoval[1][0] * monoval_i[2][2];
370 grad_grads[start+2*n_curls][0][2][1] = -monoval_jplus[0][0] * monoval[1][1] * monoval_i[2][2];
371 grad_grads[start+2*n_curls][0][2][2] = -monoval_jplus[0][0] * monoval[1][0] * monoval_i[2][3];
372 grad_grads[start+2*n_curls][1][0][0] = -monoval_j[0][2] * monoval_plus[1][0] * monoval_i[2][1];
373 grad_grads[start+2*n_curls][1][0][1] = -monoval_j[0][1] * monoval_plus[1][1] * monoval_i[2][1];
374 grad_grads[start+2*n_curls][1][0][2] = -monoval_j[0][1] * monoval_plus[1][0] * monoval_i[2][2];
375 grad_grads[start+2*n_curls][1][1][0] = -monoval_j[0][1] * monoval_plus[1][1] * monoval_i[2][1];
376 grad_grads[start+2*n_curls][1][1][1] = -monoval_j[0][0] * monoval_plus[1][2] * monoval_i[2][1];
377 grad_grads[start+2*n_curls][1][1][2] = -monoval_j[0][0] * monoval_plus[1][1] * monoval_i[2][2];
378 grad_grads[start+2*n_curls][1][2][0] = -monoval_j[0][1] * monoval_plus[1][0] * monoval_i[2][2];
379 grad_grads[start+2*n_curls][1][2][1] = -monoval_j[0][0] * monoval_plus[1][1] * monoval_i[2][2];
380 grad_grads[start+2*n_curls][1][2][2] = -monoval_j[0][0] * monoval_plus[1][0] * monoval_i[2][3];
381 grad_grads[start+2*n_curls][2][0][0] = monoval_j[0][2] * monoval[1][0] * monoval_i[2][0] *
static_cast<double>(j + my_degree + 2);
382 grad_grads[start+2*n_curls][2][0][1] = monoval_j[0][1] * monoval[1][1] * monoval_i[2][0] *
static_cast<double>(j + my_degree + 2);
383 grad_grads[start+2*n_curls][2][0][2] = monoval_j[0][1] * monoval[1][0] * monoval_i[2][1] *
static_cast<double>(j + my_degree + 2);
384 grad_grads[start+2*n_curls][2][1][0] = monoval_j[0][1] * monoval[1][1] * monoval_i[2][0] *
static_cast<double>(j + my_degree + 2);
385 grad_grads[start+2*n_curls][2][1][1] = monoval_j[0][0] * monoval[1][2] * monoval_i[2][0] *
static_cast<double>(j + my_degree + 2);
386 grad_grads[start+2*n_curls][2][1][2] = monoval_j[0][0] * monoval[1][1] * monoval_i[2][1] *
static_cast<double>(j + my_degree + 2);
387 grad_grads[start+2*n_curls][2][2][0] = monoval_j[0][1] * monoval[1][0] * monoval_i[2][1] *
static_cast<double>(j + my_degree + 2);
388 grad_grads[start+2*n_curls][2][2][1] = monoval_j[0][0] * monoval[1][1] * monoval_i[2][1] *
static_cast<double>(j + my_degree + 2);
389 grad_grads[start+2*n_curls][2][2][2] = monoval_j[0][0] * monoval[1][0] * monoval_i[2][2] *
static_cast<double>(j + my_degree + 2);
393 grad_grads[start+1][0][0][0] = monoval_i[0][2] * monoval[1][0] * monoval_j[2][0] *
static_cast<double>(j + my_degree + 2);
394 grad_grads[start+1][0][0][1] = monoval_i[0][1] * monoval[1][1] * monoval_j[2][0] *
static_cast<double>(j + my_degree + 2);
395 grad_grads[start+1][0][0][2] = monoval_i[0][1] * monoval[1][0] * monoval_j[2][1] *
static_cast<double>(j + my_degree + 2);
396 grad_grads[start+1][0][1][0] = monoval_i[0][1] * monoval[1][1] * monoval_j[2][0] *
static_cast<double>(j + my_degree + 2);
397 grad_grads[start+1][0][1][1] = monoval_i[0][0] * monoval[1][2] * monoval_j[2][0] *
static_cast<double>(j + my_degree + 2);
398 grad_grads[start+1][0][1][2] = monoval_i[0][0] * monoval[1][1] * monoval_j[2][1] *
static_cast<double>(j + my_degree + 2);
399 grad_grads[start+1][0][2][0] = monoval_i[0][1] * monoval[1][0] * monoval_j[2][1] *
static_cast<double>(j + my_degree + 2);
400 grad_grads[start+1][0][2][1] = monoval_i[0][0] * monoval[1][1] * monoval_j[2][1] *
static_cast<double>(j + my_degree + 2);
401 grad_grads[start+1][0][2][2] = monoval_i[0][0] * monoval[1][0] * monoval_j[2][2] *
static_cast<double>(j + my_degree + 2);
402 grad_grads[start+1][1][0][0] = -monoval_i[0][3] * monoval_plus[1][0] * monoval_j[2][0];
403 grad_grads[start+1][1][0][1] = -monoval_i[0][2] * monoval_plus[1][1] * monoval_j[2][0];
404 grad_grads[start+1][1][0][2] = -monoval_i[0][2] * monoval_plus[1][0] * monoval_j[2][1];
405 grad_grads[start+1][1][1][0] = -monoval_i[0][2] * monoval_plus[1][1] * monoval_j[2][0];
406 grad_grads[start+1][1][1][1] = -monoval_i[0][1] * monoval_plus[1][2] * monoval_j[2][0];
407 grad_grads[start+1][1][1][2] = -monoval_i[0][1] * monoval_plus[1][1] * monoval_j[2][1];
408 grad_grads[start+1][1][2][0] = -monoval_i[0][2] * monoval_plus[1][0] * monoval_j[2][1];
409 grad_grads[start+1][1][2][1] = -monoval_i[0][1] * monoval_plus[1][1] * monoval_j[2][1];
410 grad_grads[start+1][1][2][2] = -monoval_i[0][1] * monoval_plus[1][0] * monoval_j[2][2];
411 grad_grads[start+1][2][0][0] = -monoval_i[0][3] * monoval[1][0] * monoval_jplus[2][0];
412 grad_grads[start+1][2][0][1] = -monoval_i[0][2] * monoval[1][1] * monoval_jplus[2][0];
413 grad_grads[start+1][2][0][2] = -monoval_i[0][2] * monoval[1][0] * monoval_jplus[2][1];
414 grad_grads[start+1][2][1][0] = -monoval_i[0][2] * monoval[1][1] * monoval_jplus[2][0];
415 grad_grads[start+1][2][1][1] = -monoval_i[0][1] * monoval[1][2] * monoval_jplus[2][0];
416 grad_grads[start+1][2][1][2] = -monoval_i[0][1] * monoval[1][1] * monoval_jplus[2][1];
417 grad_grads[start+1][2][2][0] = -monoval_i[0][2] * monoval[1][0] * monoval_jplus[2][1];
418 grad_grads[start+1][2][2][1] = -monoval_i[0][1] * monoval[1][1] * monoval_jplus[2][1];
419 grad_grads[start+1][2][2][2] = -monoval_i[0][1] * monoval[1][0] * monoval_jplus[2][2];
421 grad_grads[start+n_curls+1][0][0][0] = -monoval_plus[0][2] * monoval_i[1][1] * monoval_j[2][0];
422 grad_grads[start+n_curls+1][0][0][1] = -monoval_plus[0][1] * monoval_i[1][2] * monoval_j[2][0];
423 grad_grads[start+n_curls+1][0][0][2] = -monoval_plus[0][1] * monoval_i[1][1] * monoval_j[2][1];
424 grad_grads[start+n_curls+1][0][1][0] = -monoval_plus[0][1] * monoval_i[1][2] * monoval_j[2][0];
425 grad_grads[start+n_curls+1][0][1][1] = -monoval_plus[0][0] * monoval_i[1][3] * monoval_j[2][0];
426 grad_grads[start+n_curls+1][0][1][2] = -monoval_plus[0][0] * monoval_i[1][2] * monoval_j[2][1];
427 grad_grads[start+n_curls+1][0][2][0] = -monoval_plus[0][1] * monoval_i[1][1] * monoval_j[2][1];
428 grad_grads[start+n_curls+1][0][2][1] = -monoval_plus[0][0] * monoval_i[1][2] * monoval_j[2][1];
429 grad_grads[start+n_curls+1][0][2][2] = -monoval_plus[0][0] * monoval_i[1][1] * monoval_j[2][2];
430 grad_grads[start+n_curls+1][1][0][0] = monoval[0][2] * monoval_i[1][0] * monoval_j[2][0] *
static_cast<double>(j + my_degree + 2);
431 grad_grads[start+n_curls+1][1][0][1] = monoval[0][1] * monoval_i[1][1] * monoval_j[2][0] *
static_cast<double>(j + my_degree + 2);
432 grad_grads[start+n_curls+1][1][0][2] = monoval[0][1] * monoval_i[1][0] * monoval_j[2][1] *
static_cast<double>(j + my_degree + 2);
433 grad_grads[start+n_curls+1][1][1][0] = monoval[0][1] * monoval_i[1][1] * monoval_j[2][0] *
static_cast<double>(j + my_degree + 2);
434 grad_grads[start+n_curls+1][1][1][1] = monoval[0][0] * monoval_i[1][2] * monoval_j[2][0] *
static_cast<double>(j + my_degree + 2);
435 grad_grads[start+n_curls+1][1][1][2] = monoval[0][0] * monoval_i[1][1] * monoval_j[2][1] *
static_cast<double>(j + my_degree + 2);
436 grad_grads[start+n_curls+1][1][2][0] = monoval[0][1] * monoval_i[1][0] * monoval_j[2][1] *
static_cast<double>(j + my_degree + 2);
437 grad_grads[start+n_curls+1][1][2][1] = monoval[0][0] * monoval_i[1][1] * monoval_j[2][1] *
static_cast<double>(j + my_degree + 2);
438 grad_grads[start+n_curls+1][1][2][2] = monoval[0][0] * monoval_i[1][0] * monoval_j[2][2] *
static_cast<double>(j + my_degree + 2);
439 grad_grads[start+n_curls+1][2][0][0] = -monoval[0][2] * monoval_i[1][1] * monoval_jplus[2][0];
440 grad_grads[start+n_curls+1][2][0][1] = -monoval[0][1] * monoval_i[1][2] * monoval_jplus[2][0];
441 grad_grads[start+n_curls+1][2][0][2] = -monoval[0][1] * monoval_i[1][1] * monoval_jplus[2][1];
442 grad_grads[start+n_curls+1][2][1][0] = -monoval[0][1] * monoval_i[1][2] * monoval_jplus[2][0];
443 grad_grads[start+n_curls+1][2][1][1] = -monoval[0][0] * monoval_i[1][3] * monoval_jplus[2][0];
444 grad_grads[start+n_curls+1][2][1][2] = -monoval[0][0] * monoval_i[1][2] * monoval_jplus[2][1];
445 grad_grads[start+n_curls+1][2][2][0] = -monoval[0][1] * monoval_i[1][1] * monoval_jplus[2][1];
446 grad_grads[start+n_curls+1][2][2][1] = -monoval[0][0] * monoval_i[1][2] * monoval_jplus[2][1];
447 grad_grads[start+n_curls+1][2][2][2] = -monoval[0][0] * monoval_i[1][1] * monoval_jplus[2][2];
449 grad_grads[start+2*n_curls+1][0][0][0] = -monoval_plus[0][2] * monoval_j[1][0] * monoval_i[2][1];
450 grad_grads[start+2*n_curls+1][0][0][1] = -monoval_plus[0][1] * monoval_j[1][1] * monoval_i[2][1];
451 grad_grads[start+2*n_curls+1][0][0][2] = -monoval_plus[0][1] * monoval_j[1][0] * monoval_i[2][2];
452 grad_grads[start+2*n_curls+1][0][1][0] = -monoval_plus[0][1] * monoval_j[1][1] * monoval_i[2][1];
453 grad_grads[start+2*n_curls+1][0][1][1] = -monoval_plus[0][0] * monoval_j[1][2] * monoval_i[2][1];
454 grad_grads[start+2*n_curls+1][0][1][2] = -monoval_plus[0][0] * monoval_j[1][1] * monoval_i[2][2];
455 grad_grads[start+2*n_curls+1][0][2][0] = -monoval_plus[0][1] * monoval_j[1][0] * monoval_i[2][2];
456 grad_grads[start+2*n_curls+1][0][2][1] = -monoval_plus[0][0] * monoval_j[1][1] * monoval_i[2][2];
457 grad_grads[start+2*n_curls+1][0][2][2] = -monoval_plus[0][0] * monoval_j[1][0] * monoval_i[2][3];
458 grad_grads[start+2*n_curls+1][1][0][0] = -monoval[0][2] * monoval_jplus[1][0] * monoval_i[2][1];
459 grad_grads[start+2*n_curls+1][1][0][1] = -monoval[0][1] * monoval_jplus[1][1] * monoval_i[2][1];
460 grad_grads[start+2*n_curls+1][1][0][2] = -monoval[0][1] * monoval_jplus[1][0] * monoval_i[2][2];
461 grad_grads[start+2*n_curls+1][1][1][0] = -monoval[0][1] * monoval_jplus[1][1] * monoval_i[2][1];
462 grad_grads[start+2*n_curls+1][1][1][1] = -monoval[0][0] * monoval_jplus[1][2] * monoval_i[2][1];
463 grad_grads[start+2*n_curls+1][1][1][2] = -monoval[0][0] * monoval_jplus[1][1] * monoval_i[2][2];
464 grad_grads[start+2*n_curls+1][1][2][0] = -monoval[0][1] * monoval_jplus[1][0] * monoval_i[2][2];
465 grad_grads[start+2*n_curls+1][1][2][1] = -monoval[0][0] * monoval_jplus[1][1] * monoval_i[2][2];
466 grad_grads[start+2*n_curls+1][1][2][2] = -monoval[0][0] * monoval_jplus[1][0] * monoval_i[2][3];
467 grad_grads[start+2*n_curls+1][2][0][0] = monoval[0][2] * monoval_j[1][0] * monoval_i[2][0] *
static_cast<double>(j + my_degree + 2);
468 grad_grads[start+2*n_curls+1][2][0][1] = monoval[0][1] * monoval_j[1][1] * monoval_i[2][0] *
static_cast<double>(j + my_degree + 2);
469 grad_grads[start+2*n_curls+1][2][0][2] = monoval[0][1] * monoval_j[1][0] * monoval_i[2][1] *
static_cast<double>(j + my_degree + 2);
470 grad_grads[start+2*n_curls+1][2][1][0] = monoval[0][1] * monoval_j[1][1] * monoval_i[2][0] *
static_cast<double>(j + my_degree + 2);
471 grad_grads[start+2*n_curls+1][2][1][1] = monoval[0][0] * monoval_j[1][2] * monoval_i[2][0] *
static_cast<double>(j + my_degree + 2);
472 grad_grads[start+2*n_curls+1][2][1][2] = monoval[0][0] * monoval_j[1][1] * monoval_i[2][1] *
static_cast<double>(j + my_degree + 2);
473 grad_grads[start+2*n_curls+1][2][2][0] = monoval[0][1] * monoval_j[1][0] * monoval_i[2][1] *
static_cast<double>(j + my_degree + 2);
474 grad_grads[start+2*n_curls+1][2][2][1] = monoval[0][0] * monoval_j[1][1] * monoval_i[2][1] *
static_cast<double>(j + my_degree + 2);
475 grad_grads[start+2*n_curls+1][2][2][2] = monoval[0][0] * monoval_j[1][0] * monoval_i[2][2] *
static_cast<double>(j + my_degree + 2);
495 if (dim == 1 || dim == 2 || dim == 3)
496 return dim * Utilities::fixed_power<dim>(k+1);
508 DEAL_II_NAMESPACE_CLOSE
static unsigned int compute_n_pols(const unsigned int degree)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
PolynomialsRT_Bubbles(const unsigned int k)
#define Assert(cond, exc)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcNotImplemented()
void compute(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
std::vector< Polynomials::Polynomial< double > > monomials
static ::ExceptionBase & ExcInternalError()