16 #include <deal.II/base/logstream.h> 17 #include <deal.II/base/utilities.h> 18 #include <deal.II/base/quadrature.h> 19 #include <deal.II/base/quadrature_lib.h> 20 #include <deal.II/base/qprojector.h> 21 #include <deal.II/grid/tria.h> 22 #include <deal.II/grid/tria_iterator.h> 23 #include <deal.II/dofs/dof_accessor.h> 24 #include <deal.II/fe/mapping.h> 25 #include <deal.II/fe/fe_nedelec.h> 26 #include <deal.II/fe/fe_nothing.h> 27 #include <deal.II/fe/fe_values.h> 28 #include <deal.II/fe/fe_tools.h> 29 #include <deal.II/lac/full_matrix.h> 30 #include <deal.II/lac/vector.h> 39 DEAL_II_NAMESPACE_OPEN
48 get_embedding_computation_tolerance(
const unsigned int p)
55 return 1.e-15*std::exp(std::pow(p,1.075));
71 std::vector<bool> (dim, true)))
99 deallog <<
"Face Embedding" << std::endl;
103 for (
unsigned int i = 0; i < GeometryInfo<dim>::max_children_per_face; ++i)
106 FETools::compute_face_embedding_matrices<dim,double>
107 (*
this, face_embeddings, 0, 0,
108 internal::get_embedding_computation_tolerance(order));
123 for (
unsigned int i = 0; i < GeometryInfo<2>::max_children_per_face;
128 = face_embeddings[i] (j, k);
138 unsigned int target_row = 0;
140 for (
unsigned int i = 0; i < 2; ++i)
141 for (
unsigned int j = this->
degree; j < 2 * this->
degree;
145 = face_embeddings[2 * i] (j, k);
147 for (
unsigned int i = 0; i < 2; ++i)
148 for (
unsigned int j = 3 * this->degree;
149 j < GeometryInfo<3>::lines_per_face * this->
degree;
153 = face_embeddings[i] (j, k);
155 for (
unsigned int i = 0; i < 2; ++i)
156 for (
unsigned int j = 0; j < 2; ++j)
157 for (
unsigned int k = i * this->degree;
158 k < (i + 1) * this->degree; ++k, ++target_row)
161 = face_embeddings[i + 2 * j] (k, l);
163 for (
unsigned int i = 0; i < 2; ++i)
164 for (
unsigned int j = 0; j < 2; ++j)
165 for (
unsigned int k = (i + 2) * this->
degree;
166 k < (i + 3) * this->degree; ++k, ++target_row)
169 = face_embeddings[2 * i + j] (k, l);
171 for (
unsigned int i = 0; i < GeometryInfo<3>::max_children_per_face;
178 = face_embeddings[i] (j, k);
202 std::ostringstream namebuf;
203 namebuf <<
"FE_Nedelec<" << dim <<
">(" << this->degree-1 <<
")";
205 return namebuf.str();
244 const std::vector<Polynomials::Polynomial<double> > &lobatto_polynomials
246 std::vector<Polynomials::Polynomial<double> >
247 lobatto_polynomials_grad (order + 1);
249 for (
unsigned int i = 0; i < lobatto_polynomials_grad.size (); ++i)
250 lobatto_polynomials_grad[i] = lobatto_polynomials[i + 1].derivative ();
254 const QGauss<dim - 1> reference_edge_quadrature (order + 1);
255 const unsigned int n_edge_points = reference_edge_quadrature.size ();
256 const unsigned int n_boundary_points
261 this->generalized_face_support_points.resize (n_edge_points);
264 for (
unsigned int q_point = 0; q_point < n_edge_points; ++q_point)
265 this->generalized_face_support_points[q_point]
266 = reference_edge_quadrature.point (q_point);
274 const unsigned int &n_interior_points = quadrature.size ();
276 this->generalized_support_points.resize
277 (n_boundary_points + n_interior_points);
278 boundary_weights.reinit (n_edge_points, order);
280 for (
unsigned int q_point = 0; q_point < n_edge_points;
283 for (
unsigned int line = 0;
284 line < GeometryInfo<dim>::lines_per_cell; ++line)
285 this->generalized_support_points[line * n_edge_points
287 = edge_quadrature.
point 289 (line,
true,
false,
false, n_edge_points) + q_point);
291 for (
unsigned int i = 0; i < order; ++i)
292 boundary_weights (q_point, i)
293 = reference_edge_quadrature.weight (q_point)
294 * lobatto_polynomials_grad[i + 1].value
295 (this->generalized_face_support_points[q_point] (0));
298 for (
unsigned int q_point = 0; q_point < n_interior_points;
300 this->generalized_support_points[q_point + n_boundary_points]
301 = quadrature.point (q_point);
308 this->generalized_support_points.resize (n_boundary_points);
310 for (
unsigned int line = 0;
311 line < GeometryInfo<dim>::lines_per_cell; ++line)
312 for (
unsigned int q_point = 0; q_point < n_edge_points;
314 this->generalized_support_points[line * n_edge_points
316 = edge_quadrature.
point 318 (line,
true,
false,
false, n_edge_points) + q_point);
331 const std::vector<Polynomials::Polynomial<double> > &lobatto_polynomials
333 std::vector<Polynomials::Polynomial<double> >
334 lobatto_polynomials_grad (order + 1);
336 for (
unsigned int i = 0; i < lobatto_polynomials_grad.size (); ++i)
337 lobatto_polynomials_grad[i] = lobatto_polynomials[i + 1].derivative ();
341 const QGauss<1> reference_edge_quadrature (order + 1);
342 const unsigned int &n_edge_points = reference_edge_quadrature.size ();
345 (reference_edge_quadrature);
352 const QGauss<dim - 1> reference_face_quadrature (order + 1);
353 const unsigned int &n_face_points
354 = reference_face_quadrature.size ();
355 const unsigned int n_boundary_points
359 const unsigned int &n_interior_points = quadrature.size ();
361 boundary_weights.reinit (n_edge_points + n_face_points,
362 2 * (order + 1) * order);
363 this->generalized_face_support_points.resize
364 (4 * n_edge_points + n_face_points);
365 this->generalized_support_points.resize
366 (n_boundary_points + n_interior_points);
369 for (
unsigned int q_point = 0; q_point < n_edge_points; ++q_point)
371 for (
unsigned int line = 0;
373 this->generalized_face_support_points[line * n_edge_points
375 = edge_quadrature.point
377 (line,
true,
false,
false, n_edge_points) + q_point);
379 for (
unsigned int i = 0; i < 2; ++i)
380 for (
unsigned int j = 0; j < 2; ++j)
382 this->generalized_support_points
383 [q_point + (i + 4 * j) * n_edge_points]
385 (i, reference_edge_quadrature.point (q_point) (0),
387 this->generalized_support_points
388 [q_point + (i + 4 * j + 2) * n_edge_points]
390 (reference_edge_quadrature.point (q_point) (0),
392 this->generalized_support_points
393 [q_point + (i + 2 * (j + 4)) * n_edge_points]
396 reference_edge_quadrature.point (q_point) (0));
399 for (
unsigned int i = 0; i < order; ++i)
400 boundary_weights (q_point, i)
401 = reference_edge_quadrature.weight (q_point)
402 * lobatto_polynomials_grad[i + 1].value
403 (this->generalized_face_support_points[q_point] (1));
407 for (
unsigned int q_point = 0; q_point < n_face_points;
410 this->generalized_face_support_points[q_point
412 = reference_face_quadrature.point (q_point);
414 for (
unsigned int i = 0; i <= order; ++i)
415 for (
unsigned int j = 0; j < order; ++j)
417 boundary_weights (q_point + n_edge_points,
419 = reference_face_quadrature.weight (q_point)
420 * lobatto_polynomials_grad[i].value
421 (this->generalized_face_support_points
422 [q_point + 4 * n_edge_points] (0))
423 * lobatto_polynomials[j + 2].value
424 (this->generalized_face_support_points
425 [q_point + 4 * n_edge_points] (1));
426 boundary_weights (q_point + n_edge_points,
427 2 * (i * order + j) + 1)
428 = reference_face_quadrature.weight (q_point)
429 * lobatto_polynomials_grad[i].value
430 (this->generalized_face_support_points
431 [q_point + 4 * n_edge_points] (1))
432 * lobatto_polynomials[j + 2].value
433 (this->generalized_face_support_points
434 [q_point + 4 * n_edge_points] (0));
440 (reference_face_quadrature);
442 for (
unsigned int face = 0;
443 face < GeometryInfo<dim>::faces_per_cell; ++face)
444 for (
unsigned int q_point = 0; q_point < n_face_points;
447 this->generalized_support_points
448 [face * n_face_points + q_point
450 = face_quadrature.
point 452 (face,
true,
false,
false, n_face_points) + q_point);
456 for (
unsigned int q_point = 0; q_point < n_interior_points;
458 this->generalized_support_points[q_point + n_boundary_points]
459 = quadrature.point (q_point);
464 this->generalized_face_support_points.resize (4 * n_edge_points);
465 this->generalized_support_points.resize
468 for (
unsigned int q_point = 0; q_point < n_edge_points;
471 for (
unsigned int line = 0;
473 this->generalized_face_support_points[line * n_edge_points
475 = edge_quadrature.point
477 (line,
true,
false,
false, n_edge_points) + q_point);
479 for (
unsigned int i = 0; i < 2; ++i)
480 for (
unsigned int j = 0; j < 2; ++j)
482 this->generalized_support_points
483 [q_point + (i + 4 * j) * n_edge_points]
485 (i, reference_edge_quadrature.point (q_point) (0),
487 this->generalized_support_points
488 [q_point + (i + 4 * j + 2) * n_edge_points]
490 (reference_edge_quadrature.point (q_point) (0),
492 this->generalized_support_points
493 [q_point + (i + 2 * (j + 4)) * n_edge_points]
496 reference_edge_quadrature.point (q_point) (0));
511 for (
unsigned int i = 0; i < GeometryInfo<1>::max_children_per_cell; ++i)
512 this->restriction[0][i].reinit(0, 0);
528 const QGauss<1> edge_quadrature (2 * this->degree);
529 const std::vector<Point<1> > &edge_quadrature_points
532 n_edge_quadrature_points = edge_quadrature.
size ();
544 for (
unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
545 for (
unsigned int q_point = 0; q_point < n_edge_quadrature_points;
548 const double weight = 2.0 * edge_quadrature.
weight (q_point);
550 if (edge_quadrature_points[q_point] (0) < 0.5)
553 2.0 * edge_quadrature_points[q_point] (0));
555 this->restriction[index][0] (0, dof) += weight
556 * this->shape_value_component
560 quadrature_point (0) = 1.0;
561 this->restriction[index][1] (this->degree, dof)
562 += weight * this->shape_value_component (dof,
565 quadrature_point (0) = quadrature_point (1);
566 quadrature_point (1) = 0.0;
567 this->restriction[index][0] (2 * this->degree, dof)
568 += weight * this->shape_value_component (dof,
571 quadrature_point (1) = 1.0;
572 this->restriction[index][2] (3 * this->degree, dof)
573 += weight * this->shape_value_component (dof,
581 2.0 * edge_quadrature_points[q_point] (0)
584 this->restriction[index][2] (0, dof) += weight
585 * this->shape_value_component
589 quadrature_point (0) = 1.0;
590 this->restriction[index][3] (this->degree, dof)
591 += weight * this->shape_value_component (dof,
594 quadrature_point (0) = quadrature_point (1);
595 quadrature_point (1) = 0.0;
596 this->restriction[index][1] (2 * this->degree, dof)
597 += weight * this->shape_value_component (dof,
600 quadrature_point (1) = 1.0;
601 this->restriction[index][3] (3 * this->degree, dof)
602 += weight * this->shape_value_component (dof,
612 if (this->degree > 1)
614 const unsigned int deg = this->degree-1;
615 const std::vector<Polynomials::Polynomial<double> > &
622 n_edge_quadrature_points);
624 for (
unsigned int q_point = 0;
625 q_point < n_edge_quadrature_points; ++q_point)
628 = std::sqrt (edge_quadrature.
weight (q_point));
630 for (
unsigned int i = 0; i < deg; ++i)
631 assembling_matrix (i, q_point) = weight
632 * legendre_polynomials[i + 1].value
633 (edge_quadrature_points[q_point] (0));
638 assembling_matrix.
mTmult (system_matrix, assembling_matrix);
639 system_matrix_inv.
invert (system_matrix);
646 for (
unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
647 for (
unsigned int i = 0; i < 2; ++i)
651 for (
unsigned int q_point = 0;
652 q_point < n_edge_quadrature_points; ++q_point)
655 = edge_quadrature.
weight (q_point);
657 edge_quadrature_points[q_point] (0));
659 (edge_quadrature_points[q_point] (0),
662 if (edge_quadrature_points[q_point] (0) < 0.5)
665 2.0 * edge_quadrature_points[q_point] (0));
668 * (2.0 * this->shape_value_component
669 (dof, quadrature_point_2, 1)
670 - this->restriction[index][i]
671 (i * this->degree, dof)
672 * this->shape_value_component
674 quadrature_point_0, 1));
675 tmp (1) = -1.0 * weight
676 * this->restriction[index][i + 2]
677 (i * this->degree, dof)
678 * this->shape_value_component
680 quadrature_point_0, 1);
682 =
Point<dim> (2.0 * edge_quadrature_points[q_point] (0),
685 * (2.0 * this->shape_value_component
686 (dof, quadrature_point_2, 0)
687 - this->restriction[index][2 * i]
688 ((i + 2) * this->degree, dof)
689 * this->shape_value_component
690 ((i + 2) * this->degree,
691 quadrature_point_1, 0));
692 tmp (3) = -1.0 * weight
693 * this->restriction[index][2 * i + 1]
694 ((i + 2) * this->degree, dof)
695 * this->shape_value_component
696 ((i + 2) * this->degree,
697 quadrature_point_1, 0);
702 tmp (0) = -1.0 * weight
703 * this->restriction[index][i]
704 (i * this->degree, dof)
705 * this->shape_value_component
707 quadrature_point_0, 1);
710 2.0 * edge_quadrature_points[q_point] (0)
714 * (2.0 * this->shape_value_component
715 (dof, quadrature_point_2, 1)
716 - this->restriction[index][i + 2]
717 (i * this->degree, dof)
718 * this->shape_value_component
720 quadrature_point_0, 1));
721 tmp (2) = -1.0 * weight
722 * this->restriction[index][2 * i]
723 ((i + 2) * this->degree, dof)
724 * this->shape_value_component
725 ((i + 2) * this->degree,
726 quadrature_point_1, 0);
728 =
Point<dim> (2.0 * edge_quadrature_points[q_point] (0)
731 * (2.0 * this->shape_value_component
732 (dof, quadrature_point_2, 0)
733 - this->restriction[index][2 * i + 1]
734 ((i + 2) * this->degree, dof)
735 * this->shape_value_component
736 ((i + 2) * this->degree,
737 quadrature_point_1, 0));
740 for (
unsigned int j = 0; j < this->degree-1; ++j)
743 = legendre_polynomials[j + 1].value
744 (edge_quadrature_points[q_point] (0));
746 for (
unsigned int k = 0; k < tmp.
size (); ++k)
747 system_rhs (j, k) += tmp (k) * L_j;
751 system_matrix_inv.
mmult (solution, system_rhs);
753 for (
unsigned int j = 0; j < this->degree-1; ++j)
754 for (
unsigned int k = 0; k < 2; ++k)
756 if (std::abs (solution (j, k)) > 1e-14)
757 this->restriction[index][i + 2 * k]
758 (i * this->degree + j + 1, dof)
761 if (std::abs (solution (j, k + 2)) > 1e-14)
762 this->restriction[index][2 * i + k]
763 ((i + 2) * this->degree + j + 1, dof)
764 = solution (j, k + 2);
769 const std::vector<Point<dim> > &
771 const std::vector<Polynomials::Polynomial<double> > &
775 const unsigned int n_boundary_dofs
777 const unsigned int &n_quadrature_points = quadrature.
size ();
781 n_quadrature_points);
783 for (
unsigned int q_point = 0; q_point < n_quadrature_points;
787 = std::sqrt (quadrature.
weight (q_point));
789 for (
unsigned int i = 0; i < this->degree; ++i)
791 const double L_i = weight
792 * legendre_polynomials[i].value
793 (quadrature_points[q_point] (0));
795 for (
unsigned int j = 0; j < this->degree-1; ++j)
796 assembling_matrix (i * (this->degree-1) + j, q_point)
797 = L_i * lobatto_polynomials[j + 2].value
798 (quadrature_points[q_point] (1));
803 assembling_matrix.
m ());
805 assembling_matrix.
mTmult (system_matrix, assembling_matrix);
806 system_matrix_inv.
reinit (system_matrix.m (), system_matrix.m ());
807 system_matrix_inv.
invert (system_matrix);
810 solution.
reinit (system_matrix_inv.
m (), 8);
811 system_rhs.
reinit (system_matrix_inv.
m (), 8);
814 for (
unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
818 for (
unsigned int q_point = 0;
819 q_point < n_quadrature_points; ++q_point)
823 if (quadrature_points[q_point] (0) < 0.5)
825 if (quadrature_points[q_point] (1) < 0.5)
828 (2.0 * quadrature_points[q_point] (0),
829 2.0 * quadrature_points[q_point] (1));
831 tmp (0) += 2.0 * this->shape_value_component
832 (dof, quadrature_point, 0);
833 tmp (1) += 2.0 * this->shape_value_component
834 (dof, quadrature_point, 1);
840 (2.0 * quadrature_points[q_point] (0),
841 2.0 * quadrature_points[q_point] (1)
844 tmp (4) += 2.0 * this->shape_value_component
845 (dof, quadrature_point, 0);
846 tmp (5) += 2.0 * this->shape_value_component
847 (dof, quadrature_point, 1);
851 else if (quadrature_points[q_point] (1) < 0.5)
854 (2.0 * quadrature_points[q_point] (0)
856 2.0 * quadrature_points[q_point] (1));
858 tmp (2) += 2.0 * this->shape_value_component
859 (dof, quadrature_point, 0);
860 tmp (3) += 2.0 * this->shape_value_component
861 (dof, quadrature_point, 1);
867 (2.0 * quadrature_points[q_point] (0)
869 2.0 * quadrature_points[q_point] (1)
872 tmp (6) += 2.0 * this->shape_value_component
873 (dof, quadrature_point, 0);
874 tmp (7) += 2.0 * this->shape_value_component
875 (dof, quadrature_point, 1);
878 for (
unsigned int i = 0; i < 2; ++i)
879 for (
unsigned int j = 0; j < this->degree; ++j)
881 tmp (2 * i) -= this->restriction[index][i]
882 (j + 2 * this->degree, dof)
883 * this->shape_value_component
884 (j + 2 * this->degree,
885 quadrature_points[q_point], 0);
886 tmp (2 * i + 1) -= this->restriction[index][i]
887 (i * this->degree + j, dof)
888 * this->shape_value_component
889 (i * this->degree + j,
890 quadrature_points[q_point], 1);
891 tmp (2 * (i + 2)) -= this->restriction[index][i + 2]
892 (j + 3 * this->degree, dof)
893 * this->shape_value_component
894 (j + 3 * this->degree,
895 quadrature_points[q_point],
897 tmp (2 * i + 5) -= this->restriction[index][i + 2]
898 (i * this->degree + j, dof)
899 * this->shape_value_component
900 (i * this->degree + j,
901 quadrature_points[q_point], 1);
904 tmp *= quadrature.
weight (q_point);
906 for (
unsigned int i = 0; i < this->degree; ++i)
909 = legendre_polynomials[i].value
910 (quadrature_points[q_point] (0));
912 = legendre_polynomials[i].value
913 (quadrature_points[q_point] (1));
915 for (
unsigned int j = 0; j < this->degree-1; ++j)
918 = L_i_0 * lobatto_polynomials[j + 2].value
919 (quadrature_points[q_point] (1));
921 = L_i_1 * lobatto_polynomials[j + 2].value
922 (quadrature_points[q_point] (0));
924 for (
unsigned int k = 0; k < 4; ++k)
926 system_rhs (i * (this->degree-1) + j, 2 * k)
927 += tmp (2 * k) * l_j_0;
928 system_rhs (i * (this->degree-1) + j, 2 * k + 1)
929 += tmp (2 * k + 1) * l_j_1;
935 system_matrix_inv.
mmult (solution, system_rhs);
937 for (
unsigned int i = 0; i < this->degree; ++i)
938 for (
unsigned int j = 0; j < this->degree-1; ++j)
939 for (
unsigned int k = 0; k < 4; ++k)
941 if (std::abs (solution (i * (this->degree-1) + j, 2 * k))
943 this->restriction[index][k]
944 (i * (this->degree-1) + j + n_boundary_dofs, dof)
945 = solution (i * (this->degree-1) + j, 2 * k);
947 if (std::abs (solution (i * (this->degree-1) + j, 2 * k + 1))
949 this->restriction[index][k]
950 (i + (this->degree-1 + j) * this->degree + n_boundary_dofs,
952 = solution (i * (this->degree-1) + j, 2 * k + 1);
966 for (
unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
967 for (
unsigned int q_point = 0; q_point < n_edge_quadrature_points;
970 const double weight = 2.0 * edge_quadrature.
weight (q_point);
972 if (edge_quadrature_points[q_point] (0) < 0.5)
973 for (
unsigned int i = 0; i < 2; ++i)
974 for (
unsigned int j = 0; j < 2; ++j)
977 2.0 * edge_quadrature_points[q_point] (0),
980 this->restriction[index][i + 4 * j]
981 ((i + 4 * j) * this->degree, dof)
982 += weight * this->shape_value_component (dof,
986 =
Point<dim> (2.0 * edge_quadrature_points[q_point] (0),
988 this->restriction[index][2 * (i + 2 * j)]
989 ((i + 4 * j + 2) * this->degree, dof)
990 += weight * this->shape_value_component (dof,
994 2.0 * edge_quadrature_points[q_point] (0));
995 this->restriction[index][i + 2 * j]
996 ((i + 2 * (j + 4)) * this->degree, dof)
997 += weight * this->shape_value_component (dof,
1003 for (
unsigned int i = 0; i < 2; ++i)
1004 for (
unsigned int j = 0; j < 2; ++j)
1007 2.0 * edge_quadrature_points[q_point] (0)
1010 this->restriction[index][i + 4 * j + 2]
1011 ((i + 4 * j) * this->degree, dof)
1012 += weight * this->shape_value_component (dof,
1016 =
Point<dim> (2.0 * edge_quadrature_points[q_point] (0)
1018 this->restriction[index][2 * (i + 2 * j) + 1]
1019 ((i + 4 * j + 2) * this->degree, dof)
1020 += weight * this->shape_value_component (dof,
1024 2.0 * edge_quadrature_points[q_point] (0)
1026 this->restriction[index][i + 2 * (j + 2)]
1027 ((i + 2 * (j + 4)) * this->degree, dof)
1028 += weight * this->shape_value_component (dof,
1038 if (this->degree > 1)
1040 const unsigned int deg = this->degree-1;
1041 const std::vector<Polynomials::Polynomial<double> > &
1042 legendre_polynomials
1048 n_edge_quadrature_points);
1050 for (
unsigned int q_point = 0;
1051 q_point < n_edge_quadrature_points; ++q_point)
1053 const double weight = std::sqrt (edge_quadrature.
weight 1056 for (
unsigned int i = 0; i < deg; ++i)
1057 assembling_matrix (i, q_point) = weight
1058 * legendre_polynomials[i + 1].value
1059 (edge_quadrature_points[q_point] (0));
1064 assembling_matrix.
mTmult (system_matrix, assembling_matrix);
1065 system_matrix_inv.
invert (system_matrix);
1072 for (
unsigned int i = 0; i < 2; ++i)
1073 for (
unsigned int j = 0; j < 2; ++j)
1074 for (
unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
1078 for (
unsigned int q_point = 0;
1079 q_point < n_edge_quadrature_points; ++q_point)
1081 const double weight = edge_quadrature.
weight 1084 edge_quadrature_points[q_point] (0),
1088 (edge_quadrature_points[q_point] (0), i, j);
1090 edge_quadrature_points[q_point] (0));
1092 if (edge_quadrature_points[q_point] (0) < 0.5)
1095 2.0 * edge_quadrature_points[q_point] (0),
1099 * (2.0 * this->shape_value_component
1100 (dof, quadrature_point_3, 1)
1101 - this->restriction[index][i + 4 * j]
1102 ((i + 4 * j) * this->degree,
1104 * this->shape_value_component
1105 ((i + 4 * j) * this->degree,
1106 quadrature_point_0, 1));
1107 tmp (1) = -1.0 * weight
1108 * this->restriction[index][i + 4 * j + 2]
1109 ((i + 4 * j) * this->degree,
1111 * this->shape_value_component
1112 ((i + 4 * j) * this->degree,
1113 quadrature_point_0, 1);
1115 =
Point<dim> (2.0 * edge_quadrature_points[q_point] (0),
1118 * (2.0 * this->shape_value_component
1119 (dof, quadrature_point_3, 0)
1120 - this->restriction[index][2 * (i + 2 * j)]
1121 ((i + 4 * j + 2) * this->degree,
1123 * this->shape_value_component
1124 ((i + 4 * j + 2) * this->degree,
1125 quadrature_point_1, 0));
1126 tmp (3) = -1.0 * weight
1127 * this->restriction[index][2 * (i + 2 * j) + 1]
1128 ((i + 4 * j + 2) * this->degree,
1130 * this->shape_value_component
1131 ((i + 4 * j + 2) * this->degree,
1132 quadrature_point_1, 0);
1134 2.0 * edge_quadrature_points[q_point] (0));
1136 * (2.0 * this->shape_value_component
1137 (dof, quadrature_point_3, 2)
1138 - this->restriction[index][i + 2 * j]
1139 ((i + 2 * (j + 4)) * this->degree,
1141 * this->shape_value_component
1142 ((i + 2 * (j + 4)) * this->degree,
1143 quadrature_point_2, 2));
1144 tmp (5) = -1.0 * weight
1145 * this->restriction[index][i + 2 * (j + 2)]
1146 ((i + 2 * (j + 4)) * this->degree,
1148 * this->shape_value_component
1149 ((i + 2 * (j + 4)) * this->degree,
1150 quadrature_point_2, 2);
1155 tmp (0) = -1.0 * weight
1156 * this->restriction[index][i + 4 * j]
1157 ((i + 4 * j) * this->degree,
1159 * this->shape_value_component
1160 ((i + 4 * j) * this->degree,
1161 quadrature_point_0, 1);
1164 2.0 * edge_quadrature_points[q_point] (0)
1168 * (2.0 * this->shape_value_component
1169 (dof, quadrature_point_3, 1)
1170 - this->restriction[index][i + 4 * j + 2]
1171 ((i + 4 * j) * this->degree,
1173 * this->shape_value_component
1174 ((i + 4 * j) * this->degree,
1175 quadrature_point_0, 1));
1176 tmp (2) = -1.0 * weight
1177 * this->restriction[index][2 * (i + 2 * j)]
1178 ((i + 4 * j + 2) * this->degree,
1180 * this->shape_value_component
1181 ((i + 4 * j + 2) * this->degree,
1182 quadrature_point_1, 0);
1184 =
Point<dim> (2.0 * edge_quadrature_points[q_point] (0)
1187 * (2.0 * this->shape_value_component
1188 (dof, quadrature_point_3, 0)
1189 - this->restriction[index][2 * (i + 2 * j) + 1]
1190 ((i + 4 * j + 2) * this->degree,
1192 * this->shape_value_component
1193 ((i + 4 * j + 2) * this->degree,
1194 quadrature_point_1, 0));
1195 tmp (4) = -1.0 * weight
1196 * this->restriction[index][i + 2 * j]
1197 ((i + 2 * (j + 4)) * this->degree,
1199 * this->shape_value_component
1200 ((i + 2 * (j + 4)) * this->degree,
1201 quadrature_point_2, 2);
1203 2.0 * edge_quadrature_points[q_point] (0)
1206 * (2.0 * this->shape_value_component
1207 (dof, quadrature_point_3, 2)
1208 - this->restriction[index][i + 2 * (j + 2)]
1209 ((i + 2 * (j + 4)) * this->degree,
1211 * this->shape_value_component
1212 ((i + 2 * (j + 4)) * this->degree,
1213 quadrature_point_2, 2));
1216 for (
unsigned int k = 0; k < deg; ++k)
1219 = legendre_polynomials[k + 1].value
1220 (edge_quadrature_points[q_point] (0));
1222 for (
unsigned int l = 0; l < tmp.
size (); ++l)
1223 system_rhs (k, l) += tmp (l) * L_k;
1227 system_matrix_inv.
mmult (solution, system_rhs);
1229 for (
unsigned int k = 0; k < 2; ++k)
1230 for (
unsigned int l = 0; l < deg; ++l)
1232 if (std::abs (solution (l, k)) > 1e-14)
1233 this->restriction[index][i + 2 * (2 * j + k)]
1234 ((i + 4 * j) * this->degree + l + 1, dof)
1237 if (std::abs (solution (l, k + 2)) > 1e-14)
1238 this->restriction[index][2 * (i + 2 * j) + k]
1239 ((i + 4 * j + 2) * this->degree + l + 1, dof)
1240 = solution (l, k + 2);
1242 if (std::abs (solution (l, k + 4)) > 1e-14)
1243 this->restriction[index][i + 2 * (j + 2 * k)]
1244 ((i + 2 * (j + 4)) * this->degree + l + 1,
1246 = solution (l, k + 4);
1250 const QGauss<2> face_quadrature (2 * this->degree);
1251 const std::vector<Point<2> > &face_quadrature_points
1253 const std::vector<Polynomials::Polynomial<double> > &
1257 const unsigned int n_edge_dofs
1259 const unsigned int &n_face_quadrature_points
1260 = face_quadrature.
size ();
1264 (deg * this->degree,
1265 n_face_quadrature_points);
1267 for (
unsigned int q_point = 0;
1268 q_point < n_face_quadrature_points; ++q_point)
1271 = std::sqrt (face_quadrature.
weight (q_point));
1273 for (
unsigned int i = 0; i <= deg; ++i)
1275 const double L_i = weight
1276 * legendre_polynomials[i].value
1277 (face_quadrature_points[q_point] (0));
1279 for (
unsigned int j = 0; j < deg; ++j)
1280 assembling_matrix (i * deg + j, q_point)
1281 = L_i * lobatto_polynomials[j + 2].value
1282 (face_quadrature_points[q_point] (1));
1287 assembling_matrix.
m ());
1289 assembling_matrix.
mTmult (system_matrix,
1291 system_matrix_inv.
reinit (system_matrix.m (),
1292 system_matrix.m ());
1293 system_matrix_inv.
invert (system_matrix);
1296 solution.
reinit (system_matrix_inv.
m (), 24);
1297 system_rhs.
reinit (system_matrix_inv.
m (), 24);
1300 for (
unsigned int i = 0; i < 2; ++i)
1301 for (
unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
1305 for (
unsigned int q_point = 0;
1306 q_point < n_face_quadrature_points; ++q_point)
1310 if (face_quadrature_points[q_point] (0) < 0.5)
1312 if (face_quadrature_points[q_point] (1) < 0.5)
1315 2.0 * face_quadrature_points[q_point] (0),
1316 2.0 * face_quadrature_points[q_point] (1));
1318 tmp (0) += 2.0 * this->shape_value_component
1319 (dof, quadrature_point_0, 1);
1320 tmp (1) += 2.0 * this->shape_value_component
1321 (dof, quadrature_point_0, 2);
1323 =
Point<dim> (2.0 * face_quadrature_points[q_point] (0),
1325 2.0 * face_quadrature_points[q_point] (1));
1326 tmp (8) += 2.0 * this->shape_value_component
1327 (dof, quadrature_point_0, 2);
1328 tmp (9) += 2.0 * this->shape_value_component
1329 (dof, quadrature_point_0, 0);
1331 =
Point<dim> (2.0 * face_quadrature_points[q_point] (0),
1332 2.0 * face_quadrature_points[q_point] (1),
1334 tmp (16) += 2.0 * this->shape_value_component
1335 (dof, quadrature_point_0, 0);
1336 tmp (17) += 2.0 * this->shape_value_component
1337 (dof, quadrature_point_0, 1);
1343 2.0 * face_quadrature_points[q_point] (0),
1344 2.0 * face_quadrature_points[q_point] (1)
1347 tmp (2) += 2.0 * this->shape_value_component
1348 (dof, quadrature_point_0, 1);
1349 tmp (3) += 2.0 * this->shape_value_component
1350 (dof, quadrature_point_0, 2);
1352 =
Point<dim> (2.0 * face_quadrature_points[q_point] (0),
1354 2.0 * face_quadrature_points[q_point] (1)
1356 tmp (10) += 2.0 * this->shape_value_component
1357 (dof, quadrature_point_0, 2);
1358 tmp (11) += 2.0 * this->shape_value_component
1359 (dof, quadrature_point_0, 0);
1361 =
Point<dim> (2.0 * face_quadrature_points[q_point] (0),
1362 2.0 * face_quadrature_points[q_point] (1)
1364 tmp (18) += 2.0 * this->shape_value_component
1365 (dof, quadrature_point_0, 0);
1366 tmp (19) += 2.0 * this->shape_value_component
1367 (dof, quadrature_point_0, 1);
1371 else if (face_quadrature_points[q_point] (1) < 0.5)
1374 2.0 * face_quadrature_points[q_point] (0)
1376 2.0 * face_quadrature_points[q_point] (1));
1378 tmp (4) += 2.0 * this->shape_value_component
1379 (dof, quadrature_point_0, 1);
1380 tmp (5) += 2.0 * this->shape_value_component
1381 (dof, quadrature_point_0, 2);
1383 =
Point<dim> (2.0 * face_quadrature_points[q_point] (0)
1385 2.0 * face_quadrature_points[q_point] (1));
1386 tmp (12) += 2.0 * this->shape_value_component
1387 (dof, quadrature_point_0, 2);
1388 tmp (13) += 2.0 * this->shape_value_component
1389 (dof, quadrature_point_0, 0);
1391 =
Point<dim> (2.0 * face_quadrature_points[q_point] (0)
1393 2.0 * face_quadrature_points[q_point] (1),
1395 tmp (20) += 2.0 * this->shape_value_component
1396 (dof, quadrature_point_0, 0);
1397 tmp (21) += 2.0 * this->shape_value_component
1398 (dof, quadrature_point_0, 1);
1404 2.0 * face_quadrature_points[q_point] (0)
1406 2.0 * face_quadrature_points[q_point] (1)
1409 tmp (6) += 2.0 * this->shape_value_component
1410 (dof, quadrature_point_0, 1);
1411 tmp (7) += 2.0 * this->shape_value_component
1412 (dof, quadrature_point_0, 2);
1414 =
Point<dim> (2.0 * face_quadrature_points[q_point] (0)
1416 2.0 * face_quadrature_points[q_point] (1)
1418 tmp (14) += 2.0 * this->shape_value_component
1419 (dof, quadrature_point_0, 2);
1420 tmp (15) += 2.0 * this->shape_value_component
1421 (dof, quadrature_point_0, 0);
1423 =
Point<dim> (2.0 * face_quadrature_points[q_point] (0)
1425 2.0 * face_quadrature_points[q_point] (1)
1427 tmp (22) += 2.0 * this->shape_value_component
1428 (dof, quadrature_point_0, 0);
1429 tmp (23) += 2.0 * this->shape_value_component
1430 (dof, quadrature_point_0, 1);
1434 face_quadrature_points[q_point] (0),
1435 face_quadrature_points[q_point] (1));
1437 (face_quadrature_points[q_point] (0),
1439 face_quadrature_points[q_point] (1));
1441 (face_quadrature_points[q_point] (0),
1442 face_quadrature_points[q_point] (1),
1445 for (
unsigned int j = 0; j < 2; ++j)
1446 for (
unsigned int k = 0; k < 2; ++k)
1447 for (
unsigned int l = 0; l <= deg; ++l)
1449 tmp (2 * (j + 2 * k))
1450 -= this->restriction[index][i + 2 * (2 * j + k)]
1451 ((i + 4 * j) * this->degree + l, dof)
1452 * this->shape_value_component
1453 ((i + 4 * j) * this->degree + l,
1454 quadrature_point_0, 1);
1455 tmp (2 * (j + 2 * k) + 1)
1456 -= this->restriction[index][i + 2 * (2 * j + k)]
1457 ((i + 2 * (k + 4)) * this->degree + l,
1459 * this->shape_value_component
1460 ((i + 2 * (k + 4)) * this->degree + l,
1461 quadrature_point_0, 2);
1462 tmp (2 * (j + 2 * (k + 2)))
1463 -= this->restriction[index][2 * (i + 2 * j) + k]
1464 ((2 * (i + 4) + k) * this->degree + l,
1466 * this->shape_value_component
1467 ((2 * (i + 4) + k) * this->degree + l,
1468 quadrature_point_1, 2);
1469 tmp (2 * (j + 2 * k) + 9)
1470 -= this->restriction[index][2 * (i + 2 * j) + k]
1471 ((i + 4 * j + 2) * this->degree + l,
1473 * this->shape_value_component
1474 ((i + 4 * j + 2) * this->degree + l,
1475 quadrature_point_1, 0);
1476 tmp (2 * (j + 2 * (k + 4)))
1477 -= this->restriction[index][2 * (2 * i + j) + k]
1478 ((4 * i + j + 2) * this->degree + l,
1480 * this->shape_value_component
1481 ((4 * i + j + 2) * this->degree + l,
1482 quadrature_point_2, 0);
1483 tmp (2 * (j + 2 * k) + 17)
1484 -= this->restriction[index][2 * (2 * i + j) + k]
1485 ((4 * i + k) * this->degree + l, dof)
1486 * this->shape_value_component
1487 ((4 * i + k) * this->degree + l,
1488 quadrature_point_2, 1);
1491 tmp *= face_quadrature.
weight (q_point);
1493 for (
unsigned int j = 0; j <= deg; ++j)
1496 = legendre_polynomials[j].value
1497 (face_quadrature_points[q_point] (0));
1499 = legendre_polynomials[j].value
1500 (face_quadrature_points[q_point] (1));
1502 for (
unsigned int k = 0; k < deg; ++k)
1505 = L_j_0 * lobatto_polynomials[k + 2].value
1506 (face_quadrature_points[q_point] (1));
1508 = L_j_1 * lobatto_polynomials[k + 2].value
1509 (face_quadrature_points[q_point] (0));
1511 for (
unsigned int l = 0; l < 4; ++l)
1513 system_rhs (j * deg + k, 2 * l)
1514 += tmp (2 * l) * l_k_0;
1515 system_rhs (j * deg + k, 2 * l + 1)
1516 += tmp (2 * l + 1) * l_k_1;
1517 system_rhs (j * deg + k, 2 * (l + 4))
1518 += tmp (2 * (l + 4)) * l_k_1;
1519 system_rhs (j * deg + k, 2 * l + 9)
1520 += tmp (2 * l + 9) * l_k_0;
1521 system_rhs (j * deg + k, 2 * (l + 8))
1522 += tmp (2 * (l + 8)) * l_k_0;
1523 system_rhs (j * deg + k, 2 * l + 17)
1524 += tmp (2 * l + 17) * l_k_1;
1530 system_matrix_inv.
mmult (solution, system_rhs);
1532 for (
unsigned int j = 0; j < 2; ++j)
1533 for (
unsigned int k = 0; k < 2; ++k)
1534 for (
unsigned int l = 0; l <= deg; ++l)
1535 for (
unsigned int m = 0; m < deg; ++m)
1537 if (std::abs (solution (l * deg + m,
1540 this->restriction[index][i + 2 * (2 * j + k)]
1541 ((2 * i * this->degree + l) * deg + m
1543 dof) = solution (l * deg + m,
1546 if (std::abs (solution (l * deg + m,
1547 2 * (j + 2 * k) + 1))
1549 this->restriction[index][i + 2 * (2 * j + k)]
1550 (((2 * i + 1) * deg + m) * this->degree + l
1552 = solution (l * deg + m,
1553 2 * (j + 2 * k) + 1);
1555 if (std::abs (solution (l * deg + m,
1556 2 * (j + 2 * (k + 2))))
1558 this->restriction[index][2 * (i + 2 * j) + k]
1559 ((2 * (i + 2) * this->degree + l) * deg + m
1561 dof) = solution (l * deg + m,
1562 2 * (j + 2 * (k + 2)));
1564 if (std::abs (solution (l * deg + m,
1565 2 * (j + 2 * k) + 9))
1567 this->restriction[index][2 * (i + 2 * j) + k]
1568 (((2 * i + 5) * deg + m) * this->degree + l
1570 = solution (l * deg + m,
1571 2 * (j + 2 * k) + 9);
1573 if (std::abs (solution (l * deg + m,
1574 2 * (j + 2 * (k + 4))))
1576 this->restriction[index][2 * (2 * i + j) + k]
1577 ((2 * (i + 4) * this->degree + l) * deg + m
1579 dof) = solution (l * deg + m,
1580 2 * (j + 2 * (k + 4)));
1582 if (std::abs (solution (l * deg + m,
1583 2 * (j + 2 * k) + 17))
1585 this->restriction[index][2 * (2 * i + j) + k]
1586 (((2 * i + 9) * deg + m) * this->degree + l
1588 = solution (l * deg + m,
1589 2 * (j + 2 * k) + 17);
1594 const std::vector<Point<dim> > &
1595 quadrature_points = quadrature.
get_points ();
1596 const unsigned int n_boundary_dofs
1599 const unsigned int &n_quadrature_points = quadrature.
size ();
1603 assembling_matrix (deg * deg * this->degree,
1604 n_quadrature_points);
1606 for (
unsigned int q_point = 0; q_point < n_quadrature_points;
1609 const double weight = std::sqrt (quadrature.
weight 1612 for (
unsigned int i = 0; i <= deg; ++i)
1614 const double L_i = weight
1615 * legendre_polynomials[i].value
1616 (quadrature_points[q_point] (0));
1618 for (
unsigned int j = 0; j < deg; ++j)
1621 = L_i * lobatto_polynomials[j + 2].value
1622 (quadrature_points[q_point] (1));
1624 for (
unsigned int k = 0; k < deg; ++k)
1625 assembling_matrix ((i * deg + j) * deg + k,
1627 = l_j * lobatto_polynomials[k + 2].value
1628 (quadrature_points[q_point] (2));
1634 assembling_matrix.
m ());
1636 assembling_matrix.
mTmult (system_matrix, assembling_matrix);
1637 system_matrix_inv.
reinit (system_matrix.m (),
1638 system_matrix.m ());
1639 system_matrix_inv.
invert (system_matrix);
1642 solution.
reinit (system_matrix_inv.
m (), 24);
1643 system_rhs.
reinit (system_matrix_inv.
m (), 24);
1646 for (
unsigned int dof = 0; dof < this->dofs_per_cell; ++dof)
1650 for (
unsigned int q_point = 0;
1651 q_point < n_quadrature_points; ++q_point)
1655 if (quadrature_points[q_point] (0) < 0.5)
1657 if (quadrature_points[q_point] (1) < 0.5)
1659 if (quadrature_points[q_point] (2) < 0.5)
1662 (2.0 * quadrature_points[q_point] (0),
1663 2.0 * quadrature_points[q_point] (1),
1664 2.0 * quadrature_points[q_point] (2));
1666 tmp (0) += 2.0 * this->shape_value_component
1667 (dof, quadrature_point, 0);
1668 tmp (1) += 2.0 * this->shape_value_component
1669 (dof, quadrature_point, 1);
1670 tmp (2) += 2.0 * this->shape_value_component
1671 (dof, quadrature_point, 2);
1677 (2.0 * quadrature_points[q_point] (0),
1678 2.0 * quadrature_points[q_point] (1),
1679 2.0 * quadrature_points[q_point] (2)
1682 tmp (3) += 2.0 * this->shape_value_component
1683 (dof, quadrature_point, 0);
1684 tmp (4) += 2.0 * this->shape_value_component
1685 (dof, quadrature_point, 1);
1686 tmp (5) += 2.0 * this->shape_value_component
1687 (dof, quadrature_point, 2);
1691 else if (quadrature_points[q_point] (2) < 0.5)
1694 (2.0 * quadrature_points[q_point] (0),
1695 2.0 * quadrature_points[q_point] (1)
1697 2.0 * quadrature_points[q_point] (2));
1699 tmp (6) += 2.0 * this->shape_value_component
1700 (dof, quadrature_point, 0);
1701 tmp (7) += 2.0 * this->shape_value_component
1702 (dof, quadrature_point, 1);
1703 tmp (8) += 2.0 * this->shape_value_component
1704 (dof, quadrature_point, 2);
1710 (2.0 * quadrature_points[q_point] (0),
1711 2.0 * quadrature_points[q_point] (1)
1713 2.0 * quadrature_points[q_point] (2)
1716 tmp (9) += 2.0 * this->shape_value_component
1717 (dof, quadrature_point, 0);
1718 tmp (10) += 2.0 * this->shape_value_component
1719 (dof, quadrature_point, 1);
1720 tmp (11) += 2.0 * this->shape_value_component
1721 (dof, quadrature_point, 2);
1725 else if (quadrature_points[q_point] (1) < 0.5)
1727 if (quadrature_points[q_point] (2) < 0.5)
1730 (2.0 * quadrature_points[q_point] (0)
1732 2.0 * quadrature_points[q_point] (1),
1733 2.0 * quadrature_points[q_point] (2));
1735 tmp (12) += 2.0 * this->shape_value_component
1736 (dof, quadrature_point, 0);
1737 tmp (13) += 2.0 * this->shape_value_component
1738 (dof, quadrature_point, 1);
1739 tmp (14) += 2.0 * this->shape_value_component
1740 (dof, quadrature_point, 2);
1746 (2.0 * quadrature_points[q_point] (0)
1748 2.0 * quadrature_points[q_point] (1),
1749 2.0 * quadrature_points[q_point] (2)
1752 tmp (15) += 2.0 * this->shape_value_component
1753 (dof, quadrature_point, 0);
1754 tmp (16) += 2.0 * this->shape_value_component
1755 (dof, quadrature_point, 1);
1756 tmp (17) += 2.0 * this->shape_value_component
1757 (dof, quadrature_point, 2);
1761 else if (quadrature_points[q_point] (2) < 0.5)
1764 (2.0 * quadrature_points[q_point] (0)
1766 2.0 * quadrature_points[q_point] (1)
1768 2.0 * quadrature_points[q_point] (2));
1770 tmp (18) += 2.0 * this->shape_value_component
1771 (dof, quadrature_point, 0);
1772 tmp (19) += 2.0 * this->shape_value_component
1773 (dof, quadrature_point, 1);
1774 tmp (20) += 2.0 * this->shape_value_component
1775 (dof, quadrature_point, 2);
1781 (2.0 * quadrature_points[q_point] (0)
1783 2.0 * quadrature_points[q_point] (1)
1785 2.0 * quadrature_points[q_point] (2)
1788 tmp (21) += 2.0 * this->shape_value_component
1789 (dof, quadrature_point, 0);
1790 tmp (22) += 2.0 * this->shape_value_component
1791 (dof, quadrature_point, 1);
1792 tmp (23) += 2.0 * this->shape_value_component
1793 (dof, quadrature_point, 2);
1796 for (
unsigned int i = 0; i < 2; ++i)
1797 for (
unsigned int j = 0; j < 2; ++j)
1798 for (
unsigned int k = 0; k < 2; ++k)
1799 for (
unsigned int l = 0; l <= deg; ++l)
1801 tmp (3 * (i + 2 * (j + 2 * k)))
1802 -= this->restriction[index][2 * (2 * i + j) + k]
1803 ((4 * i + j + 2) * this->degree + l, dof)
1804 * this->shape_value_component
1805 ((4 * i + j + 2) * this->degree + l,
1806 quadrature_points[q_point], 0);
1807 tmp (3 * (i + 2 * (j + 2 * k)) + 1)
1808 -= this->restriction[index][2 * (2 * i + j) + k]
1809 ((4 * i + k) * this->degree + l, dof)
1810 * this->shape_value_component
1811 ((4 * i + k) * this->degree + l,
1812 quadrature_points[q_point], 1);
1813 tmp (3 * (i + 2 * (j + 2 * k)) + 2)
1814 -= this->restriction[index][2 * (2 * i + j) + k]
1815 ((2 * (j + 4) + k) * this->degree + l,
1817 * this->shape_value_component
1818 ((2 * (j + 4) + k) * this->degree + l,
1819 quadrature_points[q_point], 2);
1821 for (
unsigned int m = 0; m < deg; ++m)
1823 tmp (3 * (i + 2 * (j + 2 * k)))
1824 -= this->restriction[index][2 * (2 * i + j) + k]
1825 (((2 * j + 5) * deg + m)
1826 * this->degree + l + n_edge_dofs,
1828 * this->shape_value_component
1829 (((2 * j + 5) * deg + m)
1830 * this->degree + l + n_edge_dofs,
1831 quadrature_points[q_point], 0);
1832 tmp (3 * (i + 2 * (j + 2 * k)))
1833 -= this->restriction[index][2 * (2 * i + j) + k]
1834 ((2 * (i + 4) * this->degree + l)
1835 * deg + m + n_edge_dofs, dof)
1836 * this->shape_value_component
1837 ((2 * (i + 4) * this->degree + l)
1838 * deg + m + n_edge_dofs,
1839 quadrature_points[q_point], 0);
1840 tmp (3 * (i + 2 * (j + 2 * k)) + 1)
1841 -= this->restriction[index][2 * (2 * i + j) + k]
1842 ((2 * k * this->degree + l) * deg + m
1845 * this->shape_value_component
1846 ((2 * k * this->degree + l) * deg + m
1848 quadrature_points[q_point], 1);
1849 tmp (3 * (i + 2 * (j + 2 * k)) + 1)
1850 -= this->restriction[index][2 * (2 * i + j) + k]
1851 (((2 * i + 9) * deg + m)
1852 * this->degree + l + n_edge_dofs,
1854 * this->shape_value_component
1855 (((2 * i + 9) * deg + m)
1856 * this->degree + l + n_edge_dofs,
1857 quadrature_points[q_point], 1);
1858 tmp (3 * (i + 2 * (j + 2 * k)) + 2)
1859 -= this->restriction[index][2 * (2 * i + j) + k]
1860 (((2 * k + 1) * deg + m)
1861 * this->degree + l + n_edge_dofs,
1863 * this->shape_value_component
1864 (((2 * k + 1) * deg + m)
1865 * this->degree + l + n_edge_dofs,
1866 quadrature_points[q_point], 2);
1867 tmp (3 * (i + 2 * (j + 2 * k)) + 2)
1868 -= this->restriction[index][2 * (2 * i + j) + k]
1869 ((2 * (j + 2) * this->degree + l)
1870 * deg + m + n_edge_dofs, dof)
1871 * this->shape_value_component
1872 ((2 * (j + 2) * this->degree + l)
1873 * deg + m + n_edge_dofs,
1874 quadrature_points[q_point], 2);
1878 tmp *= quadrature.
weight (q_point);
1880 for (
unsigned int i = 0; i <= deg; ++i)
1883 = legendre_polynomials[i].value
1884 (quadrature_points[q_point] (0));
1886 = legendre_polynomials[i].value
1887 (quadrature_points[q_point] (1));
1889 = legendre_polynomials[i].value
1890 (quadrature_points[q_point] (2));
1892 for (
unsigned int j = 0; j < deg; ++j)
1895 = L_i_0 * lobatto_polynomials[j + 2].value
1896 (quadrature_points[q_point] (1));
1898 = L_i_1 * lobatto_polynomials[j + 2].value
1899 (quadrature_points[q_point] (0));
1901 = L_i_2 * lobatto_polynomials[j + 2].value
1902 (quadrature_points[q_point] (0));
1904 for (
unsigned int k = 0; k < deg; ++k)
1907 = l_j_0 * lobatto_polynomials[k + 2].value
1908 (quadrature_points[q_point] (2));
1910 = l_j_1 * lobatto_polynomials[k + 2].value
1911 (quadrature_points[q_point] (2));
1913 = l_j_2 * lobatto_polynomials[k + 2].value
1914 (quadrature_points[q_point] (1));
1916 for (
unsigned int l = 0; l < 8; ++l)
1918 system_rhs ((i * deg + j) * deg + k,
1920 += tmp (3 * l) * l_k_0;
1921 system_rhs ((i * deg + j) * deg + k,
1923 += tmp (3 * l + 1) * l_k_1;
1924 system_rhs ((i * deg + j) * deg + k,
1926 += tmp (3 * l + 2) * l_k_2;
1933 system_matrix_inv.
mmult (solution, system_rhs);
1935 for (
unsigned int i = 0; i < 2; ++i)
1936 for (
unsigned int j = 0; j < 2; ++j)
1937 for (
unsigned int k = 0; k < 2; ++k)
1938 for (
unsigned int l = 0; l <= deg; ++l)
1939 for (
unsigned int m = 0; m < deg; ++m)
1940 for (
unsigned int n = 0; n < deg; ++n)
1942 if (std::abs (solution
1943 ((l * deg + m) * deg + n,
1944 3 * (i + 2 * (j + 2 * k))))
1946 this->restriction[index][2 * (2 * i + j) + k]
1947 ((l * deg + m) * deg + n + n_boundary_dofs,
1948 dof) = solution ((l * deg + m) * deg + n,
1949 3 * (i + 2 * (j + 2 * k)));
1951 if (std::abs (solution
1952 ((l * deg + m) * deg + n,
1953 3 * (i + 2 * (j + 2 * k)) + 1))
1955 this->restriction[index][2 * (2 * i + j) + k]
1956 ((l + (m + deg) * this->degree) * deg + n
1958 dof) = solution ((l * deg + m) * deg + n,
1959 3 * (i + 2 * (j + 2 * k)) + 1);
1961 if (std::abs (solution
1962 ((l * deg + m) * deg + n,
1963 3 * (i + 2 * (j + 2 * k)) + 2))
1965 this->restriction[index][2 * (2 * i + j) + k]
1966 (l + ((m + 2 * deg) * deg + n) * this->degree
1967 + n_boundary_dofs, dof)
1968 = solution ((l * deg + m) * deg + n,
1969 3 * (i + 2 * (j + 2 * k)) + 2);
1985 std::vector<unsigned int>
1988 std::vector<unsigned int> dpo (dim + 1);
1997 dpo[1] = degree + 1;
1998 dpo[2] = 2 * degree * (degree + 1);
2001 dpo[3] = 3 * degree * degree * (degree + 1);
2023 const unsigned int face_index)
const 2025 Assert (shape_index < this->dofs_per_cell,
2030 const unsigned int deg = this->degree-1;
2037 if (!((shape_index > deg) && (shape_index < 2 * this->degree)))
2044 if ((shape_index > deg) &&
2053 if (shape_index < 3 * this->degree)
2060 if (!((shape_index >= 2 * this->degree) &&
2061 (shape_index < 3 * this->degree)))
2078 if (((shape_index > deg) && (shape_index < 2 * this->degree)) ||
2079 ((shape_index >= 5 * this->degree) &&
2080 (shape_index < 6 * this->degree)) ||
2081 ((shape_index >= 9 * this->degree) &&
2082 (shape_index < 10 * this->degree)) ||
2083 ((shape_index >= 11 * this->degree) &&
2116 if (((shape_index > deg) && (shape_index < 4 * this->degree)) ||
2117 ((shape_index >= 5 * this->degree) &&
2118 (shape_index < 8 * this->degree)) ||
2119 ((shape_index >= 9 * this->degree) &&
2120 (shape_index < 10 * this->degree)) ||
2121 ((shape_index >= 11 * this->degree) &&
2154 if ((shape_index < 3 * this->degree) ||
2155 ((shape_index >= 4 * this->degree) &&
2156 (shape_index < 7 * this->degree)) ||
2157 ((shape_index >= 8 * this->degree) &&
2158 (shape_index < 10 * this->degree)) ||
2189 if ((shape_index < 2 * this->degree) ||
2190 ((shape_index >= 3 * this->degree) &&
2191 (shape_index < 6 * this->degree)) ||
2192 ((shape_index >= 7 * this->degree) &&
2193 (shape_index < 8 * this->degree)) ||
2194 ((shape_index >= 10 * this->degree) &&
2227 if ((shape_index < 4 * this->degree) ||
2228 ((shape_index >= 8 * this->degree) &&
2256 if (((shape_index >= 4 * this->degree) &&
2311 if (this->degree < fe_nedelec_other->degree)
2313 else if (this->degree == fe_nedelec_other->degree)
2332 if (fe_nothing->is_dominating())
2356 std::vector<std::pair<unsigned int, unsigned int> >
2362 return std::vector<std::pair<unsigned int, unsigned int> > ();
2366 std::vector<std::pair<unsigned int, unsigned int> >
2381 std::vector<std::pair<unsigned int, unsigned int> > identities;
2383 for (
unsigned int i = 0;
2384 i < std::min (fe_nedelec_other->degree, this->degree); ++i)
2385 identities.push_back (std::make_pair (i, i));
2396 return std::vector<std::pair<unsigned int, unsigned int> > ();
2402 return std::vector<std::pair<unsigned int, unsigned int> > ();
2407 std::vector<std::pair<unsigned int, unsigned int> >
2422 const unsigned int p = fe_nedelec_other->degree;
2423 const unsigned int q = this->degree;
2424 const unsigned int p_min = std::min (p, q);
2425 std::vector<std::pair<unsigned int, unsigned int> > identities;
2427 for (
unsigned int i = 0; i < p_min; ++i)
2428 for (
unsigned int j = 0; j < p_min - 1; ++j)
2430 identities.push_back (std::make_pair (i * (q - 1) + j,
2432 identities.push_back (std::make_pair (i + (j + q - 1) * q,
2433 i + (j + p - 1) * p));
2445 return std::vector<std::pair<unsigned int, unsigned int> > ();
2451 return std::vector<std::pair<unsigned int, unsigned int> > ();
2475 (dynamic_cast<const FEN *> (&source) != 0),
2476 typename FEL::ExcInterpolationNotImplemented());
2480 Assert (interpolation_matrix.
n () == this->dofs_per_face,
2482 this->dofs_per_face));
2501 typename FEL::ExcInterpolationNotImplemented ());
2502 interpolation_matrix = 0;
2506 for (
unsigned int i = 0; i <this->degree; ++i)
2507 interpolation_matrix (i, i) = 1.0;
2517 const unsigned int p = source_fe.
degree;
2518 const unsigned int q = this->degree;
2520 for (
unsigned int i = 0; i <q; ++i)
2522 for (
int j = 1; j < (int) GeometryInfo<dim>::lines_per_face; ++j)
2523 interpolation_matrix (j * p + i,
2526 for (
unsigned int j = 0; j < q-1; ++j)
2573 const unsigned int subface,
2583 (dynamic_cast<const FEN *> (&source) != 0),
2584 typename FEL::ExcInterpolationNotImplemented ());
2588 Assert (interpolation_matrix.
n () == this->dofs_per_face,
2590 this->dofs_per_face));
2609 typename FEL::ExcInterpolationNotImplemented ());
2610 interpolation_matrix = 0.0;
2614 const std::vector<Point<1> > &
2615 edge_quadrature_points = edge_quadrature.
get_points ();
2616 const unsigned int &n_edge_quadrature_points = edge_quadrature.
size ();
2622 for (
unsigned int dof = 0; dof < this->dofs_per_face; ++dof)
2623 for (
unsigned int q_point = 0; q_point < n_edge_quadrature_points;
2627 0.5 * (edge_quadrature_points[q_point] (0)
2630 interpolation_matrix (0, dof) += 0.5
2631 * edge_quadrature.
weight (q_point)
2632 * this->shape_value_component
2633 (dof, quadrature_point, 1);
2636 if (source_fe.
degree > 1)
2638 const std::vector<Polynomials::Polynomial<double> > &
2639 legendre_polynomials
2646 n_edge_quadrature_points);
2648 for (
unsigned int q_point = 0;
2649 q_point < n_edge_quadrature_points; ++q_point)
2652 = std::sqrt (edge_quadrature.
weight (q_point));
2654 for (
unsigned int i = 0; i < source_fe.
degree - 1; ++i)
2655 assembling_matrix (i, q_point) = weight
2656 * legendre_polynomials[i + 1].value
2657 (edge_quadrature_points[q_point] (0));
2662 assembling_matrix.
mTmult (system_matrix, assembling_matrix);
2663 system_matrix_inv.
invert (system_matrix);
2669 for (
unsigned int dof = 0; dof < this->dofs_per_face; ++dof)
2673 for (
unsigned int q_point = 0;
2674 q_point < n_edge_quadrature_points; ++q_point)
2677 0.5 * (edge_quadrature_points[q_point] (0)
2680 edge_quadrature_points[q_point] (0));
2681 const double tmp = edge_quadrature.
weight (q_point)
2682 * (0.5 * this->shape_value_component
2683 (dof, quadrature_point_0, 1)
2684 - interpolation_matrix (0,
2687 (0, quadrature_point_1, 1));
2689 for (
unsigned int i = 0; i < source_fe.
degree - 1; ++i)
2690 system_rhs (i) += tmp
2691 * legendre_polynomials[i + 1].value
2692 (edge_quadrature_points[q_point] (0));
2695 system_matrix_inv.
vmult (solution, system_rhs);
2697 for (
unsigned int i = 0; i < source_fe.
degree - 1; ++i)
2698 if (std::abs (solution (i)) > 1e-14)
2699 interpolation_matrix (i + 1, dof) = solution (i);
2708 const double shifts[4][2] = { { 0.0, 0.0 }, { 1.0, 0.0 },
2709 { 0.0, 1.0 }, { 1.0, 1.0 }
2712 for (
unsigned int dof = 0; dof < this->dofs_per_face; ++dof)
2713 for (
unsigned int q_point = 0; q_point < n_edge_quadrature_points;
2716 const double weight = 0.5 * edge_quadrature.
weight (q_point);
2718 for (
unsigned int i = 0; i < 2; ++i)
2721 quadrature_point (0.5 * (i + shifts[subface][0]),
2722 0.5 * (edge_quadrature_points[q_point] (0)
2723 + shifts[subface][1]),
2726 interpolation_matrix (i * source_fe.
degree, dof) += weight
2727 * this->shape_value_component
2728 (this->face_to_cell_index (dof, 4),
2732 =
Point<dim> (0.5 * (edge_quadrature_points[q_point] (0)
2733 + shifts[subface][0]),
2734 0.5 * (i + shifts[subface][1]), 0.0);
2735 interpolation_matrix ((i + 2) * source_fe.
degree, dof)
2736 += weight * this->shape_value_component
2737 (this->face_to_cell_index (dof, 4),
2738 quadrature_point, 0);
2742 if (source_fe.
degree > 1)
2744 const std::vector<Polynomials::Polynomial<double> > &
2745 legendre_polynomials
2752 n_edge_quadrature_points);
2754 for (
unsigned int q_point = 0;
2755 q_point < n_edge_quadrature_points; ++q_point)
2758 = std::sqrt (edge_quadrature.
weight (q_point));
2760 for (
unsigned int i = 0; i < source_fe.
degree - 1; ++i)
2761 assembling_matrix (i, q_point) = weight
2762 * legendre_polynomials[i + 1].value
2763 (edge_quadrature_points[q_point] (0));
2768 assembling_matrix.
mTmult (system_matrix, assembling_matrix);
2769 system_matrix_inv.
invert (system_matrix);
2778 for (
unsigned int dof = 0; dof < this->dofs_per_face; ++dof)
2782 for (
unsigned int q_point = 0;
2783 q_point < n_edge_quadrature_points; ++q_point)
2785 const double weight = edge_quadrature.
weight (q_point);
2787 for (
unsigned int i = 0; i < 2; ++i)
2791 (0.5 * (i + shifts[subface][0]),
2792 0.5 * (edge_quadrature_points[q_point] (0)
2793 + shifts[subface][1]), 0.0);
2795 edge_quadrature_points[q_point] (0),
2799 * (0.5 * this->shape_value_component
2800 (this->face_to_cell_index (dof, 4),
2801 quadrature_point_0, 1)
2802 - interpolation_matrix
2803 (i * source_fe.
degree, dof)
2806 quadrature_point_1, 1));
2808 =
Point<dim> (0.5 * (edge_quadrature_points[q_point] (0)
2809 + shifts[subface][0]),
2810 0.5 * (i + shifts[subface][1]),
2813 =
Point<dim> (edge_quadrature_points[q_point] (0),
2815 tmp (i + 2) = weight
2816 * (0.5 * this->shape_value_component
2817 (this->face_to_cell_index (dof, 4),
2818 quadrature_point_0, 0)
2819 - interpolation_matrix
2820 ((i + 2) * source_fe.
degree,
2823 ((i + 2) * source_fe.
degree,
2824 quadrature_point_1, 0));
2827 for (
unsigned int i = 0; i < source_fe.
degree - 1; ++i)
2830 = legendre_polynomials[i + 1].value
2831 (edge_quadrature_points[q_point] (0));
2833 for (
unsigned int j = 0;
2834 j < GeometryInfo<dim>::lines_per_face; ++j)
2835 system_rhs (i, j) += tmp (j) * L_i;
2839 system_matrix_inv.
mmult (solution, system_rhs);
2841 for (
unsigned int i = 0;
2842 i < GeometryInfo<dim>::lines_per_face; ++i)
2843 for (
unsigned int j = 0; j < source_fe.
degree - 1; ++j)
2844 if (std::abs (solution (j, i)) > 1e-14)
2845 interpolation_matrix (i * source_fe.
degree + j + 1,
2846 dof) = solution (j, i);
2850 const std::vector<Point<2> > &
2851 quadrature_points = quadrature.
get_points ();
2852 const std::vector<Polynomials::Polynomial<double> > &
2856 const unsigned int n_boundary_dofs
2858 const unsigned int &n_quadrature_points = quadrature.
size ();
2862 assembling_matrix (source_fe.
degree * (source_fe.
degree - 1),
2863 n_quadrature_points);
2865 for (
unsigned int q_point = 0; q_point < n_quadrature_points;
2868 const double weight = std::sqrt (quadrature.
weight (q_point));
2870 for (
unsigned int i = 0; i < source_fe.
degree; ++i)
2872 const double L_i = weight
2873 * legendre_polynomials[i].value
2874 (quadrature_points[q_point] (0));
2876 for (
unsigned int j = 0; j < source_fe.
degree - 1; ++j)
2877 assembling_matrix (i * (source_fe.
degree - 1) + j,
2879 = L_i * lobatto_polynomials[j + 2].value
2880 (quadrature_points[q_point] (1));
2885 assembling_matrix.
m ());
2887 assembling_matrix.
mTmult (system_matrix, assembling_matrix);
2888 system_matrix_inv.
reinit (system_matrix.m (),
2889 system_matrix.m ());
2890 system_matrix_inv.
invert (system_matrix);
2893 solution.
reinit (system_matrix_inv.
m (), 2);
2894 system_rhs.
reinit (system_matrix_inv.
m (), 2);
2897 for (
unsigned int dof = 0; dof < this->dofs_per_face; ++dof)
2901 for (
unsigned int q_point = 0;
2902 q_point < n_quadrature_points; ++q_point)
2906 (0.5 * (quadrature_points[q_point] (0)
2907 + shifts[subface][0]),
2908 0.5 * (quadrature_points[q_point] (1)
2909 + shifts[subface][1]), 0.0);
2910 tmp (0) = 0.5 * this->shape_value_component
2911 (this->face_to_cell_index (dof, 4),
2912 quadrature_point, 0);
2913 tmp (1) = 0.5 * this->shape_value_component
2914 (this->face_to_cell_index (dof, 4),
2915 quadrature_point, 1);
2917 =
Point<dim> (quadrature_points[q_point] (0),
2918 quadrature_points[q_point] (1), 0.0);
2920 for (
unsigned int i = 0; i < 2; ++i)
2921 for (
unsigned int j = 0; j < source_fe.
degree; ++j)
2923 tmp (0) -= interpolation_matrix
2924 ((i + 2) * source_fe.
degree + j, dof)
2926 ((i + 2) * source_fe.
degree + j,
2927 quadrature_point, 0);
2928 tmp (1) -= interpolation_matrix
2929 (i * source_fe.
degree + j, dof)
2931 (i * source_fe.
degree + j,
2932 quadrature_point, 1);
2935 tmp *= quadrature.
weight (q_point);
2937 for (
unsigned int i = 0; i < source_fe.
degree; ++i)
2939 const double L_i_0 = legendre_polynomials[i].value
2940 (quadrature_points[q_point] (0));
2941 const double L_i_1 = legendre_polynomials[i].value
2942 (quadrature_points[q_point] (1));
2944 for (
unsigned int j = 0; j < source_fe.
degree - 1; ++j)
2946 system_rhs (i * (source_fe.
degree - 1) + j, 0)
2948 * lobatto_polynomials[j + 2].value
2949 (quadrature_points[q_point] (1));
2950 system_rhs (i * (source_fe.
degree - 1) + j, 1)
2952 * lobatto_polynomials[j + 2].value
2953 (quadrature_points[q_point] (0));
2958 system_matrix_inv.
mmult (solution, system_rhs);
2960 for (
unsigned int i = 0; i < source_fe.
degree; ++i)
2961 for (
unsigned int j = 0; j < source_fe.
degree - 1; ++j)
2963 if (std::abs (solution (i * (source_fe.
degree - 1) + j, 0))
2965 interpolation_matrix (i * (source_fe.
degree - 1)
2966 + j + n_boundary_dofs, dof)
2967 = solution (i * (source_fe.
degree - 1) + j, 0);
2969 if (std::abs (solution (i * (source_fe.
degree - 1) + j, 1))
2971 interpolation_matrix (i + (j + source_fe.
degree - 1)
2973 + n_boundary_dofs, dof)
2974 = solution (i * (source_fe.
degree - 1) + j, 1);
2996 ExcMessage(
"Prolongation matrices are only available for refined cells!"));
3001 if (this->prolongation[refinement_case-1][child].n() == 0)
3006 if (this->prolongation[refinement_case-1][child].n() ==
3007 this->dofs_per_cell)
3008 return this->prolongation[refinement_case-1][child];
3019 #ifdef DEBUG_NEDELEC 3020 deallog <<
"Embedding" << std::endl;
3025 internal::get_embedding_computation_tolerance(this->
degree));
3026 #ifdef DEBUG_NEDELEC 3027 deallog <<
"Restriction" << std::endl;
3035 return this->prolongation[refinement_case-1][child];
3047 ExcMessage(
"Restriction matrices are only available for refined cells!"));
3052 if (this->restriction[refinement_case-1][child].n() == 0)
3057 if (this->restriction[refinement_case-1][child].n() ==
3058 this->dofs_per_cell)
3059 return this->restriction[refinement_case-1][child];
3070 #ifdef DEBUG_NEDELEC 3071 deallog <<
"Embedding" << std::endl;
3076 internal::get_embedding_computation_tolerance(this->
degree));
3077 #ifdef DEBUG_NEDELEC 3078 deallog <<
"Restriction" << std::endl;
3086 return this->restriction[refinement_case-1][child];
3100 std::vector<double> &nodal_values)
const 3102 const unsigned int deg = this->degree-1;
3103 Assert (support_point_values.size () == this->generalized_support_points.size (),
3105 this->generalized_support_points.size ()));
3108 Assert (nodal_values.size () == this->dofs_per_cell,
3110 std::fill (nodal_values.begin (), nodal_values.end (), 0.0);
3118 const QGauss<dim - 1> reference_edge_quadrature (this->degree);
3119 const unsigned int &
3120 n_edge_points = reference_edge_quadrature.size ();
3122 for (
unsigned int i = 0; i < 2; ++i)
3123 for (
unsigned int j = 0; j < 2; ++j)
3125 for (
unsigned int q_point = 0; q_point < n_edge_points;
3127 nodal_values[(i + 2 * j) * this->degree]
3128 += reference_edge_quadrature.weight (q_point)
3129 * support_point_values[q_point + (i + 2 * j) * n_edge_points][1 - j];
3134 if (std::abs (nodal_values[(i + 2 * j) * this->degree]) < 1e-14)
3135 nodal_values[(i + 2 * j) * this->degree] = 0.0;
3148 if (this->degree-1 > 1)
3153 const std::vector<Polynomials::Polynomial<double> > &
3158 std::vector<Polynomials::Polynomial<double> >
3159 lobatto_polynomials_grad (this->degree);
3161 for (
unsigned int i = 0; i < lobatto_polynomials_grad.size ();
3163 lobatto_polynomials_grad[i]
3164 = lobatto_polynomials[i + 1].derivative ();
3169 for (
unsigned int i = 0; i < system_matrix.
m (); ++i)
3170 for (
unsigned int j = 0; j < system_matrix.
n (); ++j)
3171 for (
unsigned int q_point = 0; q_point < n_edge_points;
3173 system_matrix (i, j)
3174 += boundary_weights (q_point, j)
3175 * lobatto_polynomials_grad[i + 1].value
3176 (this->generalized_face_support_points[q_point]
3181 system_matrix_inv.
invert (system_matrix);
3189 for (
unsigned int line = 0;
3190 line < GeometryInfo<dim>::lines_per_cell; ++line)
3195 for (
unsigned int q_point = 0; q_point < n_edge_points;
3199 = support_point_values[line * n_edge_points + q_point][line_coordinate[line]]
3200 - nodal_values[line * this->degree]
3201 * this->shape_value_component
3202 (line * this->degree,
3203 this->generalized_support_points[line
3206 line_coordinate[line]);
3208 for (
unsigned int i = 0; i < system_rhs.size (); ++i)
3209 system_rhs (i) += boundary_weights (q_point, i) * tmp;
3212 system_matrix_inv.
vmult (solution, system_rhs);
3218 for (
unsigned int i = 0; i < solution.size (); ++i)
3219 if (std::abs (solution (i)) > 1e-14)
3220 nodal_values[line * this->degree + i + 1] = solution (i);
3232 const QGauss<dim> reference_quadrature (this->degree);
3233 const unsigned int &
3234 n_interior_points = reference_quadrature.
size ();
3235 const std::vector<Polynomials::Polynomial<double> > &
3236 legendre_polynomials
3239 system_matrix.
reinit ((this->degree-1) * this->degree,
3240 (this->degree-1) * this->degree);
3243 for (
unsigned int i = 0; i < this->degree; ++i)
3244 for (
unsigned int j = 0; j < this->degree-1; ++j)
3245 for (
unsigned int k = 0; k < this->degree; ++k)
3246 for (
unsigned int l = 0; l < this->degree-1; ++l)
3247 for (
unsigned int q_point = 0;
3248 q_point < n_interior_points; ++q_point)
3249 system_matrix (i * (this->degree-1) + j, k * (this->degree-1) + l)
3250 += reference_quadrature.
weight (q_point)
3251 * legendre_polynomials[i].value
3252 (this->generalized_support_points[q_point
3256 * lobatto_polynomials[j + 2].value
3257 (this->generalized_support_points[q_point
3261 * lobatto_polynomials_grad[k].value
3262 (this->generalized_support_points[q_point
3266 * lobatto_polynomials[l + 2].value
3267 (this->generalized_support_points[q_point
3272 system_matrix_inv.
reinit (system_matrix.
m (),
3273 system_matrix.
m ());
3274 system_matrix_inv.
invert (system_matrix);
3278 system_rhs.reinit (system_matrix_inv.
m ());
3281 for (
unsigned int q_point = 0; q_point < n_interior_points;
3286 * n_edge_points][0];
3288 for (
unsigned int i = 0; i < 2; ++i)
3289 for (
unsigned int j = 0; j <= deg; ++j)
3290 tmp -= nodal_values[(i + 2) * this->degree + j]
3291 * this->shape_value_component
3292 ((i + 2) * this->degree + j,
3293 this->generalized_support_points[q_point
3298 for (
unsigned int i = 0; i <= deg; ++i)
3299 for (
unsigned int j = 0; j < deg; ++j)
3300 system_rhs (i * deg + j)
3301 += reference_quadrature.
weight (q_point) * tmp
3302 * lobatto_polynomials_grad[i].value
3303 (this->generalized_support_points[q_point
3307 * lobatto_polynomials[j + 2].value
3308 (this->generalized_support_points[q_point
3314 solution.reinit (system_matrix.
m ());
3315 system_matrix_inv.
vmult (solution, system_rhs);
3321 for (
unsigned int i = 0; i <= deg; ++i)
3322 for (
unsigned int j = 0; j < deg; ++j)
3323 if (std::abs (solution (i * deg + j)) > 1e-14)
3326 = solution (i * deg + j);
3333 for (
unsigned int q_point = 0; q_point < n_interior_points;
3338 * n_edge_points][1];
3340 for (
unsigned int i = 0; i < 2; ++i)
3341 for (
unsigned int j = 0; j <= deg; ++j)
3342 tmp -= nodal_values[i * this->degree + j]
3343 * this->shape_value_component
3344 (i * this->degree + j,
3345 this->generalized_support_points[q_point
3350 for (
unsigned int i = 0; i <= deg; ++i)
3351 for (
unsigned int j = 0; j < deg; ++j)
3352 system_rhs (i * deg + j)
3353 += reference_quadrature.
weight (q_point) * tmp
3354 * lobatto_polynomials_grad[i].value
3355 (this->generalized_support_points[q_point
3359 * lobatto_polynomials[j + 2].value
3360 (this->generalized_support_points[q_point
3366 system_matrix_inv.
vmult (solution, system_rhs);
3372 for (
unsigned int i = 0; i <= deg; ++i)
3373 for (
unsigned int j = 0; j < deg; ++j)
3374 if (std::abs (solution (i * deg + j)) > 1e-14)
3376 + deg) * this->degree]
3377 = solution (i * deg + j);
3387 const QGauss<1> reference_edge_quadrature (this->degree);
3388 const unsigned int &
3389 n_edge_points = reference_edge_quadrature.
size ();
3391 for (
unsigned int q_point = 0; q_point < n_edge_points; ++q_point)
3393 for (
unsigned int i = 0; i < 4; ++i)
3394 nodal_values[(i + 8) * this->degree]
3395 += reference_edge_quadrature.
weight (q_point)
3396 * support_point_values[q_point + (i + 8) * n_edge_points][2];
3398 for (
unsigned int i = 0; i < 2; ++i)
3399 for (
unsigned int j = 0; j < 2; ++j)
3400 for (
unsigned int k = 0; k < 2; ++k)
3401 nodal_values[(i + 2 * (2 * j + k)) * this->degree]
3402 += reference_edge_quadrature.
weight (q_point)
3403 * support_point_values[q_point + (i + 2 * (2 * j + k))
3404 * n_edge_points][1 - k];
3411 for (
unsigned int i = 0; i < 4; ++i)
3412 if (std::abs (nodal_values[(i + 8) * this->degree]) < 1e-14)
3413 nodal_values[(i + 8) * this->degree] = 0.0;
3415 for (
unsigned int i = 0; i < 2; ++i)
3416 for (
unsigned int j = 0; j < 2; ++j)
3417 for (
unsigned int k = 0; k < 2; ++k)
3418 if (std::abs (nodal_values[(i + 2 * (2 * j + k)) * this->degree])
3420 nodal_values[(i + 2 * (2 * j + k)) * this->degree] = 0.0;
3431 if (this->degree > 1)
3436 const std::vector<Polynomials::Polynomial<double> > &
3441 std::vector<Polynomials::Polynomial<double> >
3442 lobatto_polynomials_grad (this->degree);
3444 for (
unsigned int i = 0; i < lobatto_polynomials_grad.size ();
3446 lobatto_polynomials_grad[i]
3447 = lobatto_polynomials[i + 1].derivative ();
3452 for (
unsigned int i = 0; i < system_matrix.
m (); ++i)
3453 for (
unsigned int j = 0; j < system_matrix.
n (); ++j)
3454 for (
unsigned int q_point = 0; q_point < n_edge_points;
3456 system_matrix (i, j)
3457 += boundary_weights (q_point, j)
3458 * lobatto_polynomials_grad[i + 1].value
3459 (this->generalized_face_support_points[q_point]
3464 system_matrix_inv.
invert (system_matrix);
3468 = {1, 1, 0, 0, 1, 1, 0, 0, 2, 2, 2, 2};
3472 for (
unsigned int line = 0;
3473 line < GeometryInfo<dim>::lines_per_cell; ++line)
3478 for (
unsigned int q_point = 0; q_point < this->degree; ++q_point)
3481 = support_point_values[line * this->degree
3482 + q_point][line_coordinate[line]]
3483 - nodal_values[line * this->degree]
3484 * this->shape_value_component
3485 (line * this->degree,
3486 this->generalized_support_points[line
3489 line_coordinate[line]);
3491 for (
unsigned int i = 0; i < system_rhs.size (); ++i)
3492 system_rhs (i) += boundary_weights (q_point, i)
3496 system_matrix_inv.
vmult (solution, system_rhs);
3502 for (
unsigned int i = 0; i < solution.size (); ++i)
3503 if (std::abs (solution (i)) > 1e-14)
3504 nodal_values[line * this->degree + i + 1] = solution (i);
3515 const std::vector<Polynomials::Polynomial<double> > &
3516 legendre_polynomials
3518 const unsigned int n_face_points = n_edge_points * n_edge_points;
3520 system_matrix.
reinit ((this->degree-1) * this->degree,
3521 (this->degree-1) * this->degree);
3524 for (
unsigned int i = 0; i < this->degree; ++i)
3525 for (
unsigned int j = 0; j < this->degree-1; ++j)
3526 for (
unsigned int k = 0; k < this->degree; ++k)
3527 for (
unsigned int l = 0; l < this->degree-1; ++l)
3528 for (
unsigned int q_point = 0; q_point < n_face_points;
3530 system_matrix (i * (this->degree-1) + j, k * (this->degree-1) + l)
3531 += boundary_weights (q_point + n_edge_points,
3532 2 * (k * (this->degree-1) + l))
3533 * legendre_polynomials[i].value
3534 (this->generalized_face_support_points[q_point
3538 * lobatto_polynomials[j + 2].value
3539 (this->generalized_face_support_points[q_point
3544 system_matrix_inv.
reinit (system_matrix.
m (),
3545 system_matrix.
m ());
3546 system_matrix_inv.
invert (system_matrix);
3547 solution.reinit (system_matrix.
m ());
3548 system_rhs.reinit (system_matrix.
m ());
3552 = {{1, 2}, {1, 2}, {2, 0}, {2, 0}, {0, 1}, {0, 1}};
3555 = {{0, 4, 8, 10}, {1, 5, 9, 11}, {8, 9, 2, 6},
3556 {10, 11, 3, 7}, {2, 3, 0, 1}, {6, 7, 4, 5}
3559 for (
unsigned int face = 0;
3560 face < GeometryInfo<dim>::faces_per_cell; ++face)
3567 for (
unsigned int q_point = 0; q_point < n_face_points;
3571 = support_point_values[q_point
3573 * n_edge_points][face_coordinates[face][0]];
3575 for (
unsigned int i = 0; i < 2; ++i)
3576 for (
unsigned int j = 0; j <= deg; ++j)
3577 tmp -= nodal_values[edge_indices[face][i]
3579 * this->shape_value_component
3580 (edge_indices[face][i] * this->degree + j,
3581 this->generalized_support_points[q_point
3584 face_coordinates[face][0]);
3586 for (
unsigned int i = 0; i <= deg; ++i)
3587 for (
unsigned int j = 0; j < deg; ++j)
3588 system_rhs (i * deg + j)
3589 += boundary_weights (q_point + n_edge_points,
3590 2 * (i * deg + j)) * tmp;
3593 system_matrix_inv.
vmult (solution, system_rhs);
3599 for (
unsigned int i = 0; i <= deg; ++i)
3600 for (
unsigned int j = 0; j < deg; ++j)
3601 if (std::abs (solution (i * deg + j)) > 1e-14)
3602 nodal_values[(2 * face * this->degree + i
3605 = solution (i * deg + j);
3612 for (
unsigned int q_point = 0; q_point < n_face_points;
3616 = support_point_values[q_point
3618 * n_edge_points][face_coordinates[face][1]];
3620 for (
int i = 2; i < (int) GeometryInfo<dim>::lines_per_face; ++i)
3621 for (
unsigned int j = 0; j <= deg; ++j)
3622 tmp -= nodal_values[edge_indices[face][i]
3624 * this->shape_value_component
3625 (edge_indices[face][i] * this->degree + j,
3626 this->generalized_support_points[q_point
3629 face_coordinates[face][1]);
3631 for (
unsigned int i = 0; i <= deg; ++i)
3632 for (
unsigned int j = 0; j < deg; ++j)
3633 system_rhs (i * deg + j)
3634 += boundary_weights (q_point + n_edge_points,
3635 2 * (i * deg + j) + 1)
3639 system_matrix_inv.
vmult (solution, system_rhs);
3645 for (
unsigned int i = 0; i <= deg; ++i)
3646 for (
unsigned int j = 0; j < deg; ++j)
3647 if (std::abs (solution (i * deg + j)) > 1e-14)
3650 = solution (i * deg + j);
3658 const QGauss<dim> reference_quadrature (this->degree);
3660 n_interior_points = reference_quadrature.
size ();
3664 system_matrix.
reinit (this->degree * deg * deg,
3665 this->degree * deg * deg);
3668 for (
unsigned int i = 0; i <= deg; ++i)
3669 for (
unsigned int j = 0; j < deg; ++j)
3670 for (
unsigned int k = 0; k < deg; ++k)
3671 for (
unsigned int l = 0; l <= deg; ++l)
3672 for (
unsigned int m = 0; m < deg; ++m)
3673 for (
unsigned int n = 0; n < deg; ++n)
3674 for (
unsigned int q_point = 0;
3675 q_point < n_interior_points; ++q_point)
3676 system_matrix ((i * deg + j) * deg + k,
3677 (l * deg + m) * deg + n)
3678 += reference_quadrature.
weight (q_point)
3679 * legendre_polynomials[i].value
3680 (this->generalized_support_points[q_point
3686 * lobatto_polynomials[j + 2].value
3687 (this->generalized_support_points[q_point
3693 * lobatto_polynomials[k + 2].value
3694 (this->generalized_support_points[q_point
3700 * lobatto_polynomials_grad[l].value
3701 (this->generalized_support_points[q_point
3707 * lobatto_polynomials[m + 2].value
3708 (this->generalized_support_points[q_point
3714 * lobatto_polynomials[n + 2].value
3715 (this->generalized_support_points[q_point
3722 system_matrix_inv.
reinit (system_matrix.
m (),
3723 system_matrix.
m ());
3724 system_matrix_inv.
invert (system_matrix);
3726 system_rhs.reinit (system_matrix.
m ());
3729 for (
unsigned int q_point = 0; q_point < n_interior_points;
3736 * n_face_points][0];
3738 for (
unsigned int i = 0; i <= deg; ++i)
3740 for (
unsigned int j = 0; j < 2; ++j)
3741 for (
unsigned int k = 0; k < 2; ++k)
3742 tmp -= nodal_values[i + (j + 4 * k + 2) * this->degree]
3743 * this->shape_value_component
3744 (i + (j + 4 * k + 2) * this->degree,
3745 this->generalized_support_points[q_point
3752 for (
unsigned int j = 0; j < deg; ++j)
3753 for (
unsigned int k = 0; k < 4; ++k)
3754 tmp -= nodal_values[(i + 2 * (k + 2) * this->degree
3758 * this->shape_value_component
3759 ((i + 2 * (k + 2) * this->degree
3763 this->generalized_support_points[q_point
3771 for (
unsigned int i = 0; i <= deg; ++i)
3772 for (
unsigned int j = 0; j < deg; ++j)
3773 for (
unsigned int k = 0; k < deg; ++k)
3774 system_rhs ((i * deg + j) * deg + k)
3775 += reference_quadrature.
weight (q_point) * tmp
3776 * lobatto_polynomials_grad[i].value
3777 (this->generalized_support_points[q_point
3783 * lobatto_polynomials[j + 2].value
3784 (this->generalized_support_points[q_point
3790 * lobatto_polynomials[k + 2].value
3791 (this->generalized_support_points[q_point
3799 solution.reinit (system_rhs.size ());
3800 system_matrix_inv.
vmult (solution, system_rhs);
3806 for (
unsigned int i = 0; i <= deg; ++i)
3807 for (
unsigned int j = 0; j < deg; ++j)
3808 for (
unsigned int k = 0; k < deg; ++k)
3809 if (std::abs (solution ((i * deg + j) * deg + k)) > 1e-14)
3814 = solution ((i * deg + j) * deg + k);
3819 for (
unsigned int q_point = 0; q_point < n_interior_points;
3826 * n_face_points][1];
3828 for (
unsigned int i = 0; i <= deg; ++i)
3829 for (
unsigned int j = 0; j < 2; ++j)
3831 for (
unsigned int k = 0; k < 2; ++k)
3832 tmp -= nodal_values[i + (4 * j + k) * this->degree]
3833 * this->shape_value_component
3834 (i + (4 * j + k) * this->degree,
3835 this->generalized_support_points[q_point
3842 for (
unsigned int k = 0; k < deg; ++k)
3843 tmp -= nodal_values[(i + 2 * j * this->degree
3847 * this->shape_value_component
3848 ((i + 2 * j * this->degree
3852 this->generalized_support_points[q_point
3858 + nodal_values[i + ((2 * j + 9) * deg + k
3861 * this->shape_value_component
3862 (i + ((2 * j + 9) * deg + k
3865 this->generalized_support_points[q_point
3873 for (
unsigned int i = 0; i <= deg; ++i)
3874 for (
unsigned int j = 0; j < deg; ++j)
3875 for (
unsigned int k = 0; k < deg; ++k)
3876 system_rhs ((i * deg + j) * deg + k)
3877 += reference_quadrature.
weight (q_point) * tmp
3878 * lobatto_polynomials_grad[i].value
3879 (this->generalized_support_points[q_point
3885 * lobatto_polynomials[j + 2].value
3886 (this->generalized_support_points[q_point
3892 * lobatto_polynomials[k + 2].value
3893 (this->generalized_support_points[q_point
3901 system_matrix_inv.
vmult (solution, system_rhs);
3907 for (
unsigned int i = 0; i <= deg; ++i)
3908 for (
unsigned int j = 0; j < deg; ++j)
3909 for (
unsigned int k = 0; k < deg; ++k)
3910 if (std::abs (solution ((i * deg + j) * deg + k)) > 1e-14)
3911 nodal_values[((i + this->degree + 2
3916 = solution ((i * deg + j) * deg + k);
3921 for (
unsigned int q_point = 0; q_point < n_interior_points;
3928 * n_face_points][2];
3930 for (
unsigned int i = 0; i <= deg; ++i)
3931 for (
unsigned int j = 0; j < 4; ++j)
3933 tmp -= nodal_values[i + (j + 8) * this->degree]
3934 * this->shape_value_component
3935 (i + (j + 8) * this->degree,
3936 this->generalized_support_points[q_point
3943 for (
unsigned int k = 0; k < deg; ++k)
3944 tmp -= nodal_values[i + ((2 * j + 1) * deg + k
3947 * this->shape_value_component
3948 (i + ((2 * j + 1) * deg + k
3951 this->generalized_support_points[q_point
3959 for (
unsigned int i = 0; i <= deg; ++i)
3960 for (
unsigned int j = 0; j < deg; ++j)
3961 for (
unsigned int k = 0; k < deg; ++k)
3962 system_rhs ((i * deg + j) * deg + k)
3963 += reference_quadrature.
weight (q_point) * tmp
3964 * lobatto_polynomials_grad[i].value
3965 (this->generalized_support_points[q_point
3971 * lobatto_polynomials[j + 2].value
3972 (this->generalized_support_points[q_point
3978 * lobatto_polynomials[k + 2].value
3979 (this->generalized_support_points[q_point
3987 system_matrix_inv.
vmult (solution, system_rhs);
3993 for (
unsigned int i = 0; i <= deg; ++i)
3994 for (
unsigned int j = 0; j < deg; ++j)
3995 for (
unsigned int k = 0; k < deg; ++k)
3996 if (std::abs (solution ((i * deg + j) * deg + k)) > 1e-14)
3997 nodal_values[i + ((j + 2 * (deg
4002 = solution ((i * deg + j) * deg + k);
4036 const unsigned int offset)
const 4038 const unsigned int deg = this->degree-1;
4040 Assert (values.size () == this->generalized_support_points.size (),
4042 this->generalized_support_points.size ()));
4043 Assert (local_dofs.size () == this->dofs_per_cell,
4048 std::fill (local_dofs.begin (), local_dofs.end (), 0.);
4055 const QGauss<1> reference_edge_quadrature (this->degree);
4056 const unsigned int &n_edge_points
4057 = reference_edge_quadrature.
size ();
4061 for (
unsigned int i = 0; i < 2; ++i)
4063 for (
unsigned int q_point = 0; q_point < n_edge_points;
4065 local_dofs[i * this->degree]
4066 += reference_edge_quadrature.
weight (q_point)
4067 * values[q_point + i * n_edge_points] (1);
4073 if (std::abs (local_dofs[i * this->degree]) < 1e-14)
4074 local_dofs[i * this->degree] = 0.0;
4078 for (
unsigned int i = 0; i < 2; ++i)
4080 for (
unsigned int q_point = 0; q_point < n_edge_points;
4082 local_dofs[(i + 2) * this->degree]
4083 += reference_edge_quadrature.
weight (q_point)
4084 * values[q_point + (i + 2) * n_edge_points] (0);
4086 if (std::abs (local_dofs[(i + 2) * this->degree]) < 1e-14)
4087 local_dofs[(i + 2) * this->degree] = 0.0;
4100 if (this->degree > 1)
4105 const std::vector<Polynomials::Polynomial<double> > &
4112 std::vector<Polynomials::Polynomial<double> >
4113 lobatto_polynomials_grad (this->degree);
4115 for (
unsigned int i = 0; i < lobatto_polynomials_grad.size ();
4117 lobatto_polynomials_grad[i]
4118 = lobatto_polynomials[i + 1].derivative ();
4125 for (
unsigned int i = 0; i < system_matrix.
m (); ++i)
4126 for (
unsigned int j = 0; j < system_matrix.
n (); ++j)
4127 for (
unsigned int q_point = 0; q_point < n_edge_points;
4129 system_matrix (i, j)
4130 += boundary_weights (q_point, j)
4131 * lobatto_polynomials_grad[i + 1].value
4132 (this->generalized_face_support_points[q_point]
4137 system_matrix_inv.
invert (system_matrix);
4142 for (
unsigned int line = 0;
4143 line < GeometryInfo<dim>::lines_per_cell; ++line)
4144 if ((line < 2) || (offset == 0))
4149 for (
unsigned int q_point = 0; q_point < n_edge_points;
4153 = values[line * n_edge_points + q_point]
4154 (line_coordinate[line])
4155 - local_dofs[line * this->degree]
4156 * this->shape_value_component
4157 (line * this->degree,
4158 this->generalized_support_points[line
4161 line_coordinate[line]);
4163 for (
unsigned int i = 0; i < system_rhs.size ();
4165 system_rhs (i) += boundary_weights (q_point, i)
4169 system_matrix_inv.
vmult (solution, system_rhs);
4175 for (
unsigned int i = 0; i < solution.size (); ++i)
4176 if (std::abs (solution (i)) > 1e-14)
4177 local_dofs[line * this->degree + i + 1]
4190 const QGauss<dim> reference_quadrature (this->degree);
4191 const std::vector<Polynomials::Polynomial<double> > &
4192 legendre_polynomials
4194 const unsigned int &n_interior_points
4195 = reference_quadrature.
size ();
4197 system_matrix.
reinit ((this->degree-1) * this->degree,
4198 (this->degree-1) * this->degree);
4201 for (
unsigned int i = 0; i < this->degree; ++i)
4202 for (
unsigned int j = 0; j < this->degree-1; ++j)
4203 for (
unsigned int k = 0; k < this->degree; ++k)
4204 for (
unsigned int l = 0; l < this->degree-1; ++l)
4205 for (
unsigned int q_point = 0;
4206 q_point < n_interior_points; ++q_point)
4207 system_matrix (i * (this->degree-1) + j, k * (this->degree-1) + l)
4208 += reference_quadrature.
weight (q_point)
4209 * legendre_polynomials[i].value
4210 (this->generalized_support_points[q_point
4214 * lobatto_polynomials[j + 2].value
4215 (this->generalized_support_points[q_point
4219 * lobatto_polynomials_grad[k].value
4220 (this->generalized_support_points[q_point
4224 * lobatto_polynomials[l + 2].value
4225 (this->generalized_support_points[q_point
4230 system_matrix_inv.
reinit (system_matrix.
m (),
4231 system_matrix.
m ());
4232 system_matrix_inv.
invert (system_matrix);
4233 solution.reinit (system_matrix_inv.
m ());
4234 system_rhs.reinit (system_matrix.
m ());
4243 for (
unsigned int q_point = 0;
4244 q_point < n_interior_points; ++q_point)
4248 * n_edge_points] (0);
4250 for (
unsigned int i = 0; i < 2; ++i)
4251 for (
unsigned int j = 0; j < this->degree; ++j)
4252 tmp -= local_dofs[(i + 2) * this->degree + j]
4253 * this->shape_value_component
4254 ((i + 2) * this->degree + j,
4255 this->generalized_support_points[q_point
4260 for (
unsigned int i = 0; i < this->degree; ++i)
4261 for (
unsigned int j = 0; j < this->degree-1; ++j)
4262 system_rhs (i * (this->degree-1) + j)
4263 += reference_quadrature.
weight (q_point) * tmp
4264 * lobatto_polynomials_grad[i].value
4265 (this->generalized_support_points[q_point
4269 * lobatto_polynomials[j + 2].value
4270 (this->generalized_support_points[q_point
4276 system_matrix_inv.
vmult (solution, system_rhs);
4282 for (
unsigned int i = 0; i < this->degree; ++i)
4283 for (
unsigned int j = 0; j < this->degree-1; ++j)
4284 if (std::abs (solution (i * (this->degree-1) + j)) > 1e-14)
4286 * (this->degree-1) + j
4288 = solution (i * (this->degree-1) + j);
4296 for (
unsigned int q_point = 0; q_point < n_interior_points;
4301 * n_edge_points] (1);
4303 for (
unsigned int i = 0; i < 2; ++i)
4304 for (
unsigned int j = 0; j < this->degree; ++j)
4305 tmp -= local_dofs[i * this->degree + j]
4306 * this->shape_value_component
4307 (i * this->degree + j,
4308 this->generalized_support_points[q_point
4313 for (
unsigned int i = 0; i < this->degree; ++i)
4314 for (
unsigned int j = 0; j < this->degree-1; ++j)
4315 system_rhs (i * (this->degree-1) + j)
4316 += reference_quadrature.
weight (q_point) * tmp
4317 * lobatto_polynomials_grad[i].value
4318 (this->generalized_support_points[q_point
4322 * lobatto_polynomials[j + 2].value
4323 (this->generalized_support_points[q_point
4329 system_matrix_inv.
vmult (solution, system_rhs);
4335 for (
unsigned int i = 0; i < this->degree; ++i)
4336 for (
unsigned int j = 0; j < this->degree-1; ++j)
4337 if (std::abs (solution (i * (this->degree-1) + j)) > 1e-14)
4339 + this->degree-1) * this->degree]
4340 = solution (i * (this->degree-1) + j);
4349 reference_edge_quadrature (this->degree);
4350 const unsigned int &
4351 n_edge_points = reference_edge_quadrature.
size ();
4355 for (
unsigned int i = 0; i < 4; ++i)
4357 for (
unsigned int q_point = 0; q_point < n_edge_points;
4359 local_dofs[(i + 8) * this->degree]
4360 += reference_edge_quadrature.
weight (q_point)
4361 * values[q_point + (i + 8) * n_edge_points] (2);
4367 if (std::abs (local_dofs[(i + 8) * this->degree]) < 1e-14)
4368 local_dofs[(i + 8) * this->degree] = 0.0;
4371 if (offset + 1 < dim)
4373 for (
unsigned int i = 0; i < 2; ++i)
4374 for (
unsigned int j = 0; j < 2; ++j)
4376 for (
unsigned int q_point = 0; q_point < n_edge_points;
4378 local_dofs[(i + 4 * j) * this->degree]
4379 += reference_edge_quadrature.
weight (q_point)
4380 * values[q_point + (i + 4 * j) * n_edge_points]
4387 if (std::abs (local_dofs[(i + 4 * j) * this->degree])
4389 local_dofs[(i + 4 * j) * this->degree] = 0.0;
4393 for (
unsigned int i = 0; i < 2; ++i)
4394 for (
unsigned int j = 0; j < 2; ++j)
4396 for (
unsigned int q_point = 0;
4397 q_point < n_edge_points; ++q_point)
4398 local_dofs[(i + 4 * j + 2) * this->degree]
4399 += reference_edge_quadrature.
weight (q_point)
4400 * values[q_point + (i + 4 * j + 2)
4401 * n_edge_points] (0);
4407 if (std::abs (local_dofs[(i + 4 * j + 2)
4408 * this->degree]) < 1e-14)
4409 local_dofs[(i + 4 * j + 2) * this->degree] = 0.0;
4422 if (this->degree > 1)
4427 const std::vector<Polynomials::Polynomial<double> > &
4433 = {1, 1, 0, 0, 1, 1, 0, 0, 2, 2, 2, 2};
4436 std::vector<Polynomials::Polynomial<double> >
4437 lobatto_polynomials_grad (this->degree);
4439 for (
unsigned int i = 0; i < lobatto_polynomials_grad.size ();
4441 lobatto_polynomials_grad[i]
4442 = lobatto_polynomials[i + 1].derivative ();
4450 for (
unsigned int i = 0; i < system_matrix.
m (); ++i)
4451 for (
unsigned int j = 0; j < system_matrix.
n (); ++j)
4452 for (
unsigned int q_point = 0; q_point < n_edge_points;
4454 system_matrix (i, j)
4455 += boundary_weights (q_point, j)
4456 * lobatto_polynomials_grad[i + 1].value
4457 (this->generalized_face_support_points[q_point]
4460 system_matrix_inv.
invert (system_matrix);
4462 for (
unsigned int line = 0;
4463 line < GeometryInfo<dim>::lines_per_cell; ++line)
4468 if ((((line == 0) || (line == 1) || (line == 4) ||
4469 (line == 5)) && (offset + 1 < dim)) ||
4470 (((line == 2) || (line == 3) || (line == 6) ||
4471 (line == 7)) && (offset == 0)) || (line > 7))
4473 for (
unsigned int q_point = 0; q_point < n_edge_points;
4477 = values[line * n_edge_points + q_point]
4478 (line_coordinate[line])
4479 - local_dofs[line * this->degree]
4480 * this->shape_value_component
4481 (line * this->degree,
4482 this->generalized_support_points[line
4485 line_coordinate[line]);
4487 for (
unsigned int i = 0; i < system_rhs.size ();
4490 += boundary_weights (q_point, i) * tmp;
4493 system_matrix_inv.
vmult (solution, system_rhs);
4499 for (
unsigned int i = 0; i < solution.size (); ++i)
4500 if (std::abs (solution (i)) > 1e-14)
4501 local_dofs[line * this->degree + i + 1]
4514 const std::vector<Polynomials::Polynomial<double> > &
4515 legendre_polynomials
4518 n_face_points = n_edge_points * n_edge_points;
4520 system_matrix.
reinit ((this->degree-1) * this->degree,
4521 (this->degree-1) * this->degree);
4524 for (
unsigned int i = 0; i < this->degree; ++i)
4525 for (
unsigned int j = 0; j < this->degree-1; ++j)
4526 for (
unsigned int k = 0; k < this->degree; ++k)
4527 for (
unsigned int l = 0; l < this->degree-1; ++l)
4528 for (
unsigned int q_point = 0; q_point < n_face_points;
4530 system_matrix (i * (this->degree-1) + j, k * (this->degree-1) + l)
4531 += boundary_weights (q_point + n_edge_points,
4532 2 * (k * (this->degree-1) + l))
4533 * legendre_polynomials[i].value
4534 (this->generalized_face_support_points[q_point
4538 * lobatto_polynomials[j + 2].value
4539 (this->generalized_face_support_points[q_point
4544 system_matrix_inv.
reinit (system_matrix.
m (),
4545 system_matrix.
n ());
4546 system_matrix_inv.
invert (system_matrix);
4547 solution.reinit (system_matrix.
m ());
4548 system_rhs.reinit (system_matrix.
m ());
4550 for (
unsigned int face = 0;
4551 face < GeometryInfo<dim>::faces_per_cell; ++face)
4557 if (offset + 1 < dim)
4564 for (
unsigned int q_point = 0;
4565 q_point < n_face_points; ++q_point)
4570 * n_edge_points] (1);
4572 for (
unsigned int i = 0; i < 2; ++i)
4573 for (
unsigned int j = 0; j < this->degree; ++j)
4575 -= local_dofs[4 * i * this->degree
4577 * this->shape_value_component
4578 (4 * i * this->degree + j,
4579 this->generalized_support_points[q_point
4584 for (
unsigned int i = 0; i < this->degree; ++i)
4585 for (
unsigned int j = 0; j < this->degree-1; ++j)
4586 system_rhs (i * (this->degree-1) + j)
4588 (q_point + n_edge_points,
4589 2 * (i * (this->degree-1) + j)) * tmp;
4592 system_matrix_inv.
vmult (solution, system_rhs);
4598 for (
unsigned int i = 0; i < this->degree; ++i)
4599 for (
unsigned int j = 0; j < this->degree-1; ++j)
4600 if (std::abs (solution (i * (this->degree-1) + j))
4604 * (this->degree-1) + j
4606 = solution (i * (this->degree-1) + j);
4614 for (
unsigned int q_point = 0;
4615 q_point < n_face_points; ++q_point)
4620 * n_edge_points] (2);
4622 for (
unsigned int i = 0; i < 2; ++i)
4623 for (
unsigned int j = 0; j < this->degree; ++j)
4624 tmp -= local_dofs[2 * (i + 4)
4626 * this->shape_value_component
4627 (2 * (i + 4) * this->degree + j,
4628 this->generalized_support_points[q_point
4633 for (
unsigned int i = 0; i < this->degree; ++i)
4634 for (
unsigned int j = 0; j < this->degree-1; ++j)
4635 system_rhs (i * (this->degree-1) + j)
4637 (q_point + n_edge_points,
4638 2 * (i * (this->degree-1) + j) + 1)
4642 system_matrix_inv.
vmult (solution, system_rhs);
4648 for (
unsigned int i = 0; i < this->degree; ++i)
4649 for (
unsigned int j = 0; j < this->degree-1; ++j)
4650 if (std::abs (solution (i * (this->degree-1) + j)) > 1e-14)
4654 = solution (i * (this->degree-1) + j);
4661 if (offset + 1 < dim)
4668 for (
unsigned int q_point = 0;
4669 q_point < n_face_points; ++q_point)
4675 + n_face_points] (1);
4677 for (
unsigned int i = 0; i < 2; ++i)
4678 for (
unsigned int j = 0; j <= deg; ++j)
4679 tmp -= local_dofs[(4 * i + 1)
4681 * this->shape_value_component
4682 ((4 * i + 1) * this->degree
4684 this->generalized_support_points[q_point
4690 for (
unsigned int i = 0; i <= deg; ++i)
4691 for (
unsigned int j = 0; j < deg; ++j)
4692 system_rhs (i * deg + j)
4694 (q_point + n_edge_points,
4695 2 * (i * deg + j)) * tmp;
4698 system_matrix_inv.
vmult (solution, system_rhs);
4704 for (
unsigned int i = 0; i <= deg; ++i)
4705 for (
unsigned int j = 0; j < deg; ++j)
4706 if (std::abs (solution (i * deg + j))
4709 + 2 * this->degree) * deg + j
4711 = solution (i * deg + j);
4719 for (
unsigned int q_point = 0;
4720 q_point < n_face_points; ++q_point)
4725 * n_edge_points + n_face_points]
4728 for (
unsigned int i = 0; i < 2; ++i)
4729 for (
unsigned int j = 0; j <= deg; ++j)
4730 tmp -= local_dofs[(2 * (i + 4) + 1)
4732 * this->shape_value_component
4733 ((2 * (i + 4) + 1) * this->degree
4735 this->generalized_support_points[q_point
4741 for (
unsigned int i = 0; i <= deg; ++i)
4742 for (
unsigned int j = 0; j < deg; ++j)
4743 system_rhs (i * deg + j)
4745 (q_point + n_edge_points,
4746 2 * (i * deg + j) + 1) * tmp;
4749 system_matrix_inv.
vmult (solution, system_rhs);
4755 for (
unsigned int i = 0; i <= deg; ++i)
4756 for (
unsigned int j = 0; j < deg; ++j)
4757 if (std::abs (solution (i * deg + j)) > 1e-14)
4761 = solution (i * deg + j);
4775 for (
unsigned int q_point = 0;
4776 q_point < n_face_points; ++q_point)
4781 * n_edge_points + 2 * n_face_points]
4784 for (
unsigned int i = 0; i < 2; ++i)
4785 for (
unsigned int j = 0; j <= deg; ++j)
4786 tmp -= local_dofs[(i + 8) * this->degree
4788 * this->shape_value_component
4789 ((i + 8) * this->degree + j,
4790 this->generalized_support_points[q_point
4797 for (
unsigned int i = 0; i <= deg; ++i)
4798 for (
unsigned int j = 0; j < deg; ++j)
4799 system_rhs (i * deg + j)
4801 (q_point + n_edge_points,
4802 2 * (i * deg + j)) * tmp;
4805 system_matrix_inv.
vmult (solution, system_rhs);
4811 for (
unsigned int i = 0; i <= deg; ++i)
4812 for (
unsigned int j = 0; j < deg; ++j)
4813 if (std::abs (solution (i * deg + j))
4816 + 4 * this->degree) * deg
4819 = solution (i * deg + j);
4827 for (
unsigned int q_point = 0;
4828 q_point < n_face_points; ++q_point)
4834 + 2 * n_face_points] (0);
4836 for (
unsigned int i = 0; i < 2; ++i)
4837 for (
unsigned int j = 0; j <= deg; ++j)
4838 tmp -= local_dofs[(4 * i + 2)
4840 * this->shape_value_component
4841 ((4 * i + 2) * this->degree
4843 this->generalized_support_points[q_point
4850 for (
unsigned int i = 0; i <= deg; ++i)
4851 for (
unsigned int j = 0; j < deg; ++j)
4852 system_rhs (i * deg + j)
4854 (q_point + n_edge_points,
4855 2 * (i * deg + j) + 1) * tmp;
4858 system_matrix_inv.
vmult (solution, system_rhs);
4864 for (
unsigned int i = 0; i <= deg; ++i)
4865 for (
unsigned int j = 0; j < deg; ++j)
4866 if (std::abs (solution (i * deg + j)) > 1e-14)
4868 + 5 * deg) * this->degree]
4869 = solution (i * deg + j);
4883 for (
unsigned int q_point = 0;
4884 q_point < n_face_points; ++q_point)
4889 * n_edge_points + 3 * n_face_points]
4892 for (
unsigned int i = 0; i < 2; ++i)
4893 for (
unsigned int j = 0; j <= deg; ++j)
4894 tmp -= local_dofs[(i + 10) * this->degree
4896 * this->shape_value_component
4897 ((i + 10) * this->degree + j,
4898 this->generalized_support_points[q_point
4905 for (
unsigned int i = 0; i <= deg; ++i)
4906 for (
unsigned int j = 0; j < deg; ++j)
4907 system_rhs (i * deg + j)
4909 (q_point + n_edge_points,
4910 2 * (i * deg + j)) * tmp;
4913 system_matrix_inv.
vmult (solution, system_rhs);
4919 for (
unsigned int i = 0; i <= deg; ++i)
4920 for (
unsigned int j = 0; j < deg; ++j)
4921 if (std::abs (solution (i * deg + j))
4924 + 6 * this->degree) * deg + j
4926 = solution (i * deg + j);
4934 for (
unsigned int q_point = 0;
4935 q_point < n_face_points; ++q_point)
4941 * n_face_points] (0);
4943 for (
unsigned int i = 0; i < 2; ++i)
4944 for (
unsigned int j = 0; j <= deg; ++j)
4945 tmp -= local_dofs[(4 * i + 3)
4947 * this->shape_value_component
4948 ((4 * i + 3) * this->degree
4950 this->generalized_support_points[q_point
4957 for (
unsigned int i = 0; i <= deg; ++i)
4958 for (
unsigned int j = 0; j < deg; ++j)
4959 system_rhs (i * deg + j)
4961 (q_point + n_edge_points,
4962 2 * (i * deg + j) + 1) * tmp;
4965 system_matrix_inv.
vmult (solution, system_rhs);
4971 for (
unsigned int i = 0; i <= deg; ++i)
4972 for (
unsigned int j = 0; j < deg; ++j)
4973 if (std::abs (solution (i * deg + j)) > 1e-14)
4975 + 7 * deg) * this->degree]
4976 = solution (i * deg + j);
4983 if (offset + 1 < dim)
4992 for (
unsigned int q_point = 0;
4993 q_point < n_face_points; ++q_point)
4999 * n_face_points] (0);
5001 for (
unsigned int i = 0; i < 2; ++i)
5002 for (
unsigned int j = 0; j <= deg; ++j)
5003 tmp -= local_dofs[(i + 2)
5006 * this->shape_value_component
5007 ((i + 2) * this->degree
5009 this->generalized_support_points[q_point
5016 for (
unsigned int i = 0; i <= deg; ++i)
5017 for (
unsigned int j = 0; j < deg; ++j)
5018 system_rhs (i * deg + j)
5020 (q_point + n_edge_points,
5021 2 * (i * deg + j)) * tmp;
5024 system_matrix_inv.
vmult 5025 (solution, system_rhs);
5031 for (
unsigned int i = 0; i <= deg; ++i)
5032 for (
unsigned int j = 0; j < deg; ++j)
5033 if (std::abs (solution (i * deg + j))
5036 + 8 * this->degree) * deg
5039 = solution (i * deg + j);
5047 for (
unsigned int q_point = 0;
5048 q_point < n_face_points; ++q_point)
5054 * n_face_points] (1);
5056 for (
unsigned int i = 0; i < 2; ++i)
5057 for (
unsigned int j = 0; j <= deg; ++j)
5058 tmp -= local_dofs[i * this->degree + j]
5059 * this->shape_value_component
5060 (i * this->degree + j,
5061 this->generalized_support_points[q_point
5068 for (
unsigned int i = 0; i <= deg; ++i)
5069 for (
unsigned int j = 0; j < deg; ++j)
5070 system_rhs (i * deg + j)
5072 (q_point + n_edge_points,
5073 2 * (i * deg + j) + 1) * tmp;
5076 system_matrix_inv.
vmult (solution, system_rhs);
5082 for (
unsigned int i = 0; i <= deg; ++i)
5083 for (
unsigned int j = 0; j < deg; ++j)
5084 if (std::abs (solution (i * deg + j))
5089 = solution (i * deg + j);
5096 if (offset + 1 < dim)
5105 for (
unsigned int q_point = 0;
5106 q_point < n_face_points; ++q_point)
5112 + 5 * n_face_points] (0);
5114 for (
unsigned int i = 0; i < 2; ++i)
5115 for (
unsigned int j = 0; j <= deg; ++j)
5116 tmp -= local_dofs[(i + 6)
5118 * this->shape_value_component
5119 ((i + 6) * this->degree + j,
5120 this->generalized_support_points[q_point
5127 for (
unsigned int i = 0; i <= deg; ++i)
5128 for (
unsigned int j = 0; j < deg; ++j)
5129 system_rhs (i * deg + j)
5131 (q_point + n_edge_points,
5132 2 * (i * deg + j)) * tmp;
5135 system_matrix_inv.
vmult 5136 (solution, system_rhs);
5142 for (
unsigned int i = 0; i <= deg; ++i)
5143 for (
unsigned int j = 0; j < deg; ++j)
5144 if (std::abs (solution (i * deg + j))
5147 + 10 * this->degree)
5150 = solution (i * deg + j);
5158 for (
unsigned int q_point = 0;
5159 q_point < n_face_points; ++q_point)
5165 * n_face_points] (1);
5167 for (
unsigned int i = 0; i < 2; ++i)
5168 for (
unsigned int j = 0; j <= deg; ++j)
5169 tmp -= local_dofs[(i + 4)
5171 * this->shape_value_component
5172 ((i + 4) * this->degree + j,
5173 this->generalized_support_points[q_point
5180 for (
unsigned int i = 0; i <= deg; ++i)
5181 for (
unsigned int j = 0; j < deg; ++j)
5182 system_rhs (i * deg + j)
5184 (q_point + n_edge_points,
5185 2 * (i * deg + j) + 1) * tmp;
5188 system_matrix_inv.
vmult (solution, system_rhs);
5194 for (
unsigned int i = 0; i <= deg; ++i)
5195 for (
unsigned int j = 0; j < deg; ++j)
5196 if (std::abs (solution (i * deg + j))
5199 + 11 * deg) * this->degree]
5200 = solution (i * deg + j);
5210 const QGauss<dim> reference_quadrature (this->degree);
5211 const unsigned int &
5212 n_interior_points = reference_quadrature.
size ();
5216 system_matrix.
reinit (this->degree * deg * deg,
5217 this->degree * deg * deg);
5220 for (
unsigned int i = 0; i <= deg; ++i)
5221 for (
unsigned int j = 0; j < deg; ++j)
5222 for (
unsigned int k = 0; k < deg; ++k)
5223 for (
unsigned int l = 0; l <= deg; ++l)
5224 for (
unsigned int m = 0; m < deg; ++m)
5225 for (
unsigned int n = 0; n < deg; ++n)
5226 for (
unsigned int q_point = 0;
5227 q_point < n_interior_points; ++q_point)
5228 system_matrix ((i * deg + j) * deg + k,
5229 (l * deg + m) * deg + n)
5230 += reference_quadrature.
weight (q_point)
5231 * legendre_polynomials[i].value
5232 (this->generalized_support_points[q_point
5237 (0)) * lobatto_polynomials[j + 2].value
5238 (this->generalized_support_points[q_point
5244 * lobatto_polynomials[k + 2].value
5245 (this->generalized_support_points[q_point
5251 * lobatto_polynomials_grad[l].value
5252 (this->generalized_support_points[q_point
5258 * lobatto_polynomials[m + 2].value
5259 (this->generalized_support_points[q_point
5265 * lobatto_polynomials[n + 2].value
5266 (this->generalized_support_points[q_point
5273 system_matrix_inv.
reinit (system_matrix.
m (),
5274 system_matrix.
m ());
5275 system_matrix_inv.
invert (system_matrix);
5276 system_rhs.reinit (system_matrix_inv.
m ());
5277 solution.reinit (system_matrix.
m ());
5279 if (offset + 1 < dim)
5286 for (
unsigned int q_point = 0;
5287 q_point < n_interior_points; ++q_point)
5294 * n_face_points] (0);
5296 for (
unsigned int i = 0; i <= deg; ++i)
5298 for (
unsigned int j = 0; j < 2; ++j)
5299 for (
unsigned int k = 0; k < 2; ++k)
5300 tmp -= local_dofs[i + (j + 4 * k + 2)
5302 * this->shape_value_component
5303 (i + (j + 4 * k + 2)
5305 this->generalized_support_points[q_point
5312 for (
unsigned int j = 0; j < deg; ++j)
5313 for (
unsigned int k = 0; k < 4; ++k)
5314 tmp -= local_dofs[(i + 2 * (k + 2)
5319 * this->shape_value_component
5320 ((i + 2 * (k + 2) * this->degree
5324 this->generalized_support_points[q_point
5332 for (
unsigned int i = 0; i <= deg; ++i)
5333 for (
unsigned int j = 0; j < deg; ++j)
5334 for (
unsigned int k = 0; k < deg; ++k)
5335 system_rhs ((i * deg + j) * deg + k)
5336 += reference_quadrature.
weight (q_point)
5338 * lobatto_polynomials_grad[i].value
5339 (this->generalized_support_points[q_point
5345 * lobatto_polynomials[j + 2].value
5346 (this->generalized_support_points[q_point
5352 * lobatto_polynomials[k + 2].value
5353 (this->generalized_support_points[q_point
5361 system_matrix_inv.
vmult (solution, system_rhs);
5367 for (
unsigned int i = 0; i <= deg; ++i)
5368 for (
unsigned int j = 0; j < deg; ++j)
5369 for (
unsigned int k = 0; k < deg; ++k)
5370 if (std::abs (solution ((i * deg + j) * deg + k))
5380 = solution ((i * deg + j) * deg + k);
5386 for (
unsigned int q_point = 0; q_point < n_interior_points;
5393 * n_face_points] (1);
5395 for (
unsigned int i = 0; i <= deg; ++i)
5396 for (
unsigned int j = 0; j < 2; ++j)
5398 for (
unsigned int k = 0; k < 2; ++k)
5399 tmp -= local_dofs[i + (4 * j + k)
5401 * this->shape_value_component
5402 (i + (4 * j + k) * this->degree,
5403 this->generalized_support_points[q_point
5410 for (
unsigned int k = 0; k < deg; ++k)
5411 tmp -= local_dofs[(i + 2 * j * this->degree
5415 * this->shape_value_component
5416 ((i + 2 * j * this->degree
5420 this->generalized_support_points[q_point
5426 + local_dofs[i + ((2 * j + 9) * deg + k
5429 * this->shape_value_component
5430 (i + ((2 * j + 9) * deg + k
5433 this->generalized_support_points[q_point
5441 for (
unsigned int i = 0; i <= deg; ++i)
5442 for (
unsigned int j = 0; j < deg; ++j)
5443 for (
unsigned int k = 0; k < deg; ++k)
5444 system_rhs ((i * deg + j) * deg + k)
5445 += reference_quadrature.
weight (q_point) * tmp
5446 * lobatto_polynomials_grad[i].value
5447 (this->generalized_support_points[q_point
5453 * lobatto_polynomials[j + 2].value
5454 (this->generalized_support_points[q_point
5460 * lobatto_polynomials[k + 2].value
5461 (this->generalized_support_points[q_point
5469 system_matrix_inv.
vmult (solution, system_rhs);
5475 for (
unsigned int i = 0; i <= deg; ++i)
5476 for (
unsigned int j = 0; j < deg; ++j)
5477 for (
unsigned int k = 0; k < deg; ++k)
5478 if (std::abs (solution ((i * deg + j) * deg + k))
5480 local_dofs[((i + this->degree + 2
5487 = solution ((i * deg + j) * deg + k);
5493 for (
unsigned int q_point = 0; q_point < n_interior_points;
5500 * n_face_points] (2);
5502 for (
unsigned int i = 0; i <= deg; ++i)
5503 for (
unsigned int j = 0; j < 4; ++j)
5505 tmp -= local_dofs[i + (j + 8) * this->degree]
5506 * this->shape_value_component
5507 (i + (j + 8) * this->degree,
5508 this->generalized_support_points[q_point
5515 for (
unsigned int k = 0; k < deg; ++k)
5516 tmp -= local_dofs[i + ((2 * j + 1) * deg + k
5519 * this->shape_value_component
5520 (i + ((2 * j + 1) * deg + k
5523 this->generalized_support_points[q_point
5531 for (
unsigned int i = 0; i <= deg; ++i)
5532 for (
unsigned int j = 0; j < deg; ++j)
5533 for (
unsigned int k = 0; k < deg; ++k)
5534 system_rhs ((i * deg + j) * deg + k)
5535 += reference_quadrature.
weight (q_point) * tmp
5536 * lobatto_polynomials_grad[i].value
5537 (this->generalized_support_points[q_point
5543 * lobatto_polynomials[j + 2].value
5544 (this->generalized_support_points[q_point
5550 * lobatto_polynomials[k + 2].value
5551 (this->generalized_support_points[q_point
5559 system_matrix_inv.
vmult (solution, system_rhs);
5565 for (
unsigned int i = 0; i <= deg; ++i)
5566 for (
unsigned int j = 0; j < deg; ++j)
5567 for (
unsigned int k = 0; k < deg; ++k)
5568 if (std::abs (solution ((i * deg + j) * deg + k))
5570 local_dofs[i + ((j + 2
5575 = solution ((i * deg + j) * deg + k);
5596 const VectorSlice<
const std::vector<std::vector<double> > > &values)
5599 const unsigned int deg = this->degree-1;
5602 Assert (values[0].size () == this->generalized_support_points.size (),
5604 this->generalized_support_points.size ()));
5605 Assert (local_dofs.size () == this->dofs_per_cell,
5607 std::fill (local_dofs.begin (), local_dofs.end (), 0.0);
5615 const QGauss<dim - 1> reference_edge_quadrature (this->degree);
5616 const unsigned int &
5617 n_edge_points = reference_edge_quadrature.size ();
5619 for (
unsigned int i = 0; i < 2; ++i)
5620 for (
unsigned int j = 0; j < 2; ++j)
5622 for (
unsigned int q_point = 0; q_point < n_edge_points;
5624 local_dofs[(i + 2 * j) * this->degree]
5625 += reference_edge_quadrature.weight (q_point)
5626 * values[1 - j][q_point + (i + 2 * j) * n_edge_points];
5632 if (std::abs (local_dofs[(i + 2 * j) * this->degree]) < 1e-14)
5633 local_dofs[(i + 2 * j) * this->degree] = 0.0;
5646 if (this->degree-1 > 1)
5651 const std::vector<Polynomials::Polynomial<double> > &
5656 std::vector<Polynomials::Polynomial<double> >
5657 lobatto_polynomials_grad (this->degree);
5659 for (
unsigned int i = 0; i < lobatto_polynomials_grad.size ();
5661 lobatto_polynomials_grad[i]
5662 = lobatto_polynomials[i + 1].derivative ();
5667 for (
unsigned int i = 0; i < system_matrix.
m (); ++i)
5668 for (
unsigned int j = 0; j < system_matrix.
n (); ++j)
5669 for (
unsigned int q_point = 0; q_point < n_edge_points;
5671 system_matrix (i, j)
5672 += boundary_weights (q_point, j)
5673 * lobatto_polynomials_grad[i + 1].value
5674 (this->generalized_face_support_points[q_point]
5679 system_matrix_inv.
invert (system_matrix);
5687 for (
unsigned int line = 0;
5688 line < GeometryInfo<dim>::lines_per_cell; ++line)
5693 for (
unsigned int q_point = 0; q_point < n_edge_points;
5697 = values[line_coordinate[line]][line * n_edge_points
5699 - local_dofs[line * this->degree]
5700 * this->shape_value_component
5701 (line * this->degree,
5702 this->generalized_support_points[line
5705 line_coordinate[line]);
5707 for (
unsigned int i = 0; i < system_rhs.size (); ++i)
5708 system_rhs (i) += boundary_weights (q_point, i) * tmp;
5711 system_matrix_inv.
vmult (solution, system_rhs);
5717 for (
unsigned int i = 0; i < solution.size (); ++i)
5718 if (std::abs (solution (i)) > 1e-14)
5719 local_dofs[line * this->degree + i + 1] = solution (i);
5731 const QGauss<dim> reference_quadrature (this->degree);
5732 const unsigned int &
5733 n_interior_points = reference_quadrature.
size ();
5734 const std::vector<Polynomials::Polynomial<double> > &
5735 legendre_polynomials
5738 system_matrix.
reinit ((this->degree-1) * this->degree,
5739 (this->degree-1) * this->degree);
5742 for (
unsigned int i = 0; i < this->degree; ++i)
5743 for (
unsigned int j = 0; j < this->degree-1; ++j)
5744 for (
unsigned int k = 0; k < this->degree; ++k)
5745 for (
unsigned int l = 0; l < this->degree-1; ++l)
5746 for (
unsigned int q_point = 0;
5747 q_point < n_interior_points; ++q_point)
5748 system_matrix (i * (this->degree-1) + j, k * (this->degree-1) + l)
5749 += reference_quadrature.
weight (q_point)
5750 * legendre_polynomials[i].value
5751 (this->generalized_support_points[q_point
5755 * lobatto_polynomials[j + 2].value
5756 (this->generalized_support_points[q_point
5760 * lobatto_polynomials_grad[k].value
5761 (this->generalized_support_points[q_point
5765 * lobatto_polynomials[l + 2].value
5766 (this->generalized_support_points[q_point
5771 system_matrix_inv.
reinit (system_matrix.
m (),
5772 system_matrix.
m ());
5773 system_matrix_inv.
invert (system_matrix);
5777 system_rhs.reinit (system_matrix_inv.
m ());
5780 for (
unsigned int q_point = 0; q_point < n_interior_points;
5787 for (
unsigned int i = 0; i < 2; ++i)
5788 for (
unsigned int j = 0; j <= deg; ++j)
5789 tmp -= local_dofs[(i + 2) * this->degree + j]
5790 * this->shape_value_component
5791 ((i + 2) * this->degree + j,
5792 this->generalized_support_points[q_point
5797 for (
unsigned int i = 0; i <= deg; ++i)
5798 for (
unsigned int j = 0; j < deg; ++j)
5799 system_rhs (i * deg + j)
5800 += reference_quadrature.
weight (q_point) * tmp
5801 * lobatto_polynomials_grad[i].value
5802 (this->generalized_support_points[q_point
5806 * lobatto_polynomials[j + 2].value
5807 (this->generalized_support_points[q_point
5813 solution.reinit (system_matrix.
m ());
5814 system_matrix_inv.
vmult (solution, system_rhs);
5820 for (
unsigned int i = 0; i <= deg; ++i)
5821 for (
unsigned int j = 0; j < deg; ++j)
5822 if (std::abs (solution (i * deg + j)) > 1e-14)
5825 = solution (i * deg + j);
5832 for (
unsigned int q_point = 0; q_point < n_interior_points;
5839 for (
unsigned int i = 0; i < 2; ++i)
5840 for (
unsigned int j = 0; j <= deg; ++j)
5841 tmp -= local_dofs[i * this->degree + j]
5842 * this->shape_value_component
5843 (i * this->degree + j,
5844 this->generalized_support_points[q_point
5849 for (
unsigned int i = 0; i <= deg; ++i)
5850 for (
unsigned int j = 0; j < deg; ++j)
5851 system_rhs (i * deg + j)
5852 += reference_quadrature.
weight (q_point) * tmp
5853 * lobatto_polynomials_grad[i].value
5854 (this->generalized_support_points[q_point
5858 * lobatto_polynomials[j + 2].value
5859 (this->generalized_support_points[q_point
5865 system_matrix_inv.
vmult (solution, system_rhs);
5871 for (
unsigned int i = 0; i <= deg; ++i)
5872 for (
unsigned int j = 0; j < deg; ++j)
5873 if (std::abs (solution (i * deg + j)) > 1e-14)
5875 + deg) * this->degree]
5876 = solution (i * deg + j);
5886 const QGauss<1> reference_edge_quadrature (this->degree);
5887 const unsigned int &
5888 n_edge_points = reference_edge_quadrature.
size ();
5890 for (
unsigned int q_point = 0; q_point < n_edge_points; ++q_point)
5892 for (
unsigned int i = 0; i < 4; ++i)
5893 local_dofs[(i + 8) * this->degree]
5894 += reference_edge_quadrature.
weight (q_point)
5895 * values[2][q_point + (i + 8) * n_edge_points];
5897 for (
unsigned int i = 0; i < 2; ++i)
5898 for (
unsigned int j = 0; j < 2; ++j)
5899 for (
unsigned int k = 0; k < 2; ++k)
5900 local_dofs[(i + 2 * (2 * j + k)) * this->degree]
5901 += reference_edge_quadrature.
weight (q_point)
5902 * values[1 - k][q_point + (i + 2 * (2 * j + k))
5910 for (
unsigned int i = 0; i < 4; ++i)
5911 if (std::abs (local_dofs[(i + 8) * this->degree]) < 1e-14)
5912 local_dofs[(i + 8) * this->degree] = 0.0;
5914 for (
unsigned int i = 0; i < 2; ++i)
5915 for (
unsigned int j = 0; j < 2; ++j)
5916 for (
unsigned int k = 0; k < 2; ++k)
5917 if (std::abs (local_dofs[(i + 2 * (2 * j + k)) * this->degree])
5919 local_dofs[(i + 2 * (2 * j + k)) * this->degree] = 0.0;
5930 if (this->degree > 1)
5935 const std::vector<Polynomials::Polynomial<double> > &
5940 std::vector<Polynomials::Polynomial<double> >
5941 lobatto_polynomials_grad (this->degree);
5943 for (
unsigned int i = 0; i < lobatto_polynomials_grad.size ();
5945 lobatto_polynomials_grad[i]
5946 = lobatto_polynomials[i + 1].derivative ();
5951 for (
unsigned int i = 0; i < system_matrix.
m (); ++i)
5952 for (
unsigned int j = 0; j < system_matrix.
n (); ++j)
5953 for (
unsigned int q_point = 0; q_point < n_edge_points;
5955 system_matrix (i, j)
5956 += boundary_weights (q_point, j)
5957 * lobatto_polynomials_grad[i + 1].value
5958 (this->generalized_face_support_points[q_point]
5963 system_matrix_inv.
invert (system_matrix);
5967 = {1, 1, 0, 0, 1, 1, 0, 0, 2, 2, 2, 2};
5971 for (
unsigned int line = 0;
5972 line < GeometryInfo<dim>::lines_per_cell; ++line)
5977 for (
unsigned int q_point = 0; q_point < this->degree; ++q_point)
5980 = values[line_coordinate[line]][line * this->degree
5982 - local_dofs[line * this->degree]
5983 * this->shape_value_component
5984 (line * this->degree,
5985 this->generalized_support_points[line
5988 line_coordinate[line]);
5990 for (
unsigned int i = 0; i < system_rhs.size (); ++i)
5991 system_rhs (i) += boundary_weights (q_point, i)
5995 system_matrix_inv.
vmult (solution, system_rhs);
6001 for (
unsigned int i = 0; i < solution.size (); ++i)
6002 if (std::abs (solution (i)) > 1e-14)
6003 local_dofs[line * this->degree + i + 1] = solution (i);
6014 const std::vector<Polynomials::Polynomial<double> > &
6015 legendre_polynomials
6017 const unsigned int n_face_points = n_edge_points * n_edge_points;
6019 system_matrix.
reinit ((this->degree-1) * this->degree,
6020 (this->degree-1) * this->degree);
6023 for (
unsigned int i = 0; i < this->degree; ++i)
6024 for (
unsigned int j = 0; j < this->degree-1; ++j)
6025 for (
unsigned int k = 0; k < this->degree; ++k)
6026 for (
unsigned int l = 0; l < this->degree-1; ++l)
6027 for (
unsigned int q_point = 0; q_point < n_face_points;
6029 system_matrix (i * (this->degree-1) + j, k * (this->degree-1) + l)
6030 += boundary_weights (q_point + n_edge_points,
6031 2 * (k * (this->degree-1) + l))
6032 * legendre_polynomials[i].value
6033 (this->generalized_face_support_points[q_point
6037 * lobatto_polynomials[j + 2].value
6038 (this->generalized_face_support_points[q_point
6043 system_matrix_inv.
reinit (system_matrix.
m (),
6044 system_matrix.
m ());
6045 system_matrix_inv.
invert (system_matrix);
6046 solution.reinit (system_matrix.
m ());
6047 system_rhs.reinit (system_matrix.
m ());
6051 = {{1, 2}, {1, 2}, {2, 0}, {2, 0}, {0, 1}, {0, 1}};
6054 = {{0, 4, 8, 10}, {1, 5, 9, 11}, {8, 9, 2, 6},
6055 {10, 11, 3, 7}, {2, 3, 0, 1}, {6, 7, 4, 5}
6058 for (
unsigned int face = 0;
6059 face < GeometryInfo<dim>::faces_per_cell; ++face)
6066 for (
unsigned int q_point = 0; q_point < n_face_points;
6070 = values[face_coordinates[face][0]][q_point
6074 for (
unsigned int i = 0; i < 2; ++i)
6075 for (
unsigned int j = 0; j <= deg; ++j)
6076 tmp -= local_dofs[edge_indices[face][i]
6078 * this->shape_value_component
6079 (edge_indices[face][i] * this->degree + j,
6080 this->generalized_support_points[q_point
6083 face_coordinates[face][0]);
6085 for (
unsigned int i = 0; i <= deg; ++i)
6086 for (
unsigned int j = 0; j < deg; ++j)
6087 system_rhs (i * deg + j)
6088 += boundary_weights (q_point + n_edge_points,
6089 2 * (i * deg + j)) * tmp;
6092 system_matrix_inv.
vmult (solution, system_rhs);
6098 for (
unsigned int i = 0; i <= deg; ++i)
6099 for (
unsigned int j = 0; j < deg; ++j)
6100 if (std::abs (solution (i * deg + j)) > 1e-14)
6101 local_dofs[(2 * face * this->degree + i
6104 = solution (i * deg + j);
6111 for (
unsigned int q_point = 0; q_point < n_face_points;
6115 = values[face_coordinates[face][1]][q_point
6119 for (
int i = 2; i < (int) GeometryInfo<dim>::lines_per_face; ++i)
6120 for (
unsigned int j = 0; j <= deg; ++j)
6121 tmp -= local_dofs[edge_indices[face][i]
6123 * this->shape_value_component
6124 (edge_indices[face][i] * this->degree + j,
6125 this->generalized_support_points[q_point
6128 face_coordinates[face][1]);
6130 for (
unsigned int i = 0; i <= deg; ++i)
6131 for (
unsigned int j = 0; j < deg; ++j)
6132 system_rhs (i * deg + j)
6133 += boundary_weights (q_point + n_edge_points,
6134 2 * (i * deg + j) + 1)
6138 system_matrix_inv.
vmult (solution, system_rhs);
6144 for (
unsigned int i = 0; i <= deg; ++i)
6145 for (
unsigned int j = 0; j < deg; ++j)
6146 if (std::abs (solution (i * deg + j)) > 1e-14)
6149 = solution (i * deg + j);
6157 const QGauss<dim> reference_quadrature (this->degree);
6159 n_interior_points = reference_quadrature.
size ();
6163 system_matrix.
reinit (this->degree * deg * deg,
6164 this->degree * deg * deg);
6167 for (
unsigned int i = 0; i <= deg; ++i)
6168 for (
unsigned int j = 0; j < deg; ++j)
6169 for (
unsigned int k = 0; k < deg; ++k)
6170 for (
unsigned int l = 0; l <= deg; ++l)
6171 for (
unsigned int m = 0; m < deg; ++m)
6172 for (
unsigned int n = 0; n < deg; ++n)
6173 for (
unsigned int q_point = 0;
6174 q_point < n_interior_points; ++q_point)
6175 system_matrix ((i * deg + j) * deg + k,
6176 (l * deg + m) * deg + n)
6177 += reference_quadrature.
weight (q_point)
6178 * legendre_polynomials[i].value
6179 (this->generalized_support_points[q_point
6185 * lobatto_polynomials[j + 2].value
6186 (this->generalized_support_points[q_point
6192 * lobatto_polynomials[k + 2].value
6193 (this->generalized_support_points[q_point
6199 * lobatto_polynomials_grad[l].value
6200 (this->generalized_support_points[q_point
6206 * lobatto_polynomials[m + 2].value
6207 (this->generalized_support_points[q_point
6213 * lobatto_polynomials[n + 2].value
6214 (this->generalized_support_points[q_point
6221 system_matrix_inv.
reinit (system_matrix.
m (),
6222 system_matrix.
m ());
6223 system_matrix_inv.
invert (system_matrix);
6225 system_rhs.reinit (system_matrix.
m ());
6228 for (
unsigned int q_point = 0; q_point < n_interior_points;
6237 for (
unsigned int i = 0; i <= deg; ++i)
6239 for (
unsigned int j = 0; j < 2; ++j)
6240 for (
unsigned int k = 0; k < 2; ++k)
6241 tmp -= local_dofs[i + (j + 4 * k + 2) * this->degree]
6242 * this->shape_value_component
6243 (i + (j + 4 * k + 2) * this->degree,
6244 this->generalized_support_points[q_point
6251 for (
unsigned int j = 0; j < deg; ++j)
6252 for (
unsigned int k = 0; k < 4; ++k)
6253 tmp -= local_dofs[(i + 2 * (k + 2) * this->degree
6257 * this->shape_value_component
6258 ((i + 2 * (k + 2) * this->degree
6262 this->generalized_support_points[q_point
6270 for (
unsigned int i = 0; i <= deg; ++i)
6271 for (
unsigned int j = 0; j < deg; ++j)
6272 for (
unsigned int k = 0; k < deg; ++k)
6273 system_rhs ((i * deg + j) * deg + k)
6274 += reference_quadrature.
weight (q_point) * tmp
6275 * lobatto_polynomials_grad[i].value
6276 (this->generalized_support_points[q_point
6282 * lobatto_polynomials[j + 2].value
6283 (this->generalized_support_points[q_point
6289 * lobatto_polynomials[k + 2].value
6290 (this->generalized_support_points[q_point
6298 solution.reinit (system_rhs.size ());
6299 system_matrix_inv.
vmult (solution, system_rhs);
6305 for (
unsigned int i = 0; i <= deg; ++i)
6306 for (
unsigned int j = 0; j < deg; ++j)
6307 for (
unsigned int k = 0; k < deg; ++k)
6308 if (std::abs (solution ((i * deg + j) * deg + k)) > 1e-14)
6313 = solution ((i * deg + j) * deg + k);
6318 for (
unsigned int q_point = 0; q_point < n_interior_points;
6327 for (
unsigned int i = 0; i <= deg; ++i)
6328 for (
unsigned int j = 0; j < 2; ++j)
6330 for (
unsigned int k = 0; k < 2; ++k)
6331 tmp -= local_dofs[i + (4 * j + k) * this->degree]
6332 * this->shape_value_component
6333 (i + (4 * j + k) * this->degree,
6334 this->generalized_support_points[q_point
6341 for (
unsigned int k = 0; k < deg; ++k)
6342 tmp -= local_dofs[(i + 2 * j * this->degree
6346 * this->shape_value_component
6347 ((i + 2 * j * this->degree
6351 this->generalized_support_points[q_point
6357 + local_dofs[i + ((2 * j + 9) * deg + k
6360 * this->shape_value_component
6361 (i + ((2 * j + 9) * deg + k
6364 this->generalized_support_points[q_point
6372 for (
unsigned int i = 0; i <= deg; ++i)
6373 for (
unsigned int j = 0; j < deg; ++j)
6374 for (
unsigned int k = 0; k < deg; ++k)
6375 system_rhs ((i * deg + j) * deg + k)
6376 += reference_quadrature.
weight (q_point) * tmp
6377 * lobatto_polynomials_grad[i].value
6378 (this->generalized_support_points[q_point
6384 * lobatto_polynomials[j + 2].value
6385 (this->generalized_support_points[q_point
6391 * lobatto_polynomials[k + 2].value
6392 (this->generalized_support_points[q_point
6400 system_matrix_inv.
vmult (solution, system_rhs);
6406 for (
unsigned int i = 0; i <= deg; ++i)
6407 for (
unsigned int j = 0; j < deg; ++j)
6408 for (
unsigned int k = 0; k < deg; ++k)
6409 if (std::abs (solution ((i * deg + j) * deg + k)) > 1e-14)
6410 local_dofs[((i + this->degree + 2
6415 = solution ((i * deg + j) * deg + k);
6420 for (
unsigned int q_point = 0; q_point < n_interior_points;
6429 for (
unsigned int i = 0; i <= deg; ++i)
6430 for (
unsigned int j = 0; j < 4; ++j)
6432 tmp -= local_dofs[i + (j + 8) * this->degree]
6433 * this->shape_value_component
6434 (i + (j + 8) * this->degree,
6435 this->generalized_support_points[q_point
6442 for (
unsigned int k = 0; k < deg; ++k)
6443 tmp -= local_dofs[i + ((2 * j + 1) * deg + k
6446 * this->shape_value_component
6447 (i + ((2 * j + 1) * deg + k
6450 this->generalized_support_points[q_point
6458 for (
unsigned int i = 0; i <= deg; ++i)
6459 for (
unsigned int j = 0; j < deg; ++j)
6460 for (
unsigned int k = 0; k < deg; ++k)
6461 system_rhs ((i * deg + j) * deg + k)
6462 += reference_quadrature.
weight (q_point) * tmp
6463 * lobatto_polynomials_grad[i].value
6464 (this->generalized_support_points[q_point
6470 * lobatto_polynomials[j + 2].value
6471 (this->generalized_support_points[q_point
6477 * lobatto_polynomials[k + 2].value
6478 (this->generalized_support_points[q_point
6486 system_matrix_inv.
vmult (solution, system_rhs);
6492 for (
unsigned int i = 0; i <= deg; ++i)
6493 for (
unsigned int j = 0; j < deg; ++j)
6494 for (
unsigned int k = 0; k < deg; ++k)
6495 if (std::abs (solution ((i * deg + j) * deg + k)) > 1e-14)
6496 local_dofs[i + ((j + 2 * (deg
6501 = solution ((i * deg + j) * deg + k);
6515 std::pair<Table<2,bool>, std::vector<unsigned int> >
6519 for (
unsigned int d=0; d<dim; ++d)
6520 for (
unsigned int i=0; i<this->dofs_per_cell; ++i)
6521 constant_modes(d,i) =
true;
6522 std::vector<unsigned int> components;
6523 for (
unsigned int d=0; d<dim; ++d)
6524 components.push_back(d);
6525 return std::pair<Table<2,bool>, std::vector<unsigned int> >
6526 (constant_modes, components);
6543 #include "fe_nedelec.inst" 6546 DEAL_II_NAMESPACE_CLOSE
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
void vmult(Vector< number2 > &w, const Vector< number2 > &v, const bool adding=false) const
FullMatrix< double > interface_constraints
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
virtual FiniteElementDomination::Domination compare_for_face_domination(const FiniteElement< dim > &fe_other) const
static std::vector< Polynomial< double > > generate_complete_basis(const unsigned int p)
const std::vector< Point< dim > > & get_points() const
static std::vector< Polynomial< double > > generate_complete_basis(const unsigned int degree)
virtual std::size_t memory_consumption() const
const unsigned int degree
const Point< dim > & point(const unsigned int i) const
virtual void get_subface_interpolation_matrix(const FiniteElement< dim > &source, const unsigned int subface, FullMatrix< double > &matrix) const
#define AssertThrow(cond, exc)
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim > &fe_other) const
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree, bool dg=false)
void initialize_support_points(const unsigned int order)
static ::ExceptionBase & ExcMessage(std::string arg1)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
virtual std::string get_name() const
std::vector< std::vector< FullMatrix< double > > > prolongation
void invert(const FullMatrix< number2 > &M)
void reinit(const TableIndices< N > &new_size, const bool omit_default_initialization=false)
#define Assert(cond, exc)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
virtual std::string get_name() const =0
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim > &fe_other) const
static unsigned int compute_n_pols(unsigned int degree)
virtual void interpolate(std::vector< double > &local_dofs, const std::vector< double > &values) const 1
unsigned int size() const
const unsigned int dofs_per_cell
void mmult(FullMatrix< number2 > &C, const FullMatrix< number2 > &B, const bool adding=false) const
static Quadrature< dim > project_to_all_faces(const SubQuadrature &quadrature)
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim > &fe_other) const
virtual void reinit(const size_type N, const bool omit_zeroing_entries=false)
const unsigned int dofs_per_face
virtual FiniteElement< dim > * clone() const
void reinit_restriction_and_prolongation_matrices(const bool isotropic_restriction_only=false, const bool isotropic_prolongation_only=false)
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const
static ::ExceptionBase & ExcNotImplemented()
virtual bool hp_constraints_are_implemented() const
void initialize_restriction()
unsigned int n_components(const DoFHandler< dim, spacedim > &dh)
FullMatrix< double > inverse_node_matrix
virtual void convert_generalized_support_point_values_to_nodal_values(const std::vector< Vector< double > > &support_point_values, std::vector< double > &nodal_values) const
void fill(const FullMatrix< number2 > &src, const size_type dst_offset_i=0, const size_type dst_offset_j=0, const size_type src_offset_i=0, const size_type src_offset_j=0)
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const
virtual void get_face_interpolation_matrix(const FiniteElement< dim > &source, FullMatrix< double > &matrix) const
void mTmult(FullMatrix< number2 > &C, const FullMatrix< number2 > &B, const bool adding=false) const
double weight(const unsigned int i) const