31 , polynomial_space(create_polynomials(k))
35std::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)
64 Assert(grads.size() == this->n() || grads.size() == 0,
66 Assert(grad_grads.size() == this->n() || grad_grads.size() == 0,
68 Assert(third_derivatives.size() == this->n() || third_derivatives.size() == 0,
70 Assert(fourth_derivatives.size() == this->n() ||
71 fourth_derivatives.size() == 0,
75 (void)third_derivatives;
77 (void)fourth_derivatives;
84 const unsigned int n_basis = polynomial_space.n();
85 const unsigned int my_degree = this->degree();
86 std::vector<double> unit_point_values((
values.size() == 0) ? 0 : n_basis);
87 std::vector<Tensor<1, dim>> unit_point_grads((grads.size() == 0) ? 0 :
89 std::vector<Tensor<2, dim>> unit_point_grad_grads(
90 (grad_grads.size() == 0) ? 0 : n_basis);
91 std::vector<Tensor<3, dim>> empty_vector_of_3rd_order_tensors;
92 std::vector<Tensor<4, dim>> empty_vector_of_4th_order_tensors;
98 polynomial_space.evaluate(unit_point,
101 unit_point_grad_grads,
102 empty_vector_of_3rd_order_tensors,
103 empty_vector_of_4th_order_tensors);
108 for (
unsigned int i = 0; i < unit_point_values.size(); ++i)
109 values[i][0] = unit_point_values[i];
111 if (grads.size() > 0)
112 for (
unsigned int i = 0; i < unit_point_grads.size(); ++i)
113 grads[i][0][0] = unit_point_grads[i][0];
115 if (grad_grads.size() > 0)
116 for (
unsigned int i = 0; i < unit_point_grad_grads.size(); ++i)
117 grad_grads[i][0][0][0] = unit_point_grad_grads[i][0][0];
124 polynomial_space.evaluate(unit_point,
127 unit_point_grad_grads,
128 empty_vector_of_3rd_order_tensors,
129 empty_vector_of_4th_order_tensors);
138 p(0) = unit_point(1);
139 p(1) = unit_point(0);
141 std::vector<double> p_values((
values.size() == 0) ? 0 : n_basis);
142 std::vector<Tensor<1, dim>> p_grads((grads.size() == 0) ? 0 :
144 std::vector<Tensor<2, dim>> p_grad_grads(
145 (grad_grads.size() == 0) ? 0 : n_basis);
147 polynomial_space.evaluate(p,
151 empty_vector_of_3rd_order_tensors,
152 empty_vector_of_4th_order_tensors);
158 for (
unsigned int i = 0; i <= my_degree; ++i)
159 for (
unsigned int j = 0; j < 2; ++j)
161 values[i + j * (my_degree + 1)][0] = 0.0;
162 values[i + j * (my_degree + 1)][1] =
163 p_values[i + j * (my_degree + 1)];
164 values[i + (j + 2) * (my_degree + 1)][0] =
165 unit_point_values[i + j * (my_degree + 1)];
166 values[i + (j + 2) * (my_degree + 1)][1] = 0.0;
170 for (
unsigned int i = 0; i <= my_degree; ++i)
171 for (
unsigned int j = 0; j < my_degree; ++j)
176 unit_point_values[i + (j + 2) * (my_degree + 1)];
180 values[i + (j + my_degree +
182 (my_degree + 1)][0] = 0.0;
183 values[i + (j + my_degree +
185 (my_degree + 1)][1] =
186 p_values[i + (j + 2) * (my_degree + 1)];
190 if (grads.size() > 0)
192 for (
unsigned int i = 0; i <= my_degree; ++i)
193 for (
unsigned int j = 0; j < 2; ++j)
195 for (
unsigned int k = 0; k < dim; ++k)
197 grads[i + j * (my_degree + 1)][0][k] = 0.0;
198 grads[i + (j + 2) * (my_degree + 1)][0][k] =
199 unit_point_grads[i + j * (my_degree + 1)][k];
200 grads[i + (j + 2) * (my_degree + 1)][1][k] = 0.0;
203 grads[i + j * (my_degree + 1)][1][0] =
204 p_grads[i + j * (my_degree + 1)][1];
205 grads[i + j * (my_degree + 1)][1][1] =
206 p_grads[i + j * (my_degree + 1)][0];
210 for (
unsigned int i = 0; i <= my_degree; ++i)
211 for (
unsigned int j = 0; j < my_degree; ++j)
213 for (
unsigned int k = 0; k < dim; ++k)
218 unit_point_grads[i + (j + 2) * (my_degree + 1)][k];
223 grads[i + (j + my_degree +
225 (my_degree + 1)][0][k] = 0.0;
228 grads[i + (j + my_degree +
230 (my_degree + 1)][1][0] =
231 p_grads[i + (j + 2) * (my_degree + 1)][1];
232 grads[i + (j + my_degree +
234 (my_degree + 1)][1][1] =
235 p_grads[i + (j + 2) * (my_degree + 1)][0];
239 if (grad_grads.size() > 0)
241 for (
unsigned int i = 0; i <= my_degree; ++i)
242 for (
unsigned int j = 0; j < 2; ++j)
244 for (
unsigned int k = 0; k < dim; ++k)
245 for (
unsigned int l = 0;
l < dim; ++
l)
247 grad_grads[i + j * (my_degree + 1)][0][k][
l] = 0.0;
248 grad_grads[i + (j + 2) * (my_degree + 1)][0][k][
l] =
249 unit_point_grad_grads[i + j * (my_degree + 1)][k]
251 grad_grads[i + (j + 2) * (my_degree + 1)][1][k][
l] =
255 grad_grads[i + j * (my_degree + 1)][1][0][0] =
256 p_grad_grads[i + j * (my_degree + 1)][1][1];
257 grad_grads[i + j * (my_degree + 1)][1][0][1] =
258 p_grad_grads[i + j * (my_degree + 1)][1][0];
259 grad_grads[i + j * (my_degree + 1)][1][1][0] =
260 p_grad_grads[i + j * (my_degree + 1)][0][1];
261 grad_grads[i + j * (my_degree + 1)][1][1][1] =
262 p_grad_grads[i + j * (my_degree + 1)][0][0];
266 for (
unsigned int i = 0; i <= my_degree; ++i)
267 for (
unsigned int j = 0; j < my_degree; ++j)
269 for (
unsigned int k = 0; k < dim; ++k)
270 for (
unsigned int l = 0;
l < dim; ++
l)
275 [k][
l] = unit_point_grad_grads
276 [i + (j + 2) * (my_degree + 1)][k][
l];
281 grad_grads[i + (j + my_degree +
283 (my_degree + 1)][0][k][
l] = 0.0;
286 grad_grads[i + (j + my_degree +
288 (my_degree + 1)][1][0][0] =
289 p_grad_grads[i + (j + 2) * (my_degree + 1)][1][1];
290 grad_grads[i + (j + my_degree +
292 (my_degree + 1)][1][0][1] =
293 p_grad_grads[i + (j + 2) * (my_degree + 1)][1][0];
294 grad_grads[i + (j + my_degree +
296 (my_degree + 1)][1][1][0] =
297 p_grad_grads[i + (j + 2) * (my_degree + 1)][0][1];
298 grad_grads[i + (j + my_degree +
300 (my_degree + 1)][1][1][1] =
301 p_grad_grads[i + (j + 2) * (my_degree + 1)][0][0];
310 polynomial_space.evaluate(unit_point,
313 unit_point_grad_grads,
314 empty_vector_of_3rd_order_tensors,
315 empty_vector_of_4th_order_tensors);
324 std::vector<double> p1_values((
values.size() == 0) ? 0 : n_basis);
325 std::vector<Tensor<1, dim>> p1_grads((grads.size() == 0) ? 0 :
327 std::vector<Tensor<2, dim>> p1_grad_grads(
328 (grad_grads.size() == 0) ? 0 : n_basis);
329 std::vector<double> p2_values((
values.size() == 0) ? 0 : n_basis);
330 std::vector<Tensor<1, dim>> p2_grads((grads.size() == 0) ? 0 :
332 std::vector<Tensor<2, dim>> p2_grad_grads(
333 (grad_grads.size() == 0) ? 0 : n_basis);
335 p1(0) = unit_point(1);
336 p1(1) = unit_point(2);
337 p1(2) = unit_point(0);
338 polynomial_space.evaluate(p1,
342 empty_vector_of_3rd_order_tensors,
343 empty_vector_of_4th_order_tensors);
344 p2(0) = unit_point(2);
345 p2(1) = unit_point(0);
346 p2(2) = unit_point(1);
347 polynomial_space.evaluate(p2,
351 empty_vector_of_3rd_order_tensors,
352 empty_vector_of_4th_order_tensors);
358 for (
unsigned int i = 0; i <= my_degree; ++i)
360 for (
unsigned int j = 0; j < 2; ++j)
362 for (
unsigned int k = 0; k < 2; ++k)
364 for (
unsigned int l = 0;
l < 2; ++
l)
366 values[i + (j + 4 * k) * (my_degree + 1)][2 *
l] =
368 values[i + (j + 4 * k + 2) * (my_degree + 1)]
370 values[i + (j + 2 * (k + 4)) * (my_degree + 1)]
374 values[i + (j + 4 * k + 2) * (my_degree + 1)][0] =
375 unit_point_values[i + (j + k * (my_degree + 2)) *
377 values[i + (j + 2 * (k + 4)) * (my_degree + 1)][2] =
378 p2_values[i + (j + k * (my_degree + 2)) *
382 values[i + j * (my_degree + 1)][1] =
383 p1_values[i + j * (my_degree + 1) * (my_degree + 2)];
386 values[i + 4 * (my_degree + 1)][1] =
387 p1_values[i + my_degree + 1];
388 values[i + 5 * (my_degree + 1)][1] =
389 p1_values[i + (my_degree + 1) * (my_degree + 3)];
393 for (
unsigned int i = 0; i <= my_degree; ++i)
394 for (
unsigned int j = 0; j < my_degree; ++j)
396 for (
unsigned int k = 0; k < my_degree; ++k)
398 for (
unsigned int l = 0;
l < 2; ++
l)
424 (my_degree + 1)][
l] = 0.0;
433 unit_point_values[i +
434 (j + (k + 2) * (my_degree + 2) +
444 p1_values[i + ((j + 2) * (my_degree + 2) + k + 2) *
452 (my_degree + 1)][2] =
453 p2_values[i + (j + (k + 2) * (my_degree + 2) + 2) *
457 for (
unsigned int k = 0; k < 2; ++k)
459 for (
unsigned int l = 0;
l < 2; ++
l)
461 for (
unsigned int m = 0; m < 2; ++m)
465 (2 * (k + 2 *
l) + 1) * my_degree +
467 (my_degree + 1)][m +
l] = 0.0;
469 2 * (k + 2 * (
l + 1)) *
477 values[(i + 2 * k * (my_degree + 1) +
482 values[i + (j + (2 * k + 9) * my_degree +
484 (my_degree + 1)][2 *
l] = 0.0;
487 values[(i + 2 * k * (my_degree + 1) +
491 p1_values[i + (j + k * (my_degree + 2) + 2) *
493 values[i + (j + (2 * k + 1) * my_degree +
495 (my_degree + 1)][2] =
496 p2_values[i + ((j + 2) * (my_degree + 2) + k) *
498 values[(i + 2 * (k + 2) * (my_degree + 1) +
502 p2_values[i + (j + k * (my_degree + 2) + 2) *
504 values[i + (j + (2 * k + 5) * my_degree +
506 (my_degree + 1)][0] =
507 unit_point_values[i +
508 ((j + 2) * (my_degree + 2) + k) *
510 values[(i + 2 * (k + 4) * (my_degree + 1) +
514 unit_point_values[i +
515 (j + k * (my_degree + 2) + 2) *
517 values[i + (j + (2 * k + 9) * my_degree +
519 (my_degree + 1)][1] =
520 p1_values[i + ((j + 2) * (my_degree + 2) + k) *
526 if (grads.size() > 0)
528 for (
unsigned int i = 0; i <= my_degree; ++i)
530 for (
unsigned int j = 0; j < 2; ++j)
532 for (
unsigned int k = 0; k < 2; ++k)
534 for (
unsigned int l = 0;
l < 2; ++
l)
535 for (
unsigned int m = 0; m < dim; ++m)
537 grads[i + (j + 4 * k) * (my_degree + 1)][2 *
l]
539 grads[i + (j + 4 * k + 2) * (my_degree + 1)]
541 grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
545 for (
unsigned int l = 0;
l < dim; ++
l)
546 grads[i + (j + 4 * k + 2) * (my_degree + 1)][0][
l] =
547 unit_point_grads[i + (j + k * (my_degree + 2)) *
550 grads[i + (j + 2 * (k + 4)) * (my_degree + 1)][2][0] =
551 p2_grads[i + (j + k * (my_degree + 2)) *
553 grads[i + (j + 2 * (k + 4)) * (my_degree + 1)][2][1] =
554 p2_grads[i + (j + k * (my_degree + 2)) *
556 grads[i + (j + 2 * (k + 4)) * (my_degree + 1)][2][2] =
557 p2_grads[i + (j + k * (my_degree + 2)) *
561 grads[i + j * (my_degree + 1)][1][0] =
562 p1_grads[i + j * (my_degree + 1) * (my_degree + 2)][2];
563 grads[i + j * (my_degree + 1)][1][1] =
564 p1_grads[i + j * (my_degree + 1) * (my_degree + 2)][0];
565 grads[i + j * (my_degree + 1)][1][2] =
566 p1_grads[i + j * (my_degree + 1) * (my_degree + 2)][1];
569 grads[i + 4 * (my_degree + 1)][1][0] =
570 p1_grads[i + my_degree + 1][2];
571 grads[i + 4 * (my_degree + 1)][1][1] =
572 p1_grads[i + my_degree + 1][0];
573 grads[i + 4 * (my_degree + 1)][1][2] =
574 p1_grads[i + my_degree + 1][1];
575 grads[i + 5 * (my_degree + 1)][1][0] =
576 p1_grads[i + (my_degree + 1) * (my_degree + 3)][2];
577 grads[i + 5 * (my_degree + 1)][1][1] =
578 p1_grads[i + (my_degree + 1) * (my_degree + 3)][0];
579 grads[i + 5 * (my_degree + 1)][1][2] =
580 p1_grads[i + (my_degree + 1) * (my_degree + 3)][1];
584 for (
unsigned int i = 0; i <= my_degree; ++i)
585 for (
unsigned int j = 0; j < my_degree; ++j)
587 for (
unsigned int k = 0; k < my_degree; ++k)
589 for (
unsigned int l = 0;
l < dim; ++
l)
591 for (
unsigned int m = 0; m < 2; ++m)
620 (my_degree + 1)][m][
l] = 0.0;
630 [
l] = unit_point_grads
631 [i + (j + (k + 2) * (my_degree + 2) + 2) *
642 p1_grads[i + ((j + 2) * (my_degree + 2) + k + 2) *
651 p1_grads[i + ((j + 2) * (my_degree + 2) + k + 2) *
660 p1_grads[i + ((j + 2) * (my_degree + 2) + k + 2) *
668 (my_degree + 1)][2][0] =
669 p2_grads[i + (j + (k + 2) * (my_degree + 2) + 2) *
677 (my_degree + 1)][2][1] =
678 p2_grads[i + (j + (k + 2) * (my_degree + 2) + 2) *
686 (my_degree + 1)][2][2] =
687 p2_grads[i + (j + (k + 2) * (my_degree + 2) + 2) *
691 for (
unsigned int k = 0; k < 2; ++k)
693 for (
unsigned int l = 0;
l < 2; ++
l)
694 for (
unsigned int m = 0; m < dim; ++m)
696 for (
unsigned int n = 0; n < 2; ++n)
700 (2 * (k + 2 *
l) + 1) * my_degree +
702 (my_degree + 1)][n +
l][m] = 0.0;
704 2 * (k + 2 * (
l + 1)) *
712 grads[(i + 2 * k * (my_degree + 1) +
717 grads[i + (j + (2 * k + 9) * my_degree +
719 (my_degree + 1)][2 *
l][m] = 0.0;
722 for (
unsigned int l = 0;
l < dim; ++
l)
724 grads[i + (j + (2 * k + 5) * my_degree +
726 (my_degree + 1)][0][
l] =
728 ((j + 2) * (my_degree + 2) +
731 grads[(i + 2 * (k + 4) * (my_degree + 1) +
737 (j + k * (my_degree + 2) + 2) *
741 grads[(i + 2 * k * (my_degree + 1) +
745 p1_grads[i + (j + k * (my_degree + 2) + 2) *
747 grads[(i + 2 * k * (my_degree + 1) +
751 p1_grads[i + (j + k * (my_degree + 2) + 2) *
753 grads[(i + 2 * k * (my_degree + 1) +
757 p1_grads[i + (j + k * (my_degree + 2) + 2) *
759 grads[i + (j + (2 * k + 1) * my_degree +
761 (my_degree + 1)][2][0] =
762 p2_grads[i + ((j + 2) * (my_degree + 2) + k) *
764 grads[i + (j + (2 * k + 1) * my_degree +
766 (my_degree + 1)][2][1] =
767 p2_grads[i + ((j + 2) * (my_degree + 2) + k) *
769 grads[i + (j + (2 * k + 1) * my_degree +
771 (my_degree + 1)][2][2] =
772 p2_grads[i + ((j + 2) * (my_degree + 2) + k) *
774 grads[(i + 2 * (k + 2) * (my_degree + 1) +
778 p2_grads[i + (j + k * (my_degree + 2) + 2) *
780 grads[(i + 2 * (k + 2) * (my_degree + 1) +
784 p2_grads[i + (j + k * (my_degree + 2) + 2) *
786 grads[(i + 2 * (k + 2) * (my_degree + 1) +
790 p2_grads[i + (j + k * (my_degree + 2) + 2) *
792 grads[i + (j + (2 * k + 9) * my_degree +
794 (my_degree + 1)][1][0] =
795 p1_grads[i + ((j + 2) * (my_degree + 2) + k) *
797 grads[i + (j + (2 * k + 9) * my_degree +
799 (my_degree + 1)][1][1] =
800 p1_grads[i + ((j + 2) * (my_degree + 2) + k) *
802 grads[i + (j + (2 * k + 9) * my_degree +
804 (my_degree + 1)][1][2] =
805 p1_grads[i + ((j + 2) * (my_degree + 2) + k) *
811 if (grad_grads.size() > 0)
813 for (
unsigned int i = 0; i <= my_degree; ++i)
815 for (
unsigned int j = 0; j < 2; ++j)
817 for (
unsigned int k = 0; k < 2; ++k)
819 for (
unsigned int l = 0;
l < dim; ++
l)
820 for (
unsigned int m = 0; m < dim; ++m)
822 for (
unsigned int n = 0; n < 2; ++n)
825 (j + 4 * k) * (my_degree + 1)]
827 grad_grads[i + (j + 4 * k + 2) *
828 (my_degree + 1)][n + 1][
l]
830 grad_grads[i + (j + 2 * (k + 4)) *
831 (my_degree + 1)][n][
l][m] =
835 grad_grads[i + (j + 4 * k + 2) *
836 (my_degree + 1)][0][
l][m] =
837 unit_point_grad_grads
838 [i + (j + k * (my_degree + 2)) *
839 (my_degree + 1)][
l][m];
842 grad_grads[i + (j + 2 * (k + 4)) *
843 (my_degree + 1)][2][0][0] =
844 p2_grad_grads[i + (j + k * (my_degree + 2)) *
845 (my_degree + 1)][1][1];
846 grad_grads[i + (j + 2 * (k + 4)) *
847 (my_degree + 1)][2][0][1] =
848 p2_grad_grads[i + (j + k * (my_degree + 2)) *
849 (my_degree + 1)][1][2];
850 grad_grads[i + (j + 2 * (k + 4)) *
851 (my_degree + 1)][2][0][2] =
852 p2_grad_grads[i + (j + k * (my_degree + 2)) *
853 (my_degree + 1)][1][0];
854 grad_grads[i + (j + 2 * (k + 4)) *
855 (my_degree + 1)][2][1][0] =
856 p2_grad_grads[i + (j + k * (my_degree + 2)) *
857 (my_degree + 1)][2][1];
858 grad_grads[i + (j + 2 * (k + 4)) *
859 (my_degree + 1)][2][1][1] =
860 p2_grad_grads[i + (j + k * (my_degree + 2)) *
861 (my_degree + 1)][2][2];
862 grad_grads[i + (j + 2 * (k + 4)) *
863 (my_degree + 1)][2][1][2] =
864 p2_grad_grads[i + (j + k * (my_degree + 2)) *
865 (my_degree + 1)][2][0];
866 grad_grads[i + (j + 2 * (k + 4)) *
867 (my_degree + 1)][2][2][0] =
868 p2_grad_grads[i + (j + k * (my_degree + 2)) *
869 (my_degree + 1)][0][1];
870 grad_grads[i + (j + 2 * (k + 4)) *
871 (my_degree + 1)][2][2][1] =
872 p2_grad_grads[i + (j + k * (my_degree + 2)) *
873 (my_degree + 1)][0][2];
874 grad_grads[i + (j + 2 * (k + 4)) *
875 (my_degree + 1)][2][2][2] =
876 p2_grad_grads[i + (j + k * (my_degree + 2)) *
877 (my_degree + 1)][0][0];
880 grad_grads[i + j * (my_degree + 1)][1][0][0] =
881 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
883 grad_grads[i + j * (my_degree + 1)][1][0][1] =
884 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
886 grad_grads[i + j * (my_degree + 1)][1][0][2] =
887 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
889 grad_grads[i + j * (my_degree + 1)][1][1][0] =
890 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
892 grad_grads[i + j * (my_degree + 1)][1][1][1] =
893 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
895 grad_grads[i + j * (my_degree + 1)][1][1][2] =
896 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
898 grad_grads[i + j * (my_degree + 1)][1][2][0] =
899 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
901 grad_grads[i + j * (my_degree + 1)][1][2][1] =
902 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
904 grad_grads[i + j * (my_degree + 1)][1][2][2] =
905 p1_grad_grads[i + j * (my_degree + 1) * (my_degree + 2)]
909 grad_grads[i + 4 * (my_degree + 1)][1][0][0] =
910 p1_grad_grads[i + my_degree + 1][2][2];
911 grad_grads[i + 4 * (my_degree + 1)][1][0][1] =
912 p1_grad_grads[i + my_degree + 1][2][0];
913 grad_grads[i + 4 * (my_degree + 1)][1][0][2] =
914 p1_grad_grads[i + my_degree + 1][2][1];
915 grad_grads[i + 4 * (my_degree + 1)][1][1][0] =
916 p1_grad_grads[i + my_degree + 1][0][2];
917 grad_grads[i + 4 * (my_degree + 1)][1][1][1] =
918 p1_grad_grads[i + my_degree + 1][0][0];
919 grad_grads[i + 4 * (my_degree + 1)][1][1][2] =
920 p1_grad_grads[i + my_degree + 1][0][1];
921 grad_grads[i + 4 * (my_degree + 1)][1][2][0] =
922 p1_grad_grads[i + my_degree + 1][1][2];
923 grad_grads[i + 4 * (my_degree + 1)][1][2][1] =
924 p1_grad_grads[i + my_degree + 1][1][0];
925 grad_grads[i + 4 * (my_degree + 1)][1][2][2] =
926 p1_grad_grads[i + my_degree + 1][1][1];
927 grad_grads[i + 5 * (my_degree + 1)][1][0][0] =
928 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][2][2];
929 grad_grads[i + 5 * (my_degree + 1)][1][0][1] =
930 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][2][0];
931 grad_grads[i + 5 * (my_degree + 1)][1][0][2] =
932 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][2][1];
933 grad_grads[i + 5 * (my_degree + 1)][1][1][0] =
934 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][0][2];
935 grad_grads[i + 5 * (my_degree + 1)][1][1][1] =
936 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][0][0];
937 grad_grads[i + 5 * (my_degree + 1)][1][1][2] =
938 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][0][1];
939 grad_grads[i + 5 * (my_degree + 1)][1][2][0] =
940 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][1][2];
941 grad_grads[i + 5 * (my_degree + 1)][1][2][1] =
942 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][1][0];
943 grad_grads[i + 5 * (my_degree + 1)][1][2][2] =
944 p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][1][1];
948 for (
unsigned int i = 0; i <= my_degree; ++i)
949 for (
unsigned int j = 0; j < my_degree; ++j)
951 for (
unsigned int k = 0; k < my_degree; ++k)
953 for (
unsigned int l = 0;
l < dim; ++
l)
954 for (
unsigned int m = 0; m < dim; ++m)
956 for (
unsigned int n = 0; n < 2; ++n)
981 dim>::faces_per_cell +
985 (my_degree + 1)][n][
l][m] = 0.0;
996 [m] = unit_point_grad_grads
997 [i + (j + (k + 2) * (my_degree + 2) + 2) *
998 (my_degree + 1)][
l][m];
1009 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1011 (my_degree + 1)][2][2];
1020 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1022 (my_degree + 1)][2][0];
1031 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1033 (my_degree + 1)][2][1];
1042 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1044 (my_degree + 1)][0][2];
1053 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1055 (my_degree + 1)][0][0];
1064 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1066 (my_degree + 1)][0][1];
1075 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1077 (my_degree + 1)][1][2];
1086 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1088 (my_degree + 1)][1][0];
1097 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k +
1099 (my_degree + 1)][1][1];
1107 (my_degree + 1)][2][0][0] =
1109 (j + (k + 2) * (my_degree + 2) + 2) *
1110 (my_degree + 1)][1][1];
1118 (my_degree + 1)][2][0][1] =
1120 (j + (k + 2) * (my_degree + 2) + 2) *
1121 (my_degree + 1)][1][2];
1129 (my_degree + 1)][2][0][2] =
1131 (j + (k + 2) * (my_degree + 2) + 2) *
1132 (my_degree + 1)][1][0];
1140 (my_degree + 1)][2][1][0] =
1142 (j + (k + 2) * (my_degree + 2) + 2) *
1143 (my_degree + 1)][2][1];
1151 (my_degree + 1)][2][1][1] =
1153 (j + (k + 2) * (my_degree + 2) + 2) *
1154 (my_degree + 1)][2][2];
1162 (my_degree + 1)][2][1][2] =
1164 (j + (k + 2) * (my_degree + 2) + 2) *
1165 (my_degree + 1)][2][0];
1173 (my_degree + 1)][2][2][0] =
1175 (j + (k + 2) * (my_degree + 2) + 2) *
1176 (my_degree + 1)][0][1];
1184 (my_degree + 1)][2][2][1] =
1186 (j + (k + 2) * (my_degree + 2) + 2) *
1187 (my_degree + 1)][0][2];
1195 (my_degree + 1)][2][2][2] =
1197 (j + (k + 2) * (my_degree + 2) + 2) *
1198 (my_degree + 1)][0][0];
1201 for (
unsigned int k = 0; k < 2; ++k)
1203 for (
unsigned int l = 0;
l < dim; ++
l)
1204 for (
unsigned int m = 0; m < dim; ++m)
1206 for (
unsigned int n = 0; n < 2; ++n)
1208 for (
unsigned int o = 0; o < 2; ++o)
1213 (2 * (k + 2 * n) + 1) * my_degree +
1215 (my_degree + 1)][o + n][
l][m] =
1219 2 * (k + 2 * (n + 1)) *
1225 [o + k][
l][m] = 0.0;
1229 [(i + 2 * k * (my_degree + 1) +
1233 [2 * n][
l][m] = 0.0;
1235 [i + (j + (2 * k + 9) * my_degree +
1237 (my_degree + 1)][2 * n][
l][m] =
1242 (j + (2 * k + 5) * my_degree +
1244 (my_degree + 1)][0][
l][m] =
1245 unit_point_grad_grads
1246 [i + ((j + 2) * (my_degree + 2) + k) *
1247 (my_degree + 1)][
l][m];
1248 grad_grads[(i + 2 * (k + 4) * (my_degree + 1) +
1253 [
l][m] = unit_point_grad_grads
1254 [i + (j + k * (my_degree + 2) + 2) *
1255 (my_degree + 1)][
l][m];
1259 [(i + 2 * k * (my_degree + 1) +
1263 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1264 (my_degree + 1)][2][2];
1266 [(i + 2 * k * (my_degree + 1) +
1270 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1271 (my_degree + 1)][2][0];
1273 [(i + 2 * k * (my_degree + 1) +
1277 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1278 (my_degree + 1)][2][1];
1280 [(i + 2 * k * (my_degree + 1) +
1284 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1285 (my_degree + 1)][0][2];
1287 [(i + 2 * k * (my_degree + 1) +
1291 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1292 (my_degree + 1)][0][0];
1294 [(i + 2 * k * (my_degree + 1) +
1298 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1299 (my_degree + 1)][0][1];
1301 [(i + 2 * k * (my_degree + 1) +
1305 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1306 (my_degree + 1)][1][2];
1308 [(i + 2 * k * (my_degree + 1) +
1312 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1313 (my_degree + 1)][1][0];
1315 [(i + 2 * k * (my_degree + 1) +
1319 p1_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1320 (my_degree + 1)][1][1];
1321 grad_grads[i + (j + (2 * k + 1) * my_degree +
1323 (my_degree + 1)][2][0][0] =
1324 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1325 (my_degree + 1)][1][1];
1326 grad_grads[i + (j + (2 * k + 1) * my_degree +
1328 (my_degree + 1)][2][0][1] =
1329 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1330 (my_degree + 1)][1][2];
1331 grad_grads[i + (j + (2 * k + 1) * my_degree +
1333 (my_degree + 1)][2][0][2] =
1334 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1335 (my_degree + 1)][1][0];
1336 grad_grads[i + (j + (2 * k + 1) * my_degree +
1338 (my_degree + 1)][2][1][0] =
1339 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1340 (my_degree + 1)][2][1];
1341 grad_grads[i + (j + (2 * k + 1) * my_degree +
1343 (my_degree + 1)][2][1][1] =
1344 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1345 (my_degree + 1)][2][2];
1346 grad_grads[i + (j + (2 * k + 1) * my_degree +
1348 (my_degree + 1)][2][1][2] =
1349 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1350 (my_degree + 1)][2][0];
1351 grad_grads[i + (j + (2 * k + 1) * my_degree +
1353 (my_degree + 1)][2][2][0] =
1354 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1355 (my_degree + 1)][0][1];
1356 grad_grads[i + (j + (2 * k + 1) * my_degree +
1358 (my_degree + 1)][2][2][1] =
1359 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1360 (my_degree + 1)][0][2];
1361 grad_grads[i + (j + (2 * k + 1) * my_degree +
1363 (my_degree + 1)][2][2][2] =
1364 p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1365 (my_degree + 1)][0][0];
1367 [(i + 2 * (k + 2) * (my_degree + 1) +
1371 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1372 (my_degree + 1)][1][1];
1374 [(i + 2 * (k + 2) * (my_degree + 1) +
1378 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1379 (my_degree + 1)][1][2];
1381 [(i + 2 * (k + 2) * (my_degree + 1) +
1385 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1386 (my_degree + 1)][1][0];
1388 [(i + 2 * (k + 2) * (my_degree + 1) +
1392 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1393 (my_degree + 1)][2][1];
1395 [(i + 2 * (k + 2) * (my_degree + 1) +
1399 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1400 (my_degree + 1)][2][2];
1402 [(i + 2 * (k + 2) * (my_degree + 1) +
1406 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1407 (my_degree + 1)][2][0];
1409 [(i + 2 * (k + 2) * (my_degree + 1) +
1413 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1414 (my_degree + 1)][0][1];
1416 [(i + 2 * (k + 2) * (my_degree + 1) +
1420 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1421 (my_degree + 1)][0][2];
1423 [(i + 2 * (k + 2) * (my_degree + 1) +
1427 p2_grad_grads[i + (j + k * (my_degree + 2) + 2) *
1428 (my_degree + 1)][0][0];
1429 grad_grads[i + (j + (2 * k + 9) * my_degree +
1431 (my_degree + 1)][1][0][0] =
1432 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1433 (my_degree + 1)][2][2];
1434 grad_grads[i + (j + (2 * k + 9) * my_degree +
1436 (my_degree + 1)][1][0][1] =
1437 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1438 (my_degree + 1)][2][0];
1439 grad_grads[i + (j + (2 * k + 9) * my_degree +
1441 (my_degree + 1)][1][0][2] =
1442 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1443 (my_degree + 1)][2][1];
1444 grad_grads[i + (j + (2 * k + 9) * my_degree +
1446 (my_degree + 1)][1][1][0] =
1447 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1448 (my_degree + 1)][0][2];
1449 grad_grads[i + (j + (2 * k + 9) * my_degree +
1451 (my_degree + 1)][1][1][1] =
1452 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1453 (my_degree + 1)][0][0];
1454 grad_grads[i + (j + (2 * k + 9) * my_degree +
1456 (my_degree + 1)][1][1][2] =
1457 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1458 (my_degree + 1)][0][1];
1459 grad_grads[i + (j + (2 * k + 9) * my_degree +
1461 (my_degree + 1)][1][2][0] =
1462 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1463 (my_degree + 1)][1][2];
1464 grad_grads[i + (j + (2 * k + 9) * my_degree +
1466 (my_degree + 1)][1][2][1] =
1467 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1468 (my_degree + 1)][1][0];
1469 grad_grads[i + (j + (2 * k + 9) * my_degree +
1471 (my_degree + 1)][1][2][2] =
1472 p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k) *
1473 (my_degree + 1)][1][1];
1497 return 2 * (k + 1) * (k + 2);
1500 return 3 * (k + 1) * (k + 2) * (k + 2);
1512std::unique_ptr<TensorPolynomialsBase<dim>>
1515 return std::make_unique<PolynomialsNedelec<dim>>(*this);
virtual std::unique_ptr< TensorPolynomialsBase< dim > > clone() const override
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
PolynomialsNedelec(const unsigned int k)
static std::vector< std::vector< Polynomials::Polynomial< double > > > create_polynomials(const unsigned int k)
static unsigned int n_polynomials(const unsigned int degree)
static std::vector< Polynomial< double > > generate_complete_basis(const unsigned int degree)
static std::vector< Polynomial< double > > generate_complete_basis(const unsigned int p)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
Tensor< 2, dim, Number > l(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)