16 #include <deal.II/base/geometry_info.h> 17 #include <deal.II/base/quadrature_lib.h> 18 #include <deal.II/base/polynomial.h> 19 #include <deal.II/base/polynomials_nedelec.h> 23 DEAL_II_NAMESPACE_OPEN
28 my_degree (k), polynomial_space (create_polynomials (k)),
29 n_pols (compute_n_pols (k))
34 std::vector<std::vector< Polynomials::Polynomial<double> > >
37 std::vector<std::vector< Polynomials::Polynomial<double> > > pols (dim);
41 for (
unsigned int i = 1; i < dim; ++i)
60 Assert(values.size () == n_pols || values.size () == 0,
62 Assert(grads.size () == n_pols || grads.size () == 0,
64 Assert(grad_grads.size () == n_pols || grad_grads.size () == 0,
66 Assert(third_derivatives.size () == n_pols || third_derivatives.size () == 0,
68 Assert(fourth_derivatives.size () == n_pols || fourth_derivatives.size () == 0,
72 (void)third_derivatives;
73 Assert(third_derivatives.size () == 0,
75 (void)fourth_derivatives;
76 Assert(fourth_derivatives.size () == 0,
83 const unsigned int &n_basis = polynomial_space.n ();
84 std::vector<double> unit_point_values ((values.size () == 0) ? 0 : n_basis);
85 std::vector<Tensor<1, dim> >
86 unit_point_grads ((grads.size () == 0) ? 0 : n_basis);
87 std::vector<Tensor<2, dim> >
88 unit_point_grad_grads ((grad_grads.size () == 0) ? 0 : n_basis);
89 std::vector<Tensor<3, dim> > empty_vector_of_3rd_order_tensors;
90 std::vector<Tensor<4, dim> > empty_vector_of_4th_order_tensors;
96 polynomial_space.compute (unit_point, unit_point_values,
97 unit_point_grads, unit_point_grad_grads,
98 empty_vector_of_3rd_order_tensors,
99 empty_vector_of_4th_order_tensors);
103 if (values.size () > 0)
104 for (
unsigned int i = 0; i < unit_point_values.size (); ++i)
105 values[i][0] = unit_point_values[i];
107 if (grads.size () > 0)
108 for (
unsigned int i = 0; i < unit_point_grads.size (); ++i)
109 grads[i][0][0] = unit_point_grads[i][0];
111 if (grad_grads.size () > 0)
112 for (
unsigned int i = 0; i < unit_point_grad_grads.size (); ++i)
113 grad_grads[i][0][0][0] = unit_point_grad_grads[i][0][0];
120 polynomial_space.compute (unit_point, unit_point_values,
121 unit_point_grads, unit_point_grad_grads,
122 empty_vector_of_3rd_order_tensors,
123 empty_vector_of_4th_order_tensors);
132 p (0) = unit_point (1);
133 p (1) = unit_point (0);
135 std::vector<double> p_values ((values.size () == 0) ? 0 : n_basis);
136 std::vector<Tensor<1, dim> >
137 p_grads ((grads.size () == 0) ? 0 : n_basis);
138 std::vector<Tensor<2, dim> >
139 p_grad_grads ((grad_grads.size () == 0) ? 0 : n_basis);
141 polynomial_space.compute (p, p_values, p_grads, p_grad_grads,
142 empty_vector_of_3rd_order_tensors,
143 empty_vector_of_4th_order_tensors);
147 if (values.size () > 0)
149 for (
unsigned int i = 0; i <= my_degree; ++i)
150 for (
unsigned int j = 0; j < 2; ++j)
152 values[i + j * (my_degree + 1)][0] = 0.0;
153 values[i + j * (my_degree + 1)][1]
154 = p_values[i + j * (my_degree + 1)];
155 values[i + (j + 2) * (my_degree + 1)][0]
156 = unit_point_values[i + j * (my_degree + 1)];
157 values[i + (j + 2) * (my_degree + 1)][1] = 0.0;
161 for (
unsigned int i = 0; i <= my_degree; ++i)
162 for (
unsigned int j = 0; j < my_degree; ++j)
166 = unit_point_values[i + (j + 2) * (my_degree + 1)];
169 values[i + (j + my_degree
171 * (my_degree + 1)][0] = 0.0;
172 values[i + (j + my_degree
174 * (my_degree + 1)][1]
175 = p_values[i + (j + 2) * (my_degree + 1)];
179 if (grads.size () > 0)
181 for (
unsigned int i = 0; i <= my_degree; ++i)
182 for (
unsigned int j = 0; j < 2; ++j)
184 for (
unsigned int k = 0; k < dim; ++k)
186 grads[i + j * (my_degree + 1)][0][k] = 0.0;
187 grads[i + (j + 2) * (my_degree + 1)][0][k]
188 = unit_point_grads[i + j * (my_degree + 1)][k];
189 grads[i + (j + 2) * (my_degree + 1)][1][k] = 0.0;
192 grads[i + j * (my_degree + 1)][1][0]
193 = p_grads[i + j * (my_degree + 1)][1];
194 grads[i + j * (my_degree + 1)][1][1]
195 = p_grads[i + j * (my_degree + 1)][0];
199 for (
unsigned int i = 0; i <= my_degree; ++i)
200 for (
unsigned int j = 0; j < my_degree; ++j)
202 for (
unsigned int k = 0; k < dim; ++k)
207 = unit_point_grads[i + (j + 2) * (my_degree + 1)]
213 grads[i + (j + my_degree
215 * (my_degree + 1)][0][k] = 0.0;
218 grads[i + (j + my_degree
220 * (my_degree + 1)][1][0]
221 = p_grads[i + (j + 2) * (my_degree + 1)][1];
222 grads[i + (j + my_degree
224 * (my_degree + 1)][1][1]
225 = p_grads[i + (j + 2) * (my_degree + 1)][0];
229 if (grad_grads.size () > 0)
231 for (
unsigned int i = 0; i <= my_degree; ++i)
232 for (
unsigned int j = 0; j < 2; ++j)
234 for (
unsigned int k = 0; k < dim; ++k)
235 for (
unsigned int l = 0; l < dim; ++l)
237 grad_grads[i + j * (my_degree + 1)][0][k][l] = 0.0;
238 grad_grads[i + (j + 2) * (my_degree + 1)][0][k][l]
239 = unit_point_grad_grads[i + j * (my_degree + 1)][k]
241 grad_grads[i + (j + 2) * (my_degree + 1)][1][k][l]
245 grad_grads[i + j * (my_degree + 1)][1][0][0]
246 = p_grad_grads[i + j * (my_degree + 1)][1][1];
247 grad_grads[i + j * (my_degree + 1)][1][0][1]
248 = p_grad_grads[i + j * (my_degree + 1)][1][0];
249 grad_grads[i + j * (my_degree + 1)][1][1][0]
250 = p_grad_grads[i + j * (my_degree + 1)][0][1];
251 grad_grads[i + j * (my_degree + 1)][1][1][1]
252 = p_grad_grads[i + j * (my_degree + 1)][0][0];
256 for (
unsigned int i = 0; i <= my_degree; ++i)
257 for (
unsigned int j = 0; j < my_degree; ++j)
259 for (
unsigned int k = 0; k < dim; ++k)
260 for (
unsigned int l = 0; l < dim; ++l)
266 = unit_point_grad_grads[i + (j + 2)
267 * (my_degree + 1)][k][l];
272 grad_grads[i + (j + my_degree
274 * (my_degree + 1)][0][k][l] = 0.0;
277 grad_grads[i + (j + my_degree
279 * (my_degree + 1)][1][0][0]
280 = p_grad_grads[i + (j + 2) * (my_degree + 1)][1][1];
281 grad_grads[i + (j + my_degree
283 * (my_degree + 1)][1][0][1]
284 = p_grad_grads[i + (j + 2) * (my_degree + 1)][1][0];
285 grad_grads[i + (j + my_degree
287 * (my_degree + 1)][1][1][0]
288 = p_grad_grads[i + (j + 2) * (my_degree + 1)][0][1];
289 grad_grads[i + (j + my_degree
291 * (my_degree + 1)][1][1][1]
292 = p_grad_grads[i + (j + 2) * (my_degree + 1)][0][0];
301 polynomial_space.compute (unit_point, unit_point_values,
302 unit_point_grads, unit_point_grad_grads,
303 empty_vector_of_3rd_order_tensors,
304 empty_vector_of_4th_order_tensors);
313 std::vector<double> p1_values ((values.size () == 0) ? 0 : n_basis);
314 std::vector<Tensor<1, dim> >
315 p1_grads ((grads.size () == 0) ? 0 : n_basis);
316 std::vector<Tensor<2, dim> >
317 p1_grad_grads ((grad_grads.size () == 0) ? 0 : n_basis);
318 std::vector<double> p2_values ((values.size () == 0) ? 0 : n_basis);
319 std::vector<Tensor<1, dim> >
320 p2_grads ((grads.size () == 0) ? 0 : n_basis);
321 std::vector<Tensor<2, dim> >
322 p2_grad_grads ((grad_grads.size () == 0) ? 0 : n_basis);
324 p1 (0) = unit_point (1);
325 p1 (1) = unit_point (2);
326 p1 (2) = unit_point (0);
327 polynomial_space.compute (p1, p1_values, p1_grads, p1_grad_grads,
328 empty_vector_of_3rd_order_tensors,
329 empty_vector_of_4th_order_tensors);
330 p2 (0) = unit_point (2);
331 p2 (1) = unit_point (0);
332 p2 (2) = unit_point (1);
333 polynomial_space.compute (p2, p2_values, p2_grads, p2_grad_grads,
334 empty_vector_of_3rd_order_tensors,
335 empty_vector_of_4th_order_tensors);
339 if (values.size () > 0)
341 for (
unsigned int i = 0; i <= my_degree; ++i)
343 for (
unsigned int j = 0; j < 2; ++j)
345 for (
unsigned int k = 0; k < 2; ++k)
347 for (
unsigned int l = 0; l < 2; ++l)
349 values[i + (j + 4 * k) * (my_degree + 1)][2 * l]
351 values[i + (j + 4 * k + 2) * (my_degree + 1)]
353 values[i + (j + 2 * (k + 4)) * (my_degree + 1)][l]
357 values[i + (j + 4 * k + 2) * (my_degree + 1)][0]
358 = unit_point_values[i + (j + k * (my_degree + 2))
360 values[i + (j + 2 * (k + 4)) * (my_degree + 1)][2]
361 = p2_values[i + (j + k * (my_degree + 2))
365 values[i + j * (my_degree + 1)][1]
366 = p1_values[i + j * (my_degree + 1) * (my_degree + 2)];
369 values[i + 4 * (my_degree + 1)][1]
370 = p1_values[i + my_degree + 1];
371 values[i + 5 * (my_degree + 1)][1]
372 = p1_values[i + (my_degree + 1) * (my_degree + 3)];
376 for (
unsigned int i = 0; i <= my_degree; ++i)
377 for (
unsigned int j = 0; j < my_degree; ++j)
379 for (
unsigned int k = 0; k < my_degree; ++k)
381 for (
unsigned int l = 0; l < 2; ++l)
399 values[i + (j + (k + 2
404 * (my_degree + 1)][l] = 0.0;
413 = unit_point_values[i + (j + (k + 2) * (my_degree
417 + my_degree) * (my_degree + 1)
421 = p1_values[i + ((j + 2) * (my_degree + 2) + k + 2)
423 values[i + (j + (k + 2
428 * (my_degree + 1)][2]
429 = p2_values[i + (j + (k + 2) * (my_degree + 2) + 2)
433 for (
unsigned int k = 0; k < 2; ++k)
435 for (
unsigned int l = 0; l < 2; ++l)
437 for (
unsigned int m = 0; m < 2; ++m)
439 values[i + (j + (2 * (k + 2 * l) + 1)
442 * (my_degree + 1)][m + l] = 0.0;
443 values[(i + 2 * (k + 2 * (l + 1)) * (my_degree
451 values[(i + 2 * k * (my_degree + 1)
456 values[i + (j + (2 * k + 9) * my_degree
458 * (my_degree + 1)][2 * l] = 0.0;
461 values[(i + 2 * k * (my_degree + 1)
465 = p1_values[i + (j + k * (my_degree + 2) + 2)
467 values[i + (j + (2 * k + 1) * my_degree
469 * (my_degree + 1)][2]
470 = p2_values[i + ((j + 2) * (my_degree + 2) + k)
472 values[(i + 2 * (k + 2) * (my_degree + 1)
476 = p2_values[i + (j + k * (my_degree + 2) + 2)
478 values[i + (j + (2 * k + 5) * my_degree
480 * (my_degree + 1)][0]
481 = unit_point_values[i + ((j + 2) * (my_degree + 2) + k)
483 values[(i + 2 * (k + 4) * (my_degree + 1)
487 = unit_point_values[i + (j + k * (my_degree + 2)
488 + 2) * (my_degree + 1)];
489 values[i + (j + (2 * k + 9) * my_degree
491 * (my_degree + 1)][1]
492 = p1_values[i + ((j + 2) * (my_degree + 2) + k)
498 if (grads.size () > 0)
500 for (
unsigned int i = 0; i <= my_degree; ++i)
502 for (
unsigned int j = 0; j < 2; ++j)
504 for (
unsigned int k = 0; k < 2; ++k)
506 for (
unsigned int l = 0; l < 2; ++l)
507 for (
unsigned int m = 0; m < dim; ++m)
509 grads[i + (j + 4 * k) * (my_degree + 1)][2 * l]
511 grads[i + (j + 4 * k + 2) * (my_degree + 1)]
513 grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
517 for (
unsigned int l = 0; l < dim; ++l)
518 grads[i + (j + 4 * k + 2) * (my_degree + 1)][0][l]
519 = unit_point_grads[i + (j + k * (my_degree + 2))
520 * (my_degree + 1)][l];
522 grads[i + (j + 2 * (k + 4)) * (my_degree + 1)][2][0]
523 = p2_grads[i + (j + k * (my_degree + 2))
524 * (my_degree + 1)][1];
525 grads[i + (j + 2 * (k + 4)) * (my_degree + 1)][2][1]
526 = p2_grads[i + (j + k * (my_degree + 2))
527 * (my_degree + 1)][2];
528 grads[i + (j + 2 * (k + 4)) * (my_degree + 1)][2][2]
529 = p2_grads[i + (j + k * (my_degree + 2))
530 * (my_degree + 1)][0];
533 grads[i + j * (my_degree + 1)][1][0]
534 = p1_grads[i + j * (my_degree + 1) * (my_degree + 2)]
536 grads[i + j * (my_degree + 1)][1][1]
537 = p1_grads[i + j * (my_degree + 1) * (my_degree + 2)]
539 grads[i + j * (my_degree + 1)][1][2]
540 = p1_grads[i + j * (my_degree + 1) * (my_degree + 2)]
544 grads[i + 4 * (my_degree + 1)][1][0]
545 = p1_grads[i + my_degree + 1][2];
546 grads[i + 4 * (my_degree + 1)][1][1]
547 = p1_grads[i + my_degree + 1][0];
548 grads[i + 4 * (my_degree + 1)][1][2]
549 = p1_grads[i + my_degree + 1][1];
550 grads[i + 5 * (my_degree + 1)][1][0]
551 = p1_grads[i + (my_degree + 1) * (my_degree + 3)][2];
552 grads[i + 5 * (my_degree + 1)][1][1]
553 = p1_grads[i + (my_degree + 1) * (my_degree + 3)][0];
554 grads[i + 5 * (my_degree + 1)][1][2]
555 = p1_grads[i + (my_degree + 1) * (my_degree + 3)][1];
559 for (
unsigned int i = 0; i <= my_degree; ++i)
560 for (
unsigned int j = 0; j < my_degree; ++j)
562 for (
unsigned int k = 0; k < my_degree; ++k)
564 for (
unsigned int l = 0; l < dim; ++l)
566 for (
unsigned int m = 0; m < 2; ++m)
579 + my_degree) * (my_degree + 1)
584 grads[i + (j + (k + 2
586 + my_degree)) * my_degree
588 * (my_degree + 1)][m][l] = 0.0;
597 = unit_point_grads[i + (j + (k + 2)
598 * (my_degree + 2) + 2)
599 * (my_degree + 1)][l];
603 + my_degree) * (my_degree + 1)
607 = p1_grads[i + ((j + 2) * (my_degree + 2) + k + 2)
608 * (my_degree + 1)][2];
610 + my_degree) * (my_degree + 1)
614 = p1_grads[i + ((j + 2) * (my_degree + 2) + k + 2)
615 * (my_degree + 1)][0];
617 + my_degree) * (my_degree + 1)
621 = p1_grads[i + ((j + 2) * (my_degree + 2) + k + 2)
622 * (my_degree + 1)][1];
623 grads[i + (j + (k + 2
625 + my_degree)) * my_degree
627 * (my_degree + 1)][2][0]
628 = p2_grads[i + (j + (k + 2) * (my_degree + 2) + 2)
629 * (my_degree + 1)][1];
630 grads[i + (j + (k + 2
632 + my_degree)) * my_degree
634 * (my_degree + 1)][2][1]
635 = p2_grads[i + (j + (k + 2) * (my_degree + 2) + 2)
636 * (my_degree + 1)][2];
637 grads[i + (j + (k + 2
642 * (my_degree + 1)][2][2]
643 = p2_grads[i + (j + (k + 2) * (my_degree + 2) + 2)
644 * (my_degree + 1)][0];
647 for (
unsigned int k = 0; k < 2; ++k)
649 for (
unsigned int l = 0; l < 2; ++l)
650 for (
unsigned int m = 0; m < dim; ++m)
652 for (
unsigned int n = 0; n < 2; ++n)
654 grads[i + (j + (2 * (k + 2 * l) + 1)
657 * (my_degree + 1)][n + l][m] = 0.0;
658 grads[(i + 2 * (k + 2 * (l + 1))
666 grads[(i + 2 * k * (my_degree + 1)
671 grads[i + (j + (2 * k + 9) * my_degree
673 * (my_degree + 1)][2 * l][m] = 0.0;
676 for (
unsigned int l = 0; l < dim; ++l)
678 grads[i + (j + (2 * k + 5) * my_degree
680 * (my_degree + 1)][0][l]
681 = unit_point_grads[i + ((j + 2) * (my_degree
683 * (my_degree + 1)][l];
684 grads[(i + 2 * (k + 4) * (my_degree + 1)
688 = unit_point_grads[i + (j + k * (my_degree + 2)
689 + 2) * (my_degree + 1)]
693 grads[(i + 2 * k * (my_degree + 1)
697 = p1_grads[i + (j + k * (my_degree + 2) + 2)
698 * (my_degree + 1)][2];
699 grads[(i + 2 * k * (my_degree + 1)
703 = p1_grads[i + (j + k * (my_degree + 2) + 2)
704 * (my_degree + 1)][0];
705 grads[(i + 2 * k * (my_degree + 1)
709 = p1_grads[i + (j + k * (my_degree + 2) + 2)
710 * (my_degree + 1)][1];
711 grads[i + (j + (2 * k + 1) * my_degree
713 * (my_degree + 1)][2][0]
714 = p2_grads[i + ((j + 2) * (my_degree + 2) + k)
715 * (my_degree + 1)][1];
716 grads[i + (j + (2 * k + 1) * my_degree
718 * (my_degree + 1)][2][1]
719 = p2_grads[i + ((j + 2) * (my_degree + 2) + k)
720 * (my_degree + 1)][2];
721 grads[i + (j + (2 * k + 1) * my_degree
723 * (my_degree + 1)][2][2]
724 = p2_grads[i + ((j + 2) * (my_degree + 2) + k)
725 * (my_degree + 1)][0];
726 grads[(i + 2 * (k + 2) * (my_degree + 1)
730 = p2_grads[i + (j + k * (my_degree + 2) + 2)
731 * (my_degree + 1)][1];
732 grads[(i + 2 * (k + 2) * (my_degree + 1)
736 = p2_grads[i + (j + k * (my_degree + 2) + 2)
737 * (my_degree + 1)][2];
738 grads[(i + 2 * (k + 2) * (my_degree + 1)
742 = p2_grads[i + (j + k * (my_degree + 2) + 2)
743 * (my_degree + 1)][0];
744 grads[i + (j + (2 * k + 9) * my_degree
746 * (my_degree + 1)][1][0]
747 = p1_grads[i + ((j + 2) * (my_degree + 2) + k)
748 * (my_degree + 1)][2];
749 grads[i + (j + (2 * k + 9) * my_degree
751 * (my_degree + 1)][1][1]
752 = p1_grads[i + ((j + 2) * (my_degree + 2) + k)
753 * (my_degree + 1)][0];
754 grads[i + (j + (2 * k + 9) * my_degree
756 * (my_degree + 1)][1][2]
757 = p1_grads[i + ((j + 2) * (my_degree + 2) + k)
758 * (my_degree + 1)][1];
763 if (grad_grads.size () > 0)
765 for (
unsigned int i = 0; i <= my_degree; ++i)
767 for (
unsigned int j = 0; j < 2; ++j)
769 for (
unsigned int k = 0; k < 2; ++k)
771 for (
unsigned int l = 0; l < dim; ++l)
772 for (
unsigned int m = 0; m < dim; ++m)
774 for (
unsigned int n = 0; n < 2; ++n)
776 grad_grads[i + (j + 4 * k) * (my_degree
779 grad_grads[i + (j + 4 * k + 2) * (my_degree
782 grad_grads[i + (j + 2 * (k + 4))
783 * (my_degree + 1)][n][l][m]
787 grad_grads[i + (j + 4 * k + 2) * (my_degree
789 = unit_point_grad_grads[i + (j + k
792 * (my_degree + 1)][l]
796 grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
798 = p2_grad_grads[i + (j + k * (my_degree + 2))
799 * (my_degree + 1)][1][1];
800 grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
802 = p2_grad_grads[i + (j + k * (my_degree + 2))
803 * (my_degree + 1)][1][2];
804 grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
806 = p2_grad_grads[i + (j + k * (my_degree + 2))
807 * (my_degree + 1)][1][0];
808 grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
810 = p2_grad_grads[i + (j + k * (my_degree + 2))
811 * (my_degree + 1)][2][1];
812 grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
814 = p2_grad_grads[i + (j + k * (my_degree + 2))
815 * (my_degree + 1)][2][2];
816 grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
818 = p2_grad_grads[i + (j + k * (my_degree + 2))
819 * (my_degree + 1)][2][0];
820 grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
822 = p2_grad_grads[i + (j + k * (my_degree + 2))
823 * (my_degree + 1)][0][1];
824 grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
826 = p2_grad_grads[i + (j + k * (my_degree + 2))
827 * (my_degree + 1)][0][2];
828 grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
830 = p2_grad_grads[i + (j + k * (my_degree + 2))
831 * (my_degree + 1)][0][0];
834 grad_grads[i + j * (my_degree + 1)][1][0][0]
835 = p1_grad_grads[i + j * (my_degree + 1)
836 * (my_degree + 2)][2][2];
837 grad_grads[i + j * (my_degree + 1)][1][0][1]
838 = p1_grad_grads[i + j * (my_degree + 1)
839 * (my_degree + 2)][2][0];
840 grad_grads[i + j * (my_degree + 1)][1][0][2]
841 = p1_grad_grads[i + j * (my_degree + 1)
842 * (my_degree + 2)][2][1];
843 grad_grads[i + j * (my_degree + 1)][1][1][0]
844 = p1_grad_grads[i + j * (my_degree + 1)
845 * (my_degree + 2)][0][2];
846 grad_grads[i + j * (my_degree + 1)][1][1][1]
847 = p1_grad_grads[i + j * (my_degree + 1)
848 * (my_degree + 2)][0][0];
849 grad_grads[i + j * (my_degree + 1)][1][1][2]
850 = p1_grad_grads[i + j * (my_degree + 1)
851 * (my_degree + 2)][0][1];
852 grad_grads[i + j * (my_degree + 1)][1][2][0]
853 = p1_grad_grads[i + j * (my_degree + 1)
854 * (my_degree + 2)][1][2];
855 grad_grads[i + j * (my_degree + 1)][1][2][1]
856 = p1_grad_grads[i + j * (my_degree + 1)
857 * (my_degree + 2)][1][0];
858 grad_grads[i + j * (my_degree + 1)][1][2][2]
859 = p1_grad_grads[i + j * (my_degree + 1)
860 * (my_degree + 2)][1][1];
863 grad_grads[i + 4 * (my_degree + 1)][1][0][0]
864 = p1_grad_grads[i + my_degree + 1][2][2];
865 grad_grads[i + 4 * (my_degree + 1)][1][0][1]
866 = p1_grad_grads[i + my_degree + 1][2][0];
867 grad_grads[i + 4 * (my_degree + 1)][1][0][2]
868 = p1_grad_grads[i + my_degree + 1][2][1];
869 grad_grads[i + 4 * (my_degree + 1)][1][1][0]
870 = p1_grad_grads[i + my_degree + 1][0][2];
871 grad_grads[i + 4 * (my_degree + 1)][1][1][1]
872 = p1_grad_grads[i + my_degree + 1][0][0];
873 grad_grads[i + 4 * (my_degree + 1)][1][1][2]
874 = p1_grad_grads[i + my_degree + 1][0][1];
875 grad_grads[i + 4 * (my_degree + 1)][1][2][0]
876 = p1_grad_grads[i + my_degree + 1][1][2];
877 grad_grads[i + 4 * (my_degree + 1)][1][2][1]
878 = p1_grad_grads[i + my_degree + 1][1][0];
879 grad_grads[i + 4 * (my_degree + 1)][1][2][2]
880 = p1_grad_grads[i + my_degree + 1][1][1];
881 grad_grads[i + 5 * (my_degree + 1)][1][0][0]
882 = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][2]
884 grad_grads[i + 5 * (my_degree + 1)][1][0][1]
885 = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][2]
887 grad_grads[i + 5 * (my_degree + 1)][1][0][2]
888 = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][2]
890 grad_grads[i + 5 * (my_degree + 1)][1][1][0]
891 = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][0]
893 grad_grads[i + 5 * (my_degree + 1)][1][1][1]
894 = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][0]
896 grad_grads[i + 5 * (my_degree + 1)][1][1][2]
897 = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][0]
899 grad_grads[i + 5 * (my_degree + 1)][1][2][0]
900 = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][1]
902 grad_grads[i + 5 * (my_degree + 1)][1][2][1]
903 = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][1]
905 grad_grads[i + 5 * (my_degree + 1)][1][2][2]
906 = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][1]
911 for (
unsigned int i = 0; i <= my_degree; ++i)
912 for (
unsigned int j = 0; j < my_degree; ++j)
914 for (
unsigned int k = 0; k < my_degree; ++k)
916 for (
unsigned int l = 0; l < dim; ++l)
917 for (
unsigned int m = 0; m < dim; ++m)
919 for (
unsigned int n = 0; n < 2; ++n)
930 grad_grads[(i + (j + 2
932 + my_degree) * (my_degree
938 grad_grads[i + (j + (k + 2
943 * (my_degree + 1)][n][l][m]
956 = unit_point_grad_grads[i + (j + (k + 2)
962 grad_grads[(i + (j + 2
970 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
971 + 2) * (my_degree + 1)][2][2];
972 grad_grads[(i + (j + 2
974 + my_degree) * (my_degree + 1)
979 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
980 + 2) * (my_degree + 1)][2][0];
981 grad_grads[(i + (j + 2
983 + my_degree) * (my_degree + 1)
988 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
989 + 2) * (my_degree + 1)][2][1];
990 grad_grads[(i + (j + 2
992 + my_degree) * (my_degree + 1)
997 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
998 + 2) * (my_degree + 1)][0][2];
999 grad_grads[(i + (j + 2
1001 + my_degree) * (my_degree + 1)
1006 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
1007 + 2) * (my_degree + 1)][0][0];
1008 grad_grads[(i + (j + 2
1010 + my_degree) * (my_degree + 1)
1015 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
1016 + 2) * (my_degree + 1)][0][1];
1017 grad_grads[(i + (j + 2
1019 + my_degree) * (my_degree + 1)
1024 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
1025 + 2) * (my_degree + 1)][1][2];
1026 grad_grads[(i + (j + 2
1028 + my_degree) * (my_degree + 1)
1033 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
1034 + 2) * (my_degree + 1)][1][0];
1035 grad_grads[(i + (j + 2
1037 + my_degree) * (my_degree + 1)
1042 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
1043 + 2) * (my_degree + 1)][1][1];
1044 grad_grads[i + (j + (k + 2
1046 + my_degree)) * my_degree
1048 * (my_degree + 1)][2][0][0]
1049 = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
1050 + 2) * (my_degree + 1)][1][1];
1051 grad_grads[i + (j + (k + 2
1053 + my_degree)) * my_degree
1055 * (my_degree + 1)][2][0][1]
1056 = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
1057 + 2) * (my_degree + 1)][1][2];
1058 grad_grads[i + (j + (k + 2
1063 * (my_degree + 1)][2][0][2]
1064 = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
1065 + 2) * (my_degree + 1)][1][0];
1066 grad_grads[i + (j + (k + 2
1071 * (my_degree + 1)][2][1][0]
1072 = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
1073 + 2) * (my_degree + 1)][2][1];
1074 grad_grads[i + (j + (k + 2
1076 + my_degree)) * my_degree
1078 * (my_degree + 1)][2][1][1]
1079 = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
1080 + 2) * (my_degree + 1)][2][2];
1081 grad_grads[i + (j + (k + 2
1083 + my_degree)) * my_degree
1085 * (my_degree + 1)][2][1][2]
1086 = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
1087 + 2) * (my_degree + 1)][2][0];
1088 grad_grads[i + (j + (k + 2
1090 + my_degree)) * my_degree
1092 * (my_degree + 1)][2][2][0]
1093 = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
1094 + 2) * (my_degree + 1)][0][1];
1095 grad_grads[i + (j + (k + 2
1097 + my_degree)) * my_degree
1099 * (my_degree + 1)][2][2][1]
1100 = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
1101 + 2) * (my_degree + 1)][0][2];
1102 grad_grads[i + (j + (k + 2
1104 + my_degree)) * my_degree
1106 * (my_degree + 1)][2][2][2]
1107 = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
1108 + 2) * (my_degree + 1)][0][0];
1111 for (
unsigned int k = 0; k < 2; ++k)
1113 for (
unsigned int l = 0; l < dim; ++l)
1114 for (
unsigned int m = 0; m < dim; ++m)
1116 for (
unsigned int n = 0; n < 2; ++n)
1118 for (
unsigned int o = 0; o < 2; ++o)
1120 grad_grads[i + (j + (2 * (k + 2 * n)
1123 * (my_degree + 1)][o + n][l][m]
1125 grad_grads[(i + 2 * (k + 2 * (n + 1))
1130 [o + k][l][m] = 0.0;
1133 grad_grads[(i + 2 * k * (my_degree + 1)
1137 [2 * n][l][m] = 0.0;
1138 grad_grads[i + (j + (2 * k + 9)
1141 * (my_degree + 1)][2 * n][l][m]
1145 grad_grads[i + (j + (2 * k + 5) * my_degree
1149 = unit_point_grad_grads[i + ((j + 2)
1152 * (my_degree + 1)][l]
1154 grad_grads[(i + 2 * (k + 4) * (my_degree + 1)
1159 = unit_point_grad_grads[i + (j + k
1162 * (my_degree + 1)][l]
1166 grad_grads[(i + 2 * k * (my_degree + 1)
1171 = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
1172 * (my_degree + 1)][2][2];
1173 grad_grads[(i + 2 * k * (my_degree + 1)
1178 = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
1179 * (my_degree + 1)][2][0];
1180 grad_grads[(i + 2 * k * (my_degree + 1)
1185 = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
1186 * (my_degree + 1)][2][1];
1187 grad_grads[(i + 2 * k * (my_degree + 1)
1192 = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
1193 * (my_degree + 1)][0][2];
1194 grad_grads[(i + 2 * k * (my_degree + 1)
1199 = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
1200 * (my_degree + 1)][0][0];
1201 grad_grads[(i + 2 * k * (my_degree + 1)
1206 = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
1207 * (my_degree + 1)][0][1];
1208 grad_grads[(i + 2 * k * (my_degree + 1)
1213 = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
1214 * (my_degree + 1)][1][2];
1215 grad_grads[(i + 2 * k * (my_degree + 1)
1220 = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
1221 * (my_degree + 1)][1][0];
1222 grad_grads[(i + 2 * k * (my_degree + 1)
1227 = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
1228 * (my_degree + 1)][1][1];
1229 grad_grads[i + (j + (2 * k + 1) * my_degree
1231 * (my_degree + 1)][2][0][0]
1232 = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1233 * (my_degree + 1)][1][1];
1234 grad_grads[i + (j + (2 * k + 1) * my_degree
1236 * (my_degree + 1)][2][0][1]
1237 = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1238 * (my_degree + 1)][1][2];
1239 grad_grads[i + (j + (2 * k + 1) * my_degree
1241 * (my_degree + 1)][2][0][2]
1242 = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1243 * (my_degree + 1)][1][0];
1244 grad_grads[i + (j + (2 * k + 1) * my_degree
1246 * (my_degree + 1)][2][1][0]
1247 = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1248 * (my_degree + 1)][2][1];
1249 grad_grads[i + (j + (2 * k + 1) * my_degree
1251 * (my_degree + 1)][2][1][1]
1252 = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1253 * (my_degree + 1)][2][2];
1254 grad_grads[i + (j + (2 * k + 1) * my_degree
1256 * (my_degree + 1)][2][1][2]
1257 = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1258 * (my_degree + 1)][2][0];
1259 grad_grads[i + (j + (2 * k + 1) * my_degree
1261 * (my_degree + 1)][2][2][0]
1262 = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1263 * (my_degree + 1)][0][1];
1264 grad_grads[i + (j + (2 * k + 1) * my_degree
1266 * (my_degree + 1)][2][2][1]
1267 = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1268 * (my_degree + 1)][0][2];
1269 grad_grads[i + (j + (2 * k + 1) * my_degree
1271 * (my_degree + 1)][2][2][2]
1272 = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1273 * (my_degree + 1)][0][0];
1274 grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
1278 = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
1279 * (my_degree + 1)][1][1];
1280 grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
1284 = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
1285 * (my_degree + 1)][1][2];
1286 grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
1290 = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
1291 * (my_degree + 1)][1][0];
1292 grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
1296 = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
1297 * (my_degree + 1)][2][1];
1298 grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
1302 = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
1303 * (my_degree + 1)][2][2];
1304 grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
1308 = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
1309 * (my_degree + 1)][2][0];
1310 grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
1314 = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
1315 * (my_degree + 1)][0][1];
1316 grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
1320 = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
1321 * (my_degree + 1)][0][2];
1322 grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
1326 = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
1327 * (my_degree + 1)][0][0];
1328 grad_grads[i + (j + (2 * k + 9) * my_degree
1330 * (my_degree + 1)][1][0][0]
1331 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1332 * (my_degree + 1)][2][2];
1333 grad_grads[i + (j + (2 * k + 9) * my_degree
1335 * (my_degree + 1)][1][0][1]
1336 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1337 * (my_degree + 1)][2][0];
1338 grad_grads[i + (j + (2 * k + 9) * my_degree
1340 * (my_degree + 1)][1][0][2]
1341 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1342 * (my_degree + 1)][2][1];
1343 grad_grads[i + (j + (2 * k + 9) * my_degree
1345 * (my_degree + 1)][1][1][0]
1346 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1347 * (my_degree + 1)][0][2];
1348 grad_grads[i + (j + (2 * k + 9) * my_degree
1350 * (my_degree + 1)][1][1][1]
1351 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1352 * (my_degree + 1)][0][0];
1353 grad_grads[i + (j + (2 * k + 9) * my_degree
1355 * (my_degree + 1)][1][1][2]
1356 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1357 * (my_degree + 1)][0][1];
1358 grad_grads[i + (j + (2 * k + 9) * my_degree
1360 * (my_degree + 1)][1][2][0]
1361 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1362 * (my_degree + 1)][1][2];
1363 grad_grads[i + (j + (2 * k + 9) * my_degree
1365 * (my_degree + 1)][1][2][1]
1366 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1367 * (my_degree + 1)][1][0];
1368 grad_grads[i + (j + (2 * k + 9) * my_degree
1370 * (my_degree + 1)][1][2][2]
1371 = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
1372 * (my_degree + 1)][1][1];
1396 return 2 * (k + 1) * (k + 2);
1399 return 3 * (k + 1) * (k + 2) * (k + 2);
1415 DEAL_II_NAMESPACE_CLOSE
static std::vector< Polynomial< double > > generate_complete_basis(const unsigned int p)
static std::vector< Polynomial< double > > generate_complete_basis(const unsigned int degree)
#define Assert(cond, exc)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
PolynomialsNedelec(const unsigned int k)
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
static unsigned int compute_n_pols(unsigned int degree)
static ::ExceptionBase & ExcNotImplemented()
static std::vector< std::vector< Polynomials::Polynomial< double > > > create_polynomials(const unsigned int k)