16 #include <deal.II/base/geometry_info.h> 17 #include <deal.II/base/polynomial.h> 18 #include <deal.II/base/polynomials_nedelec.h> 19 #include <deal.II/base/quadrature_lib.h> 24 DEAL_II_NAMESPACE_OPEN
30 , polynomial_space(create_polynomials(k))
31 , n_pols(compute_n_pols(k))
35 std::vector<std::vector<Polynomials::Polynomial<double>>>
38 std::vector<std::vector<Polynomials::Polynomial<double>>> pols(dim);
42 for (
unsigned int i = 1; i < dim; ++i)
62 Assert(values.size() == n_pols || values.size() == 0,
64 Assert(grads.size() == n_pols || grads.size() == 0,
66 Assert(grad_grads.size() == n_pols || grad_grads.size() == 0,
68 Assert(third_derivatives.size() == n_pols || third_derivatives.size() == 0,
70 Assert(fourth_derivatives.size() == n_pols || fourth_derivatives.size() == 0,
74 (void)third_derivatives;
76 (void)fourth_derivatives;
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>> unit_point_grads((grads.size() == 0) ? 0 :
87 std::vector<Tensor<2, dim>> unit_point_grad_grads(
88 (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,
99 unit_point_grad_grads,
100 empty_vector_of_3rd_order_tensors,
101 empty_vector_of_4th_order_tensors);
105 if (values.size() > 0)
106 for (
unsigned int i = 0; i < unit_point_values.size(); ++i)
107 values[i][0] = unit_point_values[i];
109 if (grads.size() > 0)
110 for (
unsigned int i = 0; i < unit_point_grads.size(); ++i)
111 grads[i][0][0] = unit_point_grads[i][0];
113 if (grad_grads.size() > 0)
114 for (
unsigned int i = 0; i < unit_point_grad_grads.size(); ++i)
115 grad_grads[i][0][0][0] = unit_point_grad_grads[i][0][0];
122 polynomial_space.compute(unit_point,
125 unit_point_grad_grads,
126 empty_vector_of_3rd_order_tensors,
127 empty_vector_of_4th_order_tensors);
136 p(0) = unit_point(1);
137 p(1) = unit_point(0);
139 std::vector<double> p_values((values.size() == 0) ? 0 : n_basis);
140 std::vector<Tensor<1, dim>> p_grads((grads.size() == 0) ? 0 :
142 std::vector<Tensor<2, dim>> p_grad_grads(
143 (grad_grads.size() == 0) ? 0 : n_basis);
145 polynomial_space.compute(p,
149 empty_vector_of_3rd_order_tensors,
150 empty_vector_of_4th_order_tensors);
154 if (values.size() > 0)
156 for (
unsigned int i = 0; i <= my_degree; ++i)
157 for (
unsigned int j = 0; j < 2; ++j)
159 values[i + j * (my_degree + 1)][0] = 0.0;
160 values[i + j * (my_degree + 1)][1] =
161 p_values[i + j * (my_degree + 1)];
162 values[i + (j + 2) * (my_degree + 1)][0] =
163 unit_point_values[i + j * (my_degree + 1)];
164 values[i + (j + 2) * (my_degree + 1)][1] = 0.0;
168 for (
unsigned int i = 0; i <= my_degree; ++i)
169 for (
unsigned int j = 0; j < my_degree; ++j)
174 unit_point_values[i + (j + 2) * (my_degree + 1)];
178 values[i + (j + my_degree +
180 (my_degree + 1)][0] = 0.0;
181 values[i + (j + my_degree +
183 (my_degree + 1)][1] =
184 p_values[i + (j + 2) * (my_degree + 1)];
188 if (grads.size() > 0)
190 for (
unsigned int i = 0; i <= my_degree; ++i)
191 for (
unsigned int j = 0; j < 2; ++j)
193 for (
unsigned int k = 0; k < dim; ++k)
195 grads[i + j * (my_degree + 1)][0][k] = 0.0;
196 grads[i + (j + 2) * (my_degree + 1)][0][k] =
197 unit_point_grads[i + j * (my_degree + 1)][k];
198 grads[i + (j + 2) * (my_degree + 1)][1][k] = 0.0;
201 grads[i + j * (my_degree + 1)][1][0] =
202 p_grads[i + j * (my_degree + 1)][1];
203 grads[i + j * (my_degree + 1)][1][1] =
204 p_grads[i + j * (my_degree + 1)][0];
208 for (
unsigned int i = 0; i <= my_degree; ++i)
209 for (
unsigned int j = 0; j < my_degree; ++j)
211 for (
unsigned int k = 0; k < dim; ++k)
216 unit_point_grads[i + (j + 2) * (my_degree + 1)][k];
221 grads[i + (j + my_degree +
223 (my_degree + 1)][0][k] = 0.0;
226 grads[i + (j + my_degree +
228 (my_degree + 1)][1][0] =
229 p_grads[i + (j + 2) * (my_degree + 1)][1];
230 grads[i + (j + my_degree +
232 (my_degree + 1)][1][1] =
233 p_grads[i + (j + 2) * (my_degree + 1)][0];
237 if (grad_grads.size() > 0)
239 for (
unsigned int i = 0; i <= my_degree; ++i)
240 for (
unsigned int j = 0; j < 2; ++j)
242 for (
unsigned int k = 0; k < dim; ++k)
243 for (
unsigned int l = 0; l < dim; ++l)
245 grad_grads[i + j * (my_degree + 1)][0][k][l] = 0.0;
246 grad_grads[i + (j + 2) * (my_degree + 1)][0][k][l] =
247 unit_point_grad_grads[i + j * (my_degree + 1)][k]
249 grad_grads[i + (j + 2) * (my_degree + 1)][1][k][l] =
253 grad_grads[i + j * (my_degree + 1)][1][0][0] =
254 p_grad_grads[i + j * (my_degree + 1)][1][1];
255 grad_grads[i + j * (my_degree + 1)][1][0][1] =
256 p_grad_grads[i + j * (my_degree + 1)][1][0];
257 grad_grads[i + j * (my_degree + 1)][1][1][0] =
258 p_grad_grads[i + j * (my_degree + 1)][0][1];
259 grad_grads[i + j * (my_degree + 1)][1][1][1] =
260 p_grad_grads[i + j * (my_degree + 1)][0][0];
264 for (
unsigned int i = 0; i <= my_degree; ++i)
265 for (
unsigned int j = 0; j < my_degree; ++j)
267 for (
unsigned int k = 0; k < dim; ++k)
268 for (
unsigned int l = 0; l < dim; ++l)
273 [k][l] = unit_point_grad_grads
274 [i + (j + 2) * (my_degree + 1)][k][l];
279 grad_grads[i + (j + my_degree +
281 (my_degree + 1)][0][k][l] = 0.0;
284 grad_grads[i + (j + my_degree +
286 (my_degree + 1)][1][0][0] =
287 p_grad_grads[i + (j + 2) * (my_degree + 1)][1][1];
288 grad_grads[i + (j + my_degree +
290 (my_degree + 1)][1][0][1] =
291 p_grad_grads[i + (j + 2) * (my_degree + 1)][1][0];
292 grad_grads[i + (j + my_degree +
294 (my_degree + 1)][1][1][0] =
295 p_grad_grads[i + (j + 2) * (my_degree + 1)][0][1];
296 grad_grads[i + (j + my_degree +
298 (my_degree + 1)][1][1][1] =
299 p_grad_grads[i + (j + 2) * (my_degree + 1)][0][0];
308 polynomial_space.compute(unit_point,
311 unit_point_grad_grads,
312 empty_vector_of_3rd_order_tensors,
313 empty_vector_of_4th_order_tensors);
322 std::vector<double> p1_values((values.size() == 0) ? 0 : n_basis);
323 std::vector<Tensor<1, dim>> p1_grads((grads.size() == 0) ? 0 :
325 std::vector<Tensor<2, dim>> p1_grad_grads(
326 (grad_grads.size() == 0) ? 0 : n_basis);
327 std::vector<double> p2_values((values.size() == 0) ? 0 : n_basis);
328 std::vector<Tensor<1, dim>> p2_grads((grads.size() == 0) ? 0 :
330 std::vector<Tensor<2, dim>> p2_grad_grads(
331 (grad_grads.size() == 0) ? 0 : n_basis);
333 p1(0) = unit_point(1);
334 p1(1) = unit_point(2);
335 p1(2) = unit_point(0);
336 polynomial_space.compute(p1,
340 empty_vector_of_3rd_order_tensors,
341 empty_vector_of_4th_order_tensors);
342 p2(0) = unit_point(2);
343 p2(1) = unit_point(0);
344 p2(2) = unit_point(1);
345 polynomial_space.compute(p2,
349 empty_vector_of_3rd_order_tensors,
350 empty_vector_of_4th_order_tensors);
354 if (values.size() > 0)
356 for (
unsigned int i = 0; i <= my_degree; ++i)
358 for (
unsigned int j = 0; j < 2; ++j)
360 for (
unsigned int k = 0; k < 2; ++k)
362 for (
unsigned int l = 0; l < 2; ++l)
364 values[i + (j + 4 * k) * (my_degree + 1)][2 * l] =
366 values[i + (j + 4 * k + 2) * (my_degree + 1)]
368 values[i + (j + 2 * (k + 4)) * (my_degree + 1)]
372 values[i + (j + 4 * k + 2) * (my_degree + 1)][0] =
373 unit_point_values[i + (j + k * (my_degree + 2)) *
375 values[i + (j + 2 * (k + 4)) * (my_degree + 1)][2] =
376 p2_values[i + (j + k * (my_degree + 2)) *
380 values[i + j * (my_degree + 1)][1] =
381 p1_values[i + j * (my_degree + 1) * (my_degree + 2)];
384 values[i + 4 * (my_degree + 1)][1] =
385 p1_values[i + my_degree + 1];
386 values[i + 5 * (my_degree + 1)][1] =
387 p1_values[i + (my_degree + 1) * (my_degree + 3)];
391 for (
unsigned int i = 0; i <= my_degree; ++i)
392 for (
unsigned int j = 0; j < my_degree; ++j)
394 for (
unsigned int k = 0; k < my_degree; ++k)
396 for (
unsigned int l = 0; l < 2; ++l)
422 (my_degree + 1)][l] = 0.0;
431 unit_point_values[i +
432 (j + (k + 2) * (my_degree + 2) +
442 p1_values[i + ((j + 2) * (my_degree + 2) + k + 2) *
450 (my_degree + 1)][2] =
451 p2_values[i + (j + (k + 2) * (my_degree + 2) + 2) *
455 for (
unsigned int k = 0; k < 2; ++k)
457 for (
unsigned int l = 0; l < 2; ++l)
459 for (
unsigned int m = 0; m < 2; ++m)
463 (2 * (k + 2 * l) + 1) * my_degree +
465 (my_degree + 1)][m + l] = 0.0;
467 2 * (k + 2 * (l + 1)) *
475 values[(i + 2 * k * (my_degree + 1) +
480 values[i + (j + (2 * k + 9) * my_degree +
482 (my_degree + 1)][2 * l] = 0.0;
485 values[(i + 2 * k * (my_degree + 1) +
489 p1_values[i + (j + k * (my_degree + 2) + 2) *
491 values[i + (j + (2 * k + 1) * my_degree +
493 (my_degree + 1)][2] =
494 p2_values[i + ((j + 2) * (my_degree + 2) + k) *
496 values[(i + 2 * (k + 2) * (my_degree + 1) +
500 p2_values[i + (j + k * (my_degree + 2) + 2) *
502 values[i + (j + (2 * k + 5) * my_degree +
504 (my_degree + 1)][0] =
505 unit_point_values[i +
506 ((j + 2) * (my_degree + 2) + k) *
508 values[(i + 2 * (k + 4) * (my_degree + 1) +
512 unit_point_values[i +
513 (j + k * (my_degree + 2) + 2) *
515 values[i + (j + (2 * k + 9) * my_degree +
517 (my_degree + 1)][1] =
518 p1_values[i + ((j + 2) * (my_degree + 2) + k) *
524 if (grads.size() > 0)
526 for (
unsigned int i = 0; i <= my_degree; ++i)
528 for (
unsigned int j = 0; j < 2; ++j)
530 for (
unsigned int k = 0; k < 2; ++k)
532 for (
unsigned int l = 0; l < 2; ++l)
533 for (
unsigned int m = 0; m < dim; ++m)
535 grads[i + (j + 4 * k) * (my_degree + 1)][2 * l]
537 grads[i + (j + 4 * k + 2) * (my_degree + 1)]
539 grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
543 for (
unsigned int l = 0; l < dim; ++l)
544 grads[i + (j + 4 * k + 2) * (my_degree + 1)][0][l] =
545 unit_point_grads[i + (j + k * (my_degree + 2)) *
548 grads[i + (j + 2 * (k + 4)) * (my_degree + 1)][2][0] =
549 p2_grads[i + (j + k * (my_degree + 2)) *
551 grads[i + (j + 2 * (k + 4)) * (my_degree + 1)][2][1] =
552 p2_grads[i + (j + k * (my_degree + 2)) *
554 grads[i + (j + 2 * (k + 4)) * (my_degree + 1)][2][2] =
555 p2_grads[i + (j + k * (my_degree + 2)) *
559 grads[i + j * (my_degree + 1)][1][0] =
560 p1_grads[i + j * (my_degree + 1) * (my_degree + 2)][2];
561 grads[i + j * (my_degree + 1)][1][1] =
562 p1_grads[i + j * (my_degree + 1) * (my_degree + 2)][0];
563 grads[i + j * (my_degree + 1)][1][2] =
564 p1_grads[i + j * (my_degree + 1) * (my_degree + 2)][1];
567 grads[i + 4 * (my_degree + 1)][1][0] =
568 p1_grads[i + my_degree + 1][2];
569 grads[i + 4 * (my_degree + 1)][1][1] =
570 p1_grads[i + my_degree + 1][0];
571 grads[i + 4 * (my_degree + 1)][1][2] =
572 p1_grads[i + my_degree + 1][1];
573 grads[i + 5 * (my_degree + 1)][1][0] =
574 p1_grads[i + (my_degree + 1) * (my_degree + 3)][2];
575 grads[i + 5 * (my_degree + 1)][1][1] =
576 p1_grads[i + (my_degree + 1) * (my_degree + 3)][0];
577 grads[i + 5 * (my_degree + 1)][1][2] =
578 p1_grads[i + (my_degree + 1) * (my_degree + 3)][1];
582 for (
unsigned int i = 0; i <= my_degree; ++i)
583 for (
unsigned int j = 0; j < my_degree; ++j)
585 for (
unsigned int k = 0; k < my_degree; ++k)
587 for (
unsigned int l = 0; l < dim; ++l)
589 for (
unsigned int m = 0; m < 2; ++m)
618 (my_degree + 1)][m][l] = 0.0;
628 [l] = unit_point_grads
629 [i + (j + (k + 2) * (my_degree + 2) + 2) *
640 p1_grads[i + ((j + 2) * (my_degree + 2) + k + 2) *
649 p1_grads[i + ((j + 2) * (my_degree + 2) + k + 2) *
658 p1_grads[i + ((j + 2) * (my_degree + 2) + k + 2) *
666 (my_degree + 1)][2][0] =
667 p2_grads[i + (j + (k + 2) * (my_degree + 2) + 2) *
675 (my_degree + 1)][2][1] =
676 p2_grads[i + (j + (k + 2) * (my_degree + 2) + 2) *
684 (my_degree + 1)][2][2] =
685 p2_grads[i + (j + (k + 2) * (my_degree + 2) + 2) *
689 for (
unsigned int k = 0; k < 2; ++k)
691 for (
unsigned int l = 0; l < 2; ++l)
692 for (
unsigned int m = 0; m < dim; ++m)
694 for (
unsigned int n = 0; n < 2; ++n)
698 (2 * (k + 2 * l) + 1) * my_degree +
700 (my_degree + 1)][n + l][m] = 0.0;
702 2 * (k + 2 * (l + 1)) *
710 grads[(i + 2 * k * (my_degree + 1) +
715 grads[i + (j + (2 * k + 9) * my_degree +
717 (my_degree + 1)][2 * l][m] = 0.0;
720 for (
unsigned int l = 0; l < dim; ++l)
722 grads[i + (j + (2 * k + 5) * my_degree +
724 (my_degree + 1)][0][l] =
726 ((j + 2) * (my_degree + 2) +
729 grads[(i + 2 * (k + 4) * (my_degree + 1) +
735 (j + k * (my_degree + 2) + 2) *
739 grads[(i + 2 * k * (my_degree + 1) +
743 p1_grads[i + (j + k * (my_degree + 2) + 2) *
745 grads[(i + 2 * k * (my_degree + 1) +
749 p1_grads[i + (j + k * (my_degree + 2) + 2) *
751 grads[(i + 2 * k * (my_degree + 1) +
755 p1_grads[i + (j + k * (my_degree + 2) + 2) *
757 grads[i + (j + (2 * k + 1) * my_degree +
759 (my_degree + 1)][2][0] =
760 p2_grads[i + ((j + 2) * (my_degree + 2) + k) *
762 grads[i + (j + (2 * k + 1) * my_degree +
764 (my_degree + 1)][2][1] =
765 p2_grads[i + ((j + 2) * (my_degree + 2) + k) *
767 grads[i + (j + (2 * k + 1) * my_degree +
769 (my_degree + 1)][2][2] =
770 p2_grads[i + ((j + 2) * (my_degree + 2) + k) *
772 grads[(i + 2 * (k + 2) * (my_degree + 1) +
776 p2_grads[i + (j + k * (my_degree + 2) + 2) *
778 grads[(i + 2 * (k + 2) * (my_degree + 1) +
782 p2_grads[i + (j + k * (my_degree + 2) + 2) *
784 grads[(i + 2 * (k + 2) * (my_degree + 1) +
788 p2_grads[i + (j + k * (my_degree + 2) + 2) *
790 grads[i + (j + (2 * k + 9) * my_degree +
792 (my_degree + 1)][1][0] =
793 p1_grads[i + ((j + 2) * (my_degree + 2) + k) *
795 grads[i + (j + (2 * k + 9) * my_degree +
797 (my_degree + 1)][1][1] =
798 p1_grads[i + ((j + 2) * (my_degree + 2) + k) *
800 grads[i + (j + (2 * k + 9) * my_degree +
802 (my_degree + 1)][1][2] =
803 p1_grads[i + ((j + 2) * (my_degree + 2) + k) *
809 if (grad_grads.size() > 0)
811 for (
unsigned int i = 0; i <= my_degree; ++i)
813 for (
unsigned int j = 0; j < 2; ++j)
815 for (
unsigned int k = 0; k < 2; ++k)
817 for (
unsigned int l = 0; l < dim; ++l)
818 for (
unsigned int m = 0; m < dim; ++m)
820 for (
unsigned int n = 0; n < 2; ++n)
823 (j + 4 * k) * (my_degree + 1)]
825 grad_grads[i + (j + 4 * k + 2) *
826 (my_degree + 1)][n + 1][l]
828 grad_grads[i + (j + 2 * (k + 4)) *
829 (my_degree + 1)][n][l][m] =
833 grad_grads[i + (j + 4 * k + 2) *
834 (my_degree + 1)][0][l][m] =
835 unit_point_grad_grads
836 [i + (j + k * (my_degree + 2)) *
837 (my_degree + 1)][l][m];
840 grad_grads[i + (j + 2 * (k + 4)) *
841 (my_degree + 1)][2][0][0] =
842 p2_grad_grads[i + (j + k * (my_degree + 2)) *
843 (my_degree + 1)][1][1];
844 grad_grads[i + (j + 2 * (k + 4)) *
845 (my_degree + 1)][2][0][1] =
846 p2_grad_grads[i + (j + k * (my_degree + 2)) *
847 (my_degree + 1)][1][2];
848 grad_grads[i + (j + 2 * (k + 4)) *
849 (my_degree + 1)][2][0][2] =
850 p2_grad_grads[i + (j + k * (my_degree + 2)) *
851 (my_degree + 1)][1][0];
852 grad_grads[i + (j + 2 * (k + 4)) *
853 (my_degree + 1)][2][1][0] =
854 p2_grad_grads[i + (j + k * (my_degree + 2)) *
855 (my_degree + 1)][2][1];
856 grad_grads[i + (j + 2 * (k + 4)) *
857 (my_degree + 1)][2][1][1] =
858 p2_grad_grads[i + (j + k * (my_degree + 2)) *
859 (my_degree + 1)][2][2];
860 grad_grads[i + (j + 2 * (k + 4)) *
861 (my_degree + 1)][2][1][2] =
862 p2_grad_grads[i + (j + k * (my_degree + 2)) *
863 (my_degree + 1)][2][0];
864 grad_grads[i + (j + 2 * (k + 4)) *
865 (my_degree + 1)][2][2][0] =
866 p2_grad_grads[i + (j + k * (my_degree + 2)) *
867 (my_degree + 1)][0][1];
868 grad_grads[i + (j + 2 * (k + 4)) *
869 (my_degree + 1)][2][2][1] =
870 p2_grad_grads[i + (j + k * (my_degree + 2)) *
871 (my_degree + 1)][0][2];
872 grad_grads[i + (j + 2 * (k + 4)) *
873 (my_degree + 1)][2][2][2] =
874 p2_grad_grads[i + (j + k * (my_degree + 2)) *
875 (my_degree + 1)][0][0];
878 grad_grads[i + j * (my_degree + 1)][1][0][0] =
879 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
881 grad_grads[i + j * (my_degree + 1)][1][0][1] =
882 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
884 grad_grads[i + j * (my_degree + 1)][1][0][2] =
885 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
887 grad_grads[i + j * (my_degree + 1)][1][1][0] =
888 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
890 grad_grads[i + j * (my_degree + 1)][1][1][1] =
891 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
893 grad_grads[i + j * (my_degree + 1)][1][1][2] =
894 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
896 grad_grads[i + j * (my_degree + 1)][1][2][0] =
897 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
899 grad_grads[i + j * (my_degree + 1)][1][2][1] =
900 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
902 grad_grads[i + j * (my_degree + 1)][1][2][2] =
903 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
907 grad_grads[i + 4 * (my_degree + 1)][1][0][0] =
908 p1_grad_grads[i + my_degree + 1][2][2];
909 grad_grads[i + 4 * (my_degree + 1)][1][0][1] =
910 p1_grad_grads[i + my_degree + 1][2][0];
911 grad_grads[i + 4 * (my_degree + 1)][1][0][2] =
912 p1_grad_grads[i + my_degree + 1][2][1];
913 grad_grads[i + 4 * (my_degree + 1)][1][1][0] =
914 p1_grad_grads[i + my_degree + 1][0][2];
915 grad_grads[i + 4 * (my_degree + 1)][1][1][1] =
916 p1_grad_grads[i + my_degree + 1][0][0];
917 grad_grads[i + 4 * (my_degree + 1)][1][1][2] =
918 p1_grad_grads[i + my_degree + 1][0][1];
919 grad_grads[i + 4 * (my_degree + 1)][1][2][0] =
920 p1_grad_grads[i + my_degree + 1][1][2];
921 grad_grads[i + 4 * (my_degree + 1)][1][2][1] =
922 p1_grad_grads[i + my_degree + 1][1][0];
923 grad_grads[i + 4 * (my_degree + 1)][1][2][2] =
924 p1_grad_grads[i + my_degree + 1][1][1];
925 grad_grads[i + 5 * (my_degree + 1)][1][0][0] =
926 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][2][2];
927 grad_grads[i + 5 * (my_degree + 1)][1][0][1] =
928 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][2][0];
929 grad_grads[i + 5 * (my_degree + 1)][1][0][2] =
930 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][2][1];
931 grad_grads[i + 5 * (my_degree + 1)][1][1][0] =
932 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][0][2];
933 grad_grads[i + 5 * (my_degree + 1)][1][1][1] =
934 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][0][0];
935 grad_grads[i + 5 * (my_degree + 1)][1][1][2] =
936 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][0][1];
937 grad_grads[i + 5 * (my_degree + 1)][1][2][0] =
938 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][1][2];
939 grad_grads[i + 5 * (my_degree + 1)][1][2][1] =
940 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][1][0];
941 grad_grads[i + 5 * (my_degree + 1)][1][2][2] =
942 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][1][1];
946 for (
unsigned int i = 0; i <= my_degree; ++i)
947 for (
unsigned int j = 0; j < my_degree; ++j)
949 for (
unsigned int k = 0; k < my_degree; ++k)
951 for (
unsigned int l = 0; l < dim; ++l)
952 for (
unsigned int m = 0; m < dim; ++m)
954 for (
unsigned int n = 0; n < 2; ++n)
979 dim>::faces_per_cell +
983 (my_degree + 1)][n][l][m] = 0.0;
994 [m] = unit_point_grad_grads
995 [i + (j + (k + 2) * (my_degree + 2) + 2) *
996 (my_degree + 1)][l][m];
1007 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1009 (my_degree + 1)][2][2];
1018 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1020 (my_degree + 1)][2][0];
1029 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1031 (my_degree + 1)][2][1];
1040 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1042 (my_degree + 1)][0][2];
1051 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1053 (my_degree + 1)][0][0];
1062 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1064 (my_degree + 1)][0][1];
1073 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1075 (my_degree + 1)][1][2];
1084 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1086 (my_degree + 1)][1][0];
1095 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1097 (my_degree + 1)][1][1];
1105 (my_degree + 1)][2][0][0] =
1107 (j + (k + 2) * (my_degree + 2) + 2) *
1108 (my_degree + 1)][1][1];
1116 (my_degree + 1)][2][0][1] =
1118 (j + (k + 2) * (my_degree + 2) + 2) *
1119 (my_degree + 1)][1][2];
1127 (my_degree + 1)][2][0][2] =
1129 (j + (k + 2) * (my_degree + 2) + 2) *
1130 (my_degree + 1)][1][0];
1138 (my_degree + 1)][2][1][0] =
1140 (j + (k + 2) * (my_degree + 2) + 2) *
1141 (my_degree + 1)][2][1];
1149 (my_degree + 1)][2][1][1] =
1151 (j + (k + 2) * (my_degree + 2) + 2) *
1152 (my_degree + 1)][2][2];
1160 (my_degree + 1)][2][1][2] =
1162 (j + (k + 2) * (my_degree + 2) + 2) *
1163 (my_degree + 1)][2][0];
1171 (my_degree + 1)][2][2][0] =
1173 (j + (k + 2) * (my_degree + 2) + 2) *
1174 (my_degree + 1)][0][1];
1182 (my_degree + 1)][2][2][1] =
1184 (j + (k + 2) * (my_degree + 2) + 2) *
1185 (my_degree + 1)][0][2];
1193 (my_degree + 1)][2][2][2] =
1195 (j + (k + 2) * (my_degree + 2) + 2) *
1196 (my_degree + 1)][0][0];
1199 for (
unsigned int k = 0; k < 2; ++k)
1201 for (
unsigned int l = 0; l < dim; ++l)
1202 for (
unsigned int m = 0; m < dim; ++m)
1204 for (
unsigned int n = 0; n < 2; ++n)
1206 for (
unsigned int o = 0; o < 2; ++o)
1211 (2 * (k + 2 * n) + 1) * my_degree +
1213 (my_degree + 1)][o + n][l][m] =
1217 2 * (k + 2 * (n + 1)) *
1223 [o + k][l][m] = 0.0;
1227 [(i + 2 * k * (my_degree + 1) +
1231 [2 * n][l][m] = 0.0;
1233 [i + (j + (2 * k + 9) * my_degree +
1235 (my_degree + 1)][2 * n][l][m] =
1240 (j + (2 * k + 5) * my_degree +
1242 (my_degree + 1)][0][l][m] =
1243 unit_point_grad_grads
1244 [i + ((j + 2) * (my_degree + 2) + k) *
1245 (my_degree + 1)][l][m];
1246 grad_grads[(i + 2 * (k + 4) * (my_degree + 1) +
1251 [l][m] = unit_point_grad_grads
1252 [i + (j + k * (my_degree + 2) + 2) *
1253 (my_degree + 1)][l][m];
1257 [(i + 2 * k * (my_degree + 1) +
1261 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1262 (my_degree + 1)][2][2];
1264 [(i + 2 * k * (my_degree + 1) +
1268 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1269 (my_degree + 1)][2][0];
1271 [(i + 2 * k * (my_degree + 1) +
1275 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1276 (my_degree + 1)][2][1];
1278 [(i + 2 * k * (my_degree + 1) +
1282 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1283 (my_degree + 1)][0][2];
1285 [(i + 2 * k * (my_degree + 1) +
1289 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1290 (my_degree + 1)][0][0];
1292 [(i + 2 * k * (my_degree + 1) +
1296 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1297 (my_degree + 1)][0][1];
1299 [(i + 2 * k * (my_degree + 1) +
1303 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1304 (my_degree + 1)][1][2];
1306 [(i + 2 * k * (my_degree + 1) +
1310 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1311 (my_degree + 1)][1][0];
1313 [(i + 2 * k * (my_degree + 1) +
1317 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1318 (my_degree + 1)][1][1];
1319 grad_grads[i + (j + (2 * k + 1) * my_degree +
1321 (my_degree + 1)][2][0][0] =
1322 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1323 (my_degree + 1)][1][1];
1324 grad_grads[i + (j + (2 * k + 1) * my_degree +
1326 (my_degree + 1)][2][0][1] =
1327 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1328 (my_degree + 1)][1][2];
1329 grad_grads[i + (j + (2 * k + 1) * my_degree +
1331 (my_degree + 1)][2][0][2] =
1332 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1333 (my_degree + 1)][1][0];
1334 grad_grads[i + (j + (2 * k + 1) * my_degree +
1336 (my_degree + 1)][2][1][0] =
1337 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1338 (my_degree + 1)][2][1];
1339 grad_grads[i + (j + (2 * k + 1) * my_degree +
1341 (my_degree + 1)][2][1][1] =
1342 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1343 (my_degree + 1)][2][2];
1344 grad_grads[i + (j + (2 * k + 1) * my_degree +
1346 (my_degree + 1)][2][1][2] =
1347 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1348 (my_degree + 1)][2][0];
1349 grad_grads[i + (j + (2 * k + 1) * my_degree +
1351 (my_degree + 1)][2][2][0] =
1352 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1353 (my_degree + 1)][0][1];
1354 grad_grads[i + (j + (2 * k + 1) * my_degree +
1356 (my_degree + 1)][2][2][1] =
1357 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1358 (my_degree + 1)][0][2];
1359 grad_grads[i + (j + (2 * k + 1) * my_degree +
1361 (my_degree + 1)][2][2][2] =
1362 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1363 (my_degree + 1)][0][0];
1365 [(i + 2 * (k + 2) * (my_degree + 1) +
1369 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1370 (my_degree + 1)][1][1];
1372 [(i + 2 * (k + 2) * (my_degree + 1) +
1376 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1377 (my_degree + 1)][1][2];
1379 [(i + 2 * (k + 2) * (my_degree + 1) +
1383 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1384 (my_degree + 1)][1][0];
1386 [(i + 2 * (k + 2) * (my_degree + 1) +
1390 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1391 (my_degree + 1)][2][1];
1393 [(i + 2 * (k + 2) * (my_degree + 1) +
1397 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1398 (my_degree + 1)][2][2];
1400 [(i + 2 * (k + 2) * (my_degree + 1) +
1404 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1405 (my_degree + 1)][2][0];
1407 [(i + 2 * (k + 2) * (my_degree + 1) +
1411 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1412 (my_degree + 1)][0][1];
1414 [(i + 2 * (k + 2) * (my_degree + 1) +
1418 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1419 (my_degree + 1)][0][2];
1421 [(i + 2 * (k + 2) * (my_degree + 1) +
1425 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1426 (my_degree + 1)][0][0];
1427 grad_grads[i + (j + (2 * k + 9) * my_degree +
1429 (my_degree + 1)][1][0][0] =
1430 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1431 (my_degree + 1)][2][2];
1432 grad_grads[i + (j + (2 * k + 9) * my_degree +
1434 (my_degree + 1)][1][0][1] =
1435 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1436 (my_degree + 1)][2][0];
1437 grad_grads[i + (j + (2 * k + 9) * my_degree +
1439 (my_degree + 1)][1][0][2] =
1440 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1441 (my_degree + 1)][2][1];
1442 grad_grads[i + (j + (2 * k + 9) * my_degree +
1444 (my_degree + 1)][1][1][0] =
1445 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1446 (my_degree + 1)][0][2];
1447 grad_grads[i + (j + (2 * k + 9) * my_degree +
1449 (my_degree + 1)][1][1][1] =
1450 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1451 (my_degree + 1)][0][0];
1452 grad_grads[i + (j + (2 * k + 9) * my_degree +
1454 (my_degree + 1)][1][1][2] =
1455 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1456 (my_degree + 1)][0][1];
1457 grad_grads[i + (j + (2 * k + 9) * my_degree +
1459 (my_degree + 1)][1][2][0] =
1460 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1461 (my_degree + 1)][1][2];
1462 grad_grads[i + (j + (2 * k + 9) * my_degree +
1464 (my_degree + 1)][1][2][1] =
1465 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1466 (my_degree + 1)][1][0];
1467 grad_grads[i + (j + (2 * k + 9) * my_degree +
1469 (my_degree + 1)][1][2][2] =
1470 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1471 (my_degree + 1)][1][1];
1495 return 2 * (k + 1) * (k + 2);
1498 return 3 * (k + 1) * (k + 2) * (k + 2);
1514 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)