17 #include <deal.II/base/std_cxx14/memory.h> 19 #include <deal.II/fe/fe_dgq.h> 20 #include <deal.II/fe/fe_nothing.h> 21 #include <deal.II/fe/fe_q_hierarchical.h> 31 DEAL_II_NAMESPACE_OPEN
42 inline std::vector<unsigned int>
43 invert_numbering(
const std::vector<unsigned int> &in)
45 std::vector<unsigned int> out(in.size());
46 for (
unsigned int i = 0; i < in.size(); ++i)
63 Polynomials::Hierarchical::generate_complete_basis(degree),
73 std::vector<bool>(1, true)))
74 , face_renumber(face_fe_q_hierarchical_to_hierarchic_numbering(degree))
93 std::vector<FullMatrix<double>> dofs_cell(
97 std::vector<FullMatrix<double>> dofs_subcell(
130 std::ostringstream namebuf;
131 namebuf <<
"FE_Q_Hierarchical<" << dim <<
">(" << this->degree <<
")";
133 return namebuf.str();
139 std::unique_ptr<FiniteElement<dim, dim>>
142 return std_cxx14::make_unique<FE_Q_Hierarchical<dim>>(*this);
159 Assert(matrix.m() == this->dofs_per_cell,
173 if (this->dofs_per_cell >= source_fe->dofs_per_cell)
175 const std::vector<unsigned int> dof_map =
176 this->get_embedding_dofs(source_fe->degree);
177 for (
unsigned int j = 0; j < dof_map.size(); j++)
178 matrix[dof_map[j]][j] = 1.;
183 const std::vector<unsigned int> dof_map =
184 source_fe->get_embedding_dofs(this->degree);
185 for (
unsigned int j = 0; j < dof_map.size(); j++)
186 matrix[j][dof_map[j]] = 1.;
194 "Interpolation is supported only between FE_Q_Hierarchical"));
201 const unsigned int child,
207 "Prolongation matrices are only available for isotropic refinement!"));
214 return this->prolongation[refinement_case - 1][child];
227 std::vector<std::pair<unsigned int, unsigned int>>
241 return std::vector<std::pair<unsigned int, unsigned int>>(
242 1, std::make_pair(0U, 0U));
250 return std::vector<std::pair<unsigned int, unsigned int>>();
255 return std::vector<std::pair<unsigned int, unsigned int>>();
260 std::vector<std::pair<unsigned int, unsigned int>>
270 const unsigned int this_dpl = this->dofs_per_line;
276 std::vector<std::pair<unsigned int, unsigned int>> res;
277 for (
unsigned int i = 0; i < std::min(this_dpl, other_dpl); i++)
278 res.emplace_back(i, i);
288 return std::vector<std::pair<unsigned int, unsigned int>>();
293 return std::vector<std::pair<unsigned int, unsigned int>>();
298 std::vector<std::pair<unsigned int, unsigned int>>
308 const unsigned int this_dpq = this->dofs_per_quad;
314 std::vector<std::pair<unsigned int, unsigned int>> res;
315 for (
unsigned int i = 0; i < std::min(this_dpq, other_dpq); i++)
316 res.emplace_back(i, i);
326 return std::vector<std::pair<unsigned int, unsigned int>>();
331 return std::vector<std::pair<unsigned int, unsigned int>>();
339 const unsigned int codim)
const 347 if (
dynamic_cast<const FE_DGQ<dim> *
>(&fe_other) !=
nullptr)
358 if (this->degree < fe_hierarchical_other->degree)
360 else if (this->degree == fe_hierarchical_other->degree)
368 if (fe_nothing->is_dominating())
393 const unsigned int dofs_1d = 2 * this->dofs_per_vertex + this->dofs_per_line;
442 for (
unsigned int c = 0; c < GeometryInfo<1>::max_children_per_cell; ++c)
443 for (
unsigned int j = 0; j < dofs_1d; ++j)
444 for (
unsigned int k = 0; k < dofs_1d; ++k)
447 if ((j <= 1) && (k <= 1))
449 if (((c == 0) && (j == 0) && (k == 0)) ||
450 ((c == 1) && (j == 1) && (k == 1)))
451 dofs_cell[c](j, k) = 1.;
453 dofs_cell[c](j, k) = 0.;
455 if (((c == 0) && (j == 1)) || ((c == 1) && (j == 0)))
456 dofs_subcell[c](j, k) = .5;
457 else if (((c == 0) && (k == 0)) || ((c == 1) && (k == 1)))
458 dofs_subcell[c](j, k) = 1.;
460 dofs_subcell[c](j, k) = 0.;
463 else if ((j <= 1) && (k >= 2))
465 if (((c == 0) && (j == 1) && ((k % 2) == 0)) ||
466 ((c == 1) && (j == 0) && ((k % 2) == 0)))
467 dofs_subcell[c](j, k) = -1.;
470 else if ((j >= 2) && (k >= 2) && (j <= k))
473 for (
unsigned int i = 1; i <= j; ++i)
475 (static_cast<double>(k - i + 1)) / (static_cast<double>(i));
479 dofs_subcell[c](j, k) =
481 std::pow(.5, static_cast<double>(k)) * factor :
482 -std::pow(.5, static_cast<double>(k)) * factor;
484 std::pow(2., static_cast<double>(j)) * factor;
488 dofs_subcell[c](j, k) =
489 std::pow(.5, static_cast<double>(k)) * factor;
492 std::pow(2., static_cast<double>(j)) * factor :
493 -std::pow(2., static_cast<double>(j)) * factor;
506 const unsigned int dofs_1d = 2 * this->dofs_per_vertex + this->dofs_per_line;
508 this->interface_constraints.TableBase<2, double>::reinit(
509 this->interface_constraints_size());
522 for (
unsigned int i = 0; i < dofs_1d; ++i)
523 this->interface_constraints(0, i) = dofs_subcell[0](1, i);
525 for (
unsigned int c = 0; c < GeometryInfo<1>::max_children_per_cell;
527 for (
unsigned int i = 0; i < dofs_1d; ++i)
528 for (
unsigned int j = 2; j < dofs_1d; ++j)
529 this->interface_constraints(1 + c * (this->degree - 1) + j - 2,
530 i) = dofs_subcell[c](j, i);
536 for (
unsigned int i = 0; i < dofs_1d * dofs_1d; i++)
539 this->interface_constraints(0, face_renumber[i]) =
540 dofs_subcell[0](1, i % dofs_1d) *
541 dofs_subcell[0](1, (i - (i % dofs_1d)) / dofs_1d);
544 this->interface_constraints(1, face_renumber[i]) =
545 dofs_subcell[0](0, i % dofs_1d) *
546 dofs_subcell[0](1, (i - (i % dofs_1d)) / dofs_1d);
547 this->interface_constraints(2, face_renumber[i]) =
548 dofs_subcell[1](1, i % dofs_1d) *
549 dofs_subcell[0](1, (i - (i % dofs_1d)) / dofs_1d);
550 this->interface_constraints(3, face_renumber[i]) =
551 dofs_subcell[0](1, i % dofs_1d) *
552 dofs_subcell[0](0, (i - (i % dofs_1d)) / dofs_1d);
553 this->interface_constraints(4, face_renumber[i]) =
554 dofs_subcell[1](0, i % dofs_1d) *
555 dofs_subcell[1](1, (i - (i % dofs_1d)) / dofs_1d);
558 for (
unsigned int j = 0; j < (this->degree - 1); j++)
560 this->interface_constraints(5 + j, face_renumber[i]) =
561 dofs_subcell[0](1, i % dofs_1d) *
562 dofs_subcell[0](2 + j, (i - (i % dofs_1d)) / dofs_1d);
563 this->interface_constraints(5 + (this->degree - 1) + j,
565 dofs_subcell[0](1, i % dofs_1d) *
566 dofs_subcell[1](2 + j, (i - (i % dofs_1d)) / dofs_1d);
567 this->interface_constraints(5 + 2 * (this->degree - 1) + j,
569 dofs_subcell[0](2 + j, i % dofs_1d) *
570 dofs_subcell[1](0, (i - (i % dofs_1d)) / dofs_1d);
571 this->interface_constraints(5 + 3 * (this->degree - 1) + j,
573 dofs_subcell[1](2 + j, i % dofs_1d) *
574 dofs_subcell[0](1, (i - (i % dofs_1d)) / dofs_1d);
578 for (
unsigned int j = 0; j < (this->degree - 1); j++)
581 this->interface_constraints(5 + 4 * (this->degree - 1) + j,
583 dofs_subcell[0](0, i % dofs_1d) *
584 dofs_subcell[0](2 + j, (i - (i % dofs_1d)) / dofs_1d);
585 this->interface_constraints(5 + 4 * (this->degree - 1) +
586 (this->degree - 1) + j,
588 dofs_subcell[0](0, i % dofs_1d) *
589 dofs_subcell[1](2 + j, (i - (i % dofs_1d)) / dofs_1d);
591 this->interface_constraints(5 + 4 * (this->degree - 1) +
592 2 * (this->degree - 1) + j,
594 dofs_subcell[1](1, i % dofs_1d) *
595 dofs_subcell[0](2 + j, (i - (i % dofs_1d)) / dofs_1d);
596 this->interface_constraints(5 + 4 * (this->degree - 1) +
597 3 * (this->degree - 1) + j,
599 dofs_subcell[1](1, i % dofs_1d) *
600 dofs_subcell[1](2 + j, (i - (i % dofs_1d)) / dofs_1d);
602 this->interface_constraints(5 + 4 * (this->degree - 1) +
603 4 * (this->degree - 1) + j,
605 dofs_subcell[0](2 + j, i % dofs_1d) *
606 dofs_subcell[0](0, (i - (i % dofs_1d)) / dofs_1d);
607 this->interface_constraints(5 + 4 * (this->degree - 1) +
608 5 * (this->degree - 1) + j,
610 dofs_subcell[1](2 + j, i % dofs_1d) *
611 dofs_subcell[0](0, (i - (i % dofs_1d)) / dofs_1d);
613 this->interface_constraints(5 + 4 * (this->degree - 1) +
614 6 * (this->degree - 1) + j,
616 dofs_subcell[0](2 + j, i % dofs_1d) *
617 dofs_subcell[1](1, (i - (i % dofs_1d)) / dofs_1d);
618 this->interface_constraints(5 + 4 * (this->degree - 1) +
619 7 * (this->degree - 1) + j,
621 dofs_subcell[1](2 + j, i % dofs_1d) *
622 dofs_subcell[1](1, (i - (i % dofs_1d)) / dofs_1d);
626 for (
unsigned int j = 0; j < (this->degree - 1); j++)
627 for (
unsigned int k = 0; k < (this->degree - 1); k++)
630 this->interface_constraints(5 + 12 * (this->degree - 1) +
631 j + k * (this->degree - 1),
633 dofs_subcell[0](2 + j, i % dofs_1d) *
634 dofs_subcell[0](2 + k, (i - (i % dofs_1d)) / dofs_1d);
636 this->interface_constraints(5 + 12 * (this->degree - 1) +
637 j + k * (this->degree - 1) +
641 dofs_subcell[1](2 + j, i % dofs_1d) *
642 dofs_subcell[0](2 + k, (i - (i % dofs_1d)) / dofs_1d);
644 this->interface_constraints(5 + 12 * (this->degree - 1) +
645 j + k * (this->degree - 1) +
646 2 * (this->degree - 1) *
649 dofs_subcell[0](2 + j, i % dofs_1d) *
650 dofs_subcell[1](2 + k, (i - (i % dofs_1d)) / dofs_1d);
652 this->interface_constraints(5 + 12 * (this->degree - 1) +
653 j + k * (this->degree - 1) +
654 3 * (this->degree - 1) *
657 dofs_subcell[1](2 + j, i % dofs_1d) *
658 dofs_subcell[1](2 + k, (i - (i % dofs_1d)) / dofs_1d);
679 const unsigned int dofs_1d = 2 * this->dofs_per_vertex + this->dofs_per_line;
680 const std::vector<unsigned int> &renumber = this->poly_space.get_numbering();
682 for (
unsigned int c = 0; c < GeometryInfo<dim>::max_children_per_cell; ++c)
684 this->prolongation[iso][c].reinit(this->dofs_per_cell,
685 this->dofs_per_cell);
686 this->restriction[iso][c].reinit(this->dofs_per_cell,
687 this->dofs_per_cell);
694 for (
unsigned int c = 0; c < GeometryInfo<dim>::max_children_per_cell;
697 this->prolongation[iso][c].fill(dofs_subcell[c]);
698 this->restriction[iso][c].fill(dofs_cell[c]);
713 for (
unsigned int j = 0; j < this->dofs_per_cell; ++j)
714 for (
unsigned int i = 0; i < this->dofs_per_cell; ++i)
719 for (
unsigned int c = 0;
720 c < GeometryInfo<2>::max_children_per_cell;
724 const unsigned int c0 = c % 2;
726 const unsigned int c1 = c / 2;
728 this->prolongation[iso][c](j, i) =
729 dofs_subcell[c0](renumber[j] % dofs_1d,
730 renumber[i] % dofs_1d) *
731 dofs_subcell[c1]((renumber[j] - (renumber[j] % dofs_1d)) /
733 (renumber[i] - (renumber[i] % dofs_1d)) /
736 this->restriction[iso][c](j, i) =
737 dofs_cell[c0](renumber[j] % dofs_1d,
738 renumber[i] % dofs_1d) *
739 dofs_cell[c1]((renumber[j] - (renumber[j] % dofs_1d)) /
741 (renumber[i] - (renumber[i] % dofs_1d)) /
749 for (
unsigned int c = 0;
750 c < GeometryInfo<3>::max_children_per_cell;
754 const unsigned int c0 = c % 2;
756 const unsigned int c1 = (c % 4) / 2;
758 const unsigned int c2 = c / 4;
760 this->prolongation[iso][c](j, i) =
761 dofs_subcell[c0](renumber[j] % dofs_1d,
762 renumber[i] % dofs_1d) *
764 ((renumber[j] - (renumber[j] % dofs_1d)) / dofs_1d) %
766 ((renumber[i] - (renumber[i] % dofs_1d)) / dofs_1d) %
769 ((renumber[j] - (renumber[j] % dofs_1d)) / dofs_1d -
770 (((renumber[j] - (renumber[j] % dofs_1d)) / dofs_1d) %
773 ((renumber[i] - (renumber[i] % dofs_1d)) / dofs_1d -
774 (((renumber[i] - (renumber[i] % dofs_1d)) / dofs_1d) %
778 this->restriction[iso][c](j, i) =
779 dofs_cell[c0](renumber[j] % dofs_1d,
780 renumber[i] % dofs_1d) *
782 ((renumber[j] - (renumber[j] % dofs_1d)) / dofs_1d) %
784 ((renumber[i] - (renumber[i] % dofs_1d)) / dofs_1d) %
787 ((renumber[j] - (renumber[j] % dofs_1d)) / dofs_1d -
788 (((renumber[j] - (renumber[j] % dofs_1d)) / dofs_1d) %
791 ((renumber[i] - (renumber[i] % dofs_1d)) / dofs_1d -
792 (((renumber[i] - (renumber[i] % dofs_1d)) / dofs_1d) %
811 unsigned int n = this->degree + 1;
812 for (
unsigned int i = 1; i < dim; ++i)
813 n *= this->degree + 1;
815 this->generalized_support_points.resize(n);
817 const std::vector<unsigned int> &index_map_inverse =
818 this->poly_space.get_numbering_inverse();
849 for (
unsigned int iz = 0; iz <= ((dim > 2) ? this->degree : 0); ++iz)
850 for (
unsigned int iy = 0; iy <= ((dim > 1) ? this->degree : 0); ++iy)
851 for (
unsigned int ix = 0; ix <= this->degree; ++ix)
877 this->generalized_support_points[index_map_inverse[k++]] = p;
924 (dynamic_cast<const FEQHierarchical *>(&x_source_fe) !=
928 Assert(interpolation_matrix.
n() == this->dofs_per_face,
953 interpolation_matrix = 0;
965 for (
unsigned int i = 0; i < this->dofs_per_face; ++i)
966 interpolation_matrix(i, i) = 1;
973 for (
unsigned int i = 0; i < GeometryInfo<3>::vertices_per_face; ++i)
974 interpolation_matrix(i, i) = 1;
976 for (
unsigned int i = 0; i < this->degree - 1; ++i)
978 for (
unsigned int j = 0; j < GeometryInfo<3>::lines_per_face; ++j)
979 interpolation_matrix(i + j * (x_source_fe.
degree - 1) +
981 i + j * (this->degree - 1) +
984 for (
unsigned int j = 0; j < this->degree - 1; ++j)
986 (x_source_fe.
degree - 1) +
1003 const unsigned int subface,
1011 (dynamic_cast<const FEQHierarchical *>(&x_source_fe) !=
1015 Assert(interpolation_matrix.
n() == this->dofs_per_face,
1048 interpolation_matrix(0, 0) = 1.0;
1049 interpolation_matrix(1, 0) = 0.5;
1050 interpolation_matrix(1, 1) = 0.5;
1052 for (
unsigned int dof = 2; dof < this->dofs_per_face;)
1054 interpolation_matrix(1, dof) = -1.0;
1058 int factorial_i = 1;
1060 for (
unsigned int i = 2; i < this->dofs_per_face; ++i)
1062 interpolation_matrix(i, i) = std::pow(0.5, i);
1064 int factorial_j = factorial_i;
1065 int factorial_ij = 1;
1067 for (
unsigned int j = i + 1; j < this->dofs_per_face; ++j)
1069 factorial_ij *= j - i;
1073 interpolation_matrix(i, j) =
1074 -1.0 * std::pow(0.5, j) * factorial_j /
1075 (factorial_i * factorial_ij);
1078 interpolation_matrix(i, j) =
1079 std::pow(0.5, j) * factorial_j /
1080 (factorial_i * factorial_ij);
1089 interpolation_matrix(0, 0) = 0.5;
1090 interpolation_matrix(0, 1) = 0.5;
1092 for (
unsigned int dof = 2; dof < this->dofs_per_face;)
1094 interpolation_matrix(0, dof) = -1.0;
1098 interpolation_matrix(1, 1) = 1.0;
1100 int factorial_i = 1;
1102 for (
unsigned int i = 2; i < this->dofs_per_face; ++i)
1104 interpolation_matrix(i, i) = std::pow(0.5, i);
1106 int factorial_j = factorial_i;
1107 int factorial_ij = 1;
1109 for (
unsigned int j = i + 1; j < this->dofs_per_face; ++j)
1111 factorial_ij *= j - i;
1113 interpolation_matrix(i, j) =
1114 std::pow(0.5, j) * factorial_j /
1115 (factorial_i * factorial_ij);
1130 interpolation_matrix(0, 0) = 1.0;
1131 interpolation_matrix(1, 0) = 0.5;
1132 interpolation_matrix(1, 1) = 0.5;
1133 interpolation_matrix(2, 0) = 0.5;
1134 interpolation_matrix(2, 2) = 0.5;
1136 for (
unsigned int i = 0; i < this->degree - 1;)
1138 for (
unsigned int line = 0;
1139 line < GeometryInfo<3>::lines_per_face;
1141 interpolation_matrix(3,
1142 i + line * (this->degree - 1) +
1145 for (
unsigned int j = 0; j < this->degree - 1;)
1147 interpolation_matrix(3,
1148 i + (j + 4) * this->degree - j) =
1153 interpolation_matrix(1, i + 2 * (this->degree + 1)) =
1155 interpolation_matrix(2, i + 4) = -1.0;
1159 for (
unsigned int vertex = 0;
1160 vertex < GeometryInfo<3>::vertices_per_face;
1162 interpolation_matrix(3, vertex) = 0.25;
1164 int factorial_i = 1;
1166 for (
unsigned int i = 2; i <= this->degree; ++i)
1168 double tmp = std::pow(0.5, i);
1169 interpolation_matrix(i + 2, i + 2) = tmp;
1170 interpolation_matrix(i + 2 * source_fe.
degree,
1171 i + 2 * this->degree) = tmp;
1173 interpolation_matrix(i + source_fe.
degree + 1, i + 2) =
1175 interpolation_matrix(i + source_fe.
degree + 1,
1176 i + this->degree + 1) = tmp;
1177 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1178 i + 2 * this->degree) = tmp;
1179 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1180 i + 3 * this->degree - 1) = tmp;
1183 for (
unsigned int j = 0; j < this->degree - 1;)
1185 interpolation_matrix(i + source_fe.
degree + 1,
1186 (i + 2) * this->degree + j + 2 -
1188 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1189 i + (j + 4) * this->degree - j -
1194 int factorial_k = 1;
1196 for (
unsigned int j = 2; j <= this->degree; ++j)
1198 interpolation_matrix(i + (j + 2) * source_fe.
degree -
1200 i + (j + 2) * this->degree - j) =
1201 std::pow(0.5, i + j);
1203 int factorial_kl = 1;
1204 int factorial_l = factorial_k;
1206 for (
unsigned int k = j + 1; k < this->degree; ++k)
1208 factorial_kl *= k - j;
1212 interpolation_matrix(
1213 i + (j + 2) * source_fe.
degree - j,
1214 i + (k + 2) * this->degree - k) =
1215 -1.0 * std::pow(0.5, i + k) * factorial_l /
1216 (factorial_k * factorial_kl);
1219 interpolation_matrix(
1220 i + (j + 2) * source_fe.
degree - j,
1221 i + (k + 2) * this->degree - k) =
1222 std::pow(0.5, i + k) * factorial_l /
1223 (factorial_k * factorial_kl);
1228 int factorial_j = factorial_i;
1229 int factorial_ij = 1;
1231 for (
unsigned int j = i + 1; j <= this->degree; ++j)
1233 factorial_ij *= j - i;
1238 tmp = -1.0 * std::pow(0.5, j) * factorial_j /
1239 (factorial_i * factorial_ij);
1240 interpolation_matrix(i + 2, j + 2) = tmp;
1241 interpolation_matrix(i + 2 * source_fe.
degree,
1242 j + 2 * this->degree) = tmp;
1245 for (
unsigned int k = 2; k <= this->degree; ++k)
1247 interpolation_matrix(
1248 i + (k + 2) * source_fe.
degree - k,
1249 j + (k + 2) * this->degree - k) =
1250 tmp * std::pow(0.5, k);
1252 int factorial_l = factorial_k;
1253 int factorial_kl = 1;
1255 for (
unsigned int l = k + 1;
1259 factorial_kl *= l - k;
1263 interpolation_matrix(
1264 i + (k + 2) * source_fe.
degree - k,
1265 j + (l + 2) * this->degree - l) =
1266 -1.0 * tmp * std::pow(0.5, l) *
1268 (factorial_k * factorial_kl);
1271 interpolation_matrix(
1272 i + (k + 2) * source_fe.
degree - k,
1273 j + (l + 2) * this->degree - l) =
1274 tmp * std::pow(0.5, l) * factorial_l /
1275 (factorial_k * factorial_kl);
1280 interpolation_matrix(i + source_fe.
degree + 1,
1282 interpolation_matrix(i + source_fe.
degree + 1,
1283 j + this->degree + 1) = tmp;
1284 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1285 j + 2 * this->degree) = tmp;
1286 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1287 j + 3 * this->degree - 1) =
1291 for (
unsigned int k = 0; k < this->degree - 1;)
1293 interpolation_matrix(i + source_fe.
degree + 1,
1294 (j + 2) * this->degree +
1296 interpolation_matrix(
1297 i + 3 * source_fe.
degree - 1,
1298 j + (k + 4) * this->degree - k - 2) = tmp;
1304 tmp = std::pow(0.5, j) * factorial_j /
1305 (factorial_i * factorial_ij);
1306 interpolation_matrix(i + 2, j + 2) = tmp;
1307 interpolation_matrix(i + 2 * source_fe.
degree,
1308 j + 2 * this->degree) = tmp;
1311 for (
unsigned int k = 2; k <= this->degree; ++k)
1313 interpolation_matrix(
1314 i + (k + 2) * source_fe.
degree - k,
1315 j + (k + 2) * this->degree - k) =
1316 tmp * std::pow(0.5, k);
1318 int factorial_l = factorial_k;
1319 int factorial_kl = 1;
1321 for (
unsigned int l = k + 1;
1325 factorial_kl *= l - k;
1329 interpolation_matrix(
1330 i + (k + 2) * source_fe.
degree - k,
1331 j + (l + 2) * this->degree - l) =
1332 -1.0 * tmp * std::pow(0.5, l) *
1334 (factorial_k * factorial_kl);
1337 interpolation_matrix(
1338 i + (k + 2) * source_fe.
degree - k,
1339 j + (l + 2) * this->degree - l) =
1340 tmp * std::pow(0.5, l) * factorial_l /
1341 (factorial_k * factorial_kl);
1346 interpolation_matrix(i + source_fe.
degree + 1,
1348 interpolation_matrix(i + source_fe.
degree + 1,
1349 j + this->degree + 1) = tmp;
1350 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1351 j + 2 * this->degree) = tmp;
1352 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1353 j + 3 * this->degree - 1) =
1357 for (
unsigned int k = 0; k < this->degree - 1;)
1359 interpolation_matrix(i + source_fe.
degree + 1,
1360 (j + 2) * this->degree +
1362 interpolation_matrix(
1363 i + 3 * source_fe.
degree - 1,
1364 j + (k + 4) * this->degree - k - 2) = tmp;
1376 interpolation_matrix(0, 0) = 0.5;
1377 interpolation_matrix(0, 1) = 0.5;
1378 interpolation_matrix(1, 1) = 1.0;
1379 interpolation_matrix(3, 1) = 0.5;
1380 interpolation_matrix(3, 3) = 0.5;
1382 for (
unsigned int i = 0; i < this->degree - 1;)
1384 for (
unsigned int line = 0;
1385 line < GeometryInfo<3>::lines_per_face;
1387 interpolation_matrix(2,
1388 i + line * (this->degree - 1) +
1391 for (
unsigned int j = 0; j < this->degree - 1;)
1393 interpolation_matrix(2,
1394 i + (j + 4) * this->degree - j) =
1399 interpolation_matrix(0, i + 2 * (this->degree + 1)) =
1401 interpolation_matrix(3, i + this->degree + 3) = -1.0;
1405 for (
unsigned int vertex = 0;
1406 vertex < GeometryInfo<3>::vertices_per_face;
1408 interpolation_matrix(2, vertex) = 0.25;
1410 int factorial_i = 1;
1412 for (
unsigned int i = 2; i <= this->degree; ++i)
1414 double tmp = std::pow(0.5, i + 1);
1415 interpolation_matrix(i + 2, i + 2) = tmp;
1416 interpolation_matrix(i + 2, i + this->degree + 1) = tmp;
1417 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1418 i + 2 * this->degree) = tmp;
1419 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1420 i + 3 * this->degree - 1) = tmp;
1423 for (
unsigned int j = 0; j < this->degree - 1;)
1425 interpolation_matrix(i + 2,
1426 j + (i + 2) * this->degree + 2 -
1428 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1429 i + (j + 4) * this->degree - j -
1435 interpolation_matrix(i + source_fe.
degree + 1,
1436 i + this->degree + 1) = tmp;
1437 interpolation_matrix(i + 2 * source_fe.
degree,
1438 i + 2 * this->degree) = tmp;
1440 int factorial_j = factorial_i;
1441 int factorial_ij = 1;
1443 for (
unsigned int j = i + 1; j <= this->degree; ++j)
1445 factorial_ij *= j - i;
1447 tmp = std::pow(0.5, j) * factorial_j /
1448 (factorial_i * factorial_ij);
1449 interpolation_matrix(i + 2 * source_fe.
degree,
1450 j + 2 * this->degree) = tmp;
1451 int factorial_k = 1;
1453 for (
unsigned int k = 2; k <= this->degree; ++k)
1455 interpolation_matrix(
1456 i + (k + 2) * source_fe.
degree - k,
1457 j + (k + 2) * this->degree - k) =
1458 tmp * std::pow(0.5, k);
1460 int factorial_l = factorial_k;
1461 int factorial_kl = 1;
1463 for (
unsigned int l = k + 1; l <= this->degree;
1466 factorial_kl *= l - k;
1470 interpolation_matrix(
1471 i + (k + 2) * source_fe.
degree - k,
1472 j + (l + 2) * this->degree - l) =
1473 -1.0 * tmp * std::pow(0.5, l) *
1475 (factorial_k * factorial_kl);
1478 interpolation_matrix(
1479 i + (k + 2) * source_fe.
degree - k,
1480 j + (l + 2) * this->degree - l) =
1481 tmp * std::pow(0.5, l) * factorial_l /
1482 (factorial_k * factorial_kl);
1488 for (
unsigned int k = 0; k < this->degree - 1;)
1490 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1491 j + (k + 4) * this->degree -
1497 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1498 j + 2 * this->degree) = tmp;
1499 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1500 j + 3 * this->degree - 1) = tmp;
1505 interpolation_matrix(i + 2, j + 2) = tmp;
1506 interpolation_matrix(i + 2, j + this->degree + 1) =
1508 interpolation_matrix(i + source_fe.
degree + 1,
1509 j + this->degree + 1) =
1513 for (
unsigned int k = 0; k < this->degree - 1;)
1515 interpolation_matrix(i + 2,
1516 k + (j + 2) * this->degree +
1522 int factorial_k = 1;
1524 for (
unsigned int j = 2; j <= this->degree; ++j)
1526 interpolation_matrix(i + (j + 2) * source_fe.
degree -
1528 i + (j + 2) * this->degree - j) =
1529 std::pow(0.5, i + j);
1531 int factorial_l = factorial_k;
1532 int factorial_kl = 1;
1534 for (
unsigned int k = j + 1; k <= this->degree; ++k)
1536 factorial_kl *= k - j;
1540 interpolation_matrix(
1541 i + (j + 2) * source_fe.
degree - j,
1542 i + (k + 2) * this->degree - k) =
1543 -1.0 * std::pow(0.5, i + k) * factorial_l /
1544 (factorial_k * factorial_kl);
1547 interpolation_matrix(
1548 i + (j + 2) * source_fe.
degree - j,
1549 i + (k + 2) * this->degree - k) =
1550 std::pow(0.5, i + k) * factorial_l /
1551 (factorial_k * factorial_kl);
1561 interpolation_matrix(0, 0) = 0.5;
1562 interpolation_matrix(0, 2) = 0.5;
1563 interpolation_matrix(2, 2) = 1.0;
1564 interpolation_matrix(3, 2) = 0.5;
1565 interpolation_matrix(3, 3) = 0.5;
1567 for (
unsigned int i = 0; i < this->degree - 1;)
1569 for (
unsigned int line = 0;
1570 line < GeometryInfo<3>::lines_per_face;
1572 interpolation_matrix(1,
1573 i + line * (this->degree - 1) +
1576 for (
unsigned int j = 0; j < this->degree - 1;)
1578 interpolation_matrix(1,
1579 i + (j + 4) * this->degree - j) =
1584 interpolation_matrix(0, i + 4) = -1.0;
1585 interpolation_matrix(3, i + 3 * this->degree + 1) = -1.0;
1589 for (
unsigned int vertex = 0;
1590 vertex < GeometryInfo<3>::vertices_per_face;
1592 interpolation_matrix(1, vertex) = 0.25;
1594 int factorial_i = 1;
1596 for (
unsigned int i = 2; i <= this->degree; ++i)
1598 double tmp = std::pow(0.5, i);
1599 interpolation_matrix(i + 2, i + 2) = tmp;
1600 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1601 i + 3 * this->degree - 1) = tmp;
1603 interpolation_matrix(i + source_fe.
degree + 1, i + 2) =
1605 interpolation_matrix(i + source_fe.
degree + 1,
1606 i + this->degree + 1) = tmp;
1607 interpolation_matrix(i + 2 * source_fe.
degree,
1608 i + 2 * this->degree) = tmp;
1609 interpolation_matrix(i + 2 * source_fe.
degree,
1610 i + 3 * this->degree - 1) = tmp;
1613 for (
unsigned int j = 0; j < this->degree - 1;)
1615 interpolation_matrix(i + source_fe.
degree + 1,
1616 j + (i + 2) * this->degree + 2 -
1618 interpolation_matrix(i + 2 * source_fe.
degree,
1619 i + (j + 4) * this->degree - j -
1624 int factorial_k = 1;
1626 for (
unsigned int j = 2; j <= this->degree; ++j)
1628 interpolation_matrix(i + (j + 2) * source_fe.
degree -
1630 i + (j + 2) * this->degree - j) =
1631 std::pow(0.5, i + j);
1633 int factorial_kl = 1;
1634 int factorial_l = factorial_k;
1636 for (
unsigned int k = j + 1; k <= this->degree; ++k)
1638 factorial_kl *= k - j;
1640 interpolation_matrix(
1641 i + (j + 2) * source_fe.
degree - j,
1642 i + (k + 2) * this->degree - k) =
1643 std::pow(0.5, i + k) * factorial_l /
1644 (factorial_k * factorial_kl);
1649 int factorial_j = factorial_i;
1650 int factorial_ij = 1;
1652 for (
unsigned int j = i + 1; j <= this->degree; ++j)
1654 factorial_ij *= j - i;
1656 tmp = std::pow(0.5, j) * factorial_j /
1657 (factorial_i * factorial_ij);
1658 interpolation_matrix(i + 2, j + 2) = tmp;
1661 for (
unsigned int k = 0; k < this->degree - 1;)
1663 interpolation_matrix(i + source_fe.
degree + 1,
1664 k + (j + 2) * this->degree +
1670 interpolation_matrix(i + source_fe.
degree + 1,
1672 interpolation_matrix(i + source_fe.
degree + 1,
1673 j + this->degree + 1) = tmp;
1678 interpolation_matrix(i + 2 * source_fe.
degree,
1679 j + 2 * this->degree) = tmp;
1680 interpolation_matrix(i + 2 * source_fe.
degree,
1681 j + 3 * this->degree - 1) = tmp;
1683 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1684 j + 3 * this->degree - 1) = tmp;
1685 int factorial_k = 1;
1687 for (
unsigned int k = 2; k <= this->degree; ++k)
1689 interpolation_matrix(
1690 i + (k + 2) * source_fe.
degree - k,
1691 j + (k + 2) * this->degree - k) =
1692 tmp * std::pow(0.5, k);
1694 int factorial_l = factorial_k;
1695 int factorial_kl = 1;
1697 for (
unsigned int l = k + 1; l <= this->degree;
1700 factorial_kl *= l - k;
1702 interpolation_matrix(
1703 i + (k + 2) * source_fe.
degree - k,
1704 j + (l + 2) * this->degree - l) =
1705 tmp * std::pow(0.5, l) * factorial_l /
1706 (factorial_k * factorial_kl);
1712 for (
unsigned int k = 0; k < this->degree - 1;)
1714 interpolation_matrix(i + 2 * source_fe.
degree,
1715 j + (k + 4) * this->degree -
1727 for (
unsigned int vertex = 0;
1728 vertex < GeometryInfo<3>::vertices_per_face;
1730 interpolation_matrix(0, vertex) = 0.25;
1732 for (
unsigned int i = 0; i < this->degree - 1;)
1734 for (
unsigned int line = 0;
1735 line < GeometryInfo<3>::lines_per_face;
1737 interpolation_matrix(0,
1738 i + line * (this->degree - 1) +
1741 for (
unsigned int j = 0; j < this->degree - 1;)
1743 interpolation_matrix(0,
1744 i + (j + 4) * this->degree - j) =
1749 interpolation_matrix(1, i + 4) = -1.0;
1750 interpolation_matrix(2, i + 3 * this->degree + 1) = -1.0;
1754 interpolation_matrix(1, 0) = 0.5;
1755 interpolation_matrix(1, 1) = 0.5;
1756 interpolation_matrix(2, 2) = 0.5;
1757 interpolation_matrix(2, 3) = 0.5;
1758 interpolation_matrix(3, 3) = 1.0;
1760 int factorial_i = 1;
1762 for (
unsigned int i = 2; i <= this->degree; ++i)
1764 double tmp = std::pow(0.5, i + 1);
1765 interpolation_matrix(i + 2, i + 2) = tmp;
1766 interpolation_matrix(i + 2, i + this->degree + 1) = tmp;
1767 interpolation_matrix(i + 2 * source_fe.
degree,
1768 i + 2 * this->degree) = tmp;
1769 interpolation_matrix(i + 2 * source_fe.
degree,
1770 i + 3 * this->degree - 1) = tmp;
1773 for (
unsigned int j = 0; j < this->degree - 1;)
1775 interpolation_matrix(i + 2,
1776 j + (i + 2) * this->degree + 2 -
1778 interpolation_matrix(i + 2 * source_fe.
degree,
1779 i + (j + 4) * this->degree - 2) =
1785 interpolation_matrix(i + source_fe.
degree + 1,
1786 i + this->degree + 1) = tmp;
1787 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1788 i + 3 * this->degree - 1) = tmp;
1789 int factorial_k = 1;
1791 for (
unsigned int j = 2; j <= this->degree; ++j)
1793 interpolation_matrix(i + (j + 2) * source_fe.
degree -
1795 i + (j + 2) * this->degree - j) =
1796 std::pow(0.5, i + j);
1798 int factorial_l = factorial_k;
1799 int factorial_kl = 1;
1801 for (
unsigned int k = j + 1; k <= this->degree; ++k)
1803 factorial_kl *= k - j;
1805 interpolation_matrix(
1806 i + (j + 2) * source_fe.
degree - j,
1807 i + (k + 2) * this->degree - k) =
1808 std::pow(0.5, i + k) * factorial_l /
1809 (factorial_k * factorial_kl);
1814 int factorial_j = factorial_i;
1815 int factorial_ij = 1;
1817 for (
unsigned int j = i + 1; j <= this->degree; ++j)
1819 factorial_ij *= j - i;
1821 tmp = std::pow(0.5, j + 1) * factorial_j /
1822 (factorial_i * factorial_ij);
1823 interpolation_matrix(i + 2, j + 2) = tmp;
1824 interpolation_matrix(i + 2, j + this->degree + 1) =
1826 interpolation_matrix(i + 2 * source_fe.
degree,
1827 j + 2 * this->degree) = tmp;
1828 interpolation_matrix(i + 2 * source_fe.
degree,
1829 j + 3 * this->degree - 1) = tmp;
1831 interpolation_matrix(i + source_fe.
degree + 1,
1832 j + this->degree + 1) = tmp;
1833 interpolation_matrix(i + 3 * source_fe.
degree - 1,
1834 j + 3 * this->degree - 1) = tmp;
1835 int factorial_k = 1;
1837 for (
unsigned int k = 2; k <= this->degree; ++k)
1839 interpolation_matrix(
1840 i + (k + 2) * source_fe.
degree - k,
1841 j + (k + 2) * this->degree - k) =
1842 tmp * std::pow(0.5, k);
1844 int factorial_l = factorial_k;
1845 int factorial_kl = 1;
1847 for (
unsigned int l = k + 1; l <= this->degree;
1850 factorial_kl *= l - k;
1852 interpolation_matrix(
1853 i + (k + 2) * source_fe.
degree - k,
1854 j + (l + 2) * this->degree - l) =
1855 tmp * std::pow(0.5, l) * factorial_l /
1856 (factorial_k * factorial_kl);
1862 for (
unsigned int k = 0; k < this->degree - 1;)
1864 interpolation_matrix(i + 2,
1865 k + (j + 2) * this->degree +
1867 interpolation_matrix(i + 2 * source_fe.
degree,
1868 j + (k + 4) * this->degree -
1886 const unsigned int codim = dim - 1;
1889 unsigned int n = this->degree + 1;
1890 for (
unsigned int i = 1; i < codim; ++i)
1891 n *= this->degree + 1;
1893 this->generalized_face_support_points.resize(n);
1898 for (
unsigned int iz = 0; iz <= ((codim > 2) ? this->degree : 0); ++iz)
1899 for (
unsigned int iy = 0; iy <= ((codim > 1) ? this->degree : 0); ++iy)
1900 for (
unsigned int ix = 0; ix <= this->degree; ++ix)
1926 this->generalized_face_support_points[face_renumber[k++]] = p;
1933 std::vector<unsigned int>
1936 std::vector<unsigned int> dpo(dim + 1, 1U);
1937 for (
unsigned int i = 1; i < dpo.size(); ++i)
1938 dpo[i] = dpo[i - 1] * (deg - 1);
1945 std::vector<unsigned int>
1956 const unsigned int n = degree + 1;
1995 unsigned int next_index = 0;
1997 h2l[next_index++] = 0;
1998 h2l[next_index++] = 1;
1999 h2l[next_index++] = n;
2000 h2l[next_index++] = n + 1;
2003 h2l[next_index++] = (2 + i) * n;
2006 h2l[next_index++] = (2 + i) * n + 1;
2009 h2l[next_index++] = 2 + i;
2012 h2l[next_index++] = n + 2 + i;
2018 h2l[next_index++] = (2 + i) * n + 2 + j;
2027 unsigned int next_index = 0;
2028 const unsigned int n2 = n * n;
2031 h2l[next_index++] = 0;
2032 h2l[next_index++] = 1;
2033 h2l[next_index++] = n;
2034 h2l[next_index++] = n + 1;
2036 h2l[next_index++] = n2;
2037 h2l[next_index++] = n2 + 1;
2038 h2l[next_index++] = n2 + n;
2039 h2l[next_index++] = n2 + n + 1;
2044 h2l[next_index++] = (2 + i) * n;
2046 h2l[next_index++] = (2 + i) * n + 1;
2048 h2l[next_index++] = 2 + i;
2050 h2l[next_index++] = n + 2 + i;
2053 h2l[next_index++] = n2 + (2 + i) * n;
2055 h2l[next_index++] = n2 + (2 + i) * n + 1;
2057 h2l[next_index++] = n2 + 2 + i;
2059 h2l[next_index++] = n2 + n + 2 + i;
2062 h2l[next_index++] = (2 + i) * n2;
2064 h2l[next_index++] = (2 + i) * n2 + 1;
2066 h2l[next_index++] = (2 + i) * n2 + n;
2068 h2l[next_index++] = (2 + i) * n2 + n + 1;
2076 h2l[next_index++] = (2 + i) * n2 + (2 + j) * n;
2080 h2l[next_index++] = (2 + i) * n2 + (2 + j) * n + 1;
2084 h2l[next_index++] = (2 + i) * n2 + 2 + j;
2088 h2l[next_index++] = (2 + i) * n2 + n + 2 + j;
2092 h2l[next_index++] = (2 + i) * n + 2 + j;
2096 h2l[next_index++] = n2 + (2 + i) * n + 2 + j;
2104 h2l[next_index++] = (2 + i) * n2 + (2 + j) * n + 2 + k;
2119 std::vector<unsigned int>
2121 const unsigned int degree)
2125 return internal::FE_Q_Hierarchical::invert_numbering(
2133 std::vector<unsigned int>
2137 return std::vector<unsigned int>();
2144 const unsigned int face_index)
const 2146 Assert(shape_index < this->dofs_per_cell,
2158 return (((shape_index == 0) && (face_index == 0)) ||
2159 ((shape_index == 1) && (face_index == 1)));
2167 const unsigned int face_index)
const 2169 Assert(shape_index < this->dofs_per_cell,
2178 if (((dim == 2) && (shape_index >= this->first_quad_index)) ||
2179 ((dim == 3) && (shape_index >= this->first_hex_index)))
2184 if (shape_index < this->first_line_index)
2191 const unsigned int vertex_no = shape_index;
2194 for (
unsigned int i = 0; i < GeometryInfo<dim>::vertices_per_face; ++i)
2200 else if (shape_index < this->first_quad_index)
2203 const unsigned int line_index =
2204 (shape_index - this->first_line_index) / this->dofs_per_line;
2208 for (
unsigned int i = 0; i < GeometryInfo<dim>::lines_per_face; ++i)
2213 else if (shape_index < this->first_hex_index)
2216 const unsigned int quad_index =
2217 (shape_index - this->first_quad_index) / this->dofs_per_quad;
2218 Assert(static_cast<signed int>(quad_index) <
2231 return (quad_index == face_index);
2253 std::vector<unsigned int>
2256 Assert((sub_degree > 0) && (sub_degree <= this->degree),
2261 std::vector<unsigned int> embedding_dofs(sub_degree + 1);
2262 for (
unsigned int i = 0; i < (sub_degree + 1); ++i)
2263 embedding_dofs[i] = i;
2265 return embedding_dofs;
2268 if (sub_degree == 1)
2270 std::vector<unsigned int> embedding_dofs(
2272 for (
unsigned int i = 0; i < GeometryInfo<dim>::vertices_per_cell; ++i)
2273 embedding_dofs[i] = i;
2275 return embedding_dofs;
2277 else if (sub_degree == this->degree)
2279 std::vector<unsigned int> embedding_dofs(this->dofs_per_cell);
2280 for (
unsigned int i = 0; i < this->dofs_per_cell; ++i)
2281 embedding_dofs[i] = i;
2283 return embedding_dofs;
2286 if ((dim == 2) || (dim == 3))
2288 std::vector<unsigned int> embedding_dofs(
2289 (dim == 2) ? (sub_degree + 1) * (sub_degree + 1) :
2290 (sub_degree + 1) * (sub_degree + 1) * (sub_degree + 1));
2292 for (
unsigned int i = 0;
2294 (sub_degree + 1) * (sub_degree + 1) :
2295 (sub_degree + 1) * (sub_degree + 1) * (sub_degree + 1));
2300 embedding_dofs[i] = i;
2305 const unsigned int j =
2307 const unsigned int line =
2312 line * (this->degree - 1) + j;
2320 const unsigned int j =
2324 const unsigned int k =
2329 const unsigned int face =
2332 k * (sub_degree - 1) - j) /
2333 ((sub_degree - 1) * (sub_degree - 1));
2338 face * (this->degree - 1) * (this->degree - 1) +
2339 k * (this->degree - 1) + j;
2347 (sub_degree - 1) * (sub_degree - 1))
2349 const unsigned int j =
2355 const unsigned int k =
2363 const unsigned int l =
2368 j - k * (sub_degree - 1)) /
2369 ((sub_degree - 1) * (sub_degree - 1));
2375 (this->degree - 1) +
2376 l * (this->degree - 1) * (this->degree - 1) +
2377 k * (this->degree - 1) + j;
2381 return embedding_dofs;
2386 return std::vector<unsigned int>();
2393 std::pair<Table<2, bool>, std::vector<unsigned int>>
2397 for (
unsigned int i = 0; i < GeometryInfo<dim>::vertices_per_cell; ++i)
2398 constant_modes(0, i) =
true;
2400 i < this->dofs_per_cell;
2402 constant_modes(0, i) =
false;
2403 return std::pair<Table<2, bool>, std::vector<unsigned int>>(
2404 constant_modes, std::vector<unsigned int>(1, 0));
2420 #include "fe_q_hierarchical.inst" 2423 DEAL_II_NAMESPACE_CLOSE
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
void initialize_generalized_support_points()
const unsigned int dofs_per_quad
const unsigned int degree
void set_numbering(const std::vector< unsigned int > &renumber)
#define AssertThrow(cond, exc)
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
const unsigned int dofs_per_line
std::vector< unsigned int > get_embedding_dofs(const unsigned int sub_degree) const
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim > &fe_other, const unsigned int codim=0) const override final
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
virtual void get_subface_interpolation_matrix(const FiniteElement< dim > &source, const unsigned int subface, FullMatrix< double > &matrix) const override
static ::ExceptionBase & ExcMessage(std::string arg1)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
static std::vector< unsigned int > face_fe_q_hierarchical_to_hierarchic_numbering(const unsigned int degree)
const unsigned int dofs_per_hex
virtual std::string get_name() const override
#define Assert(cond, exc)
virtual void get_interpolation_matrix(const FiniteElement< dim > &source, FullMatrix< double > &matrix) const override
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim > &fe_other) const override
void initialize_constraints(const std::vector< FullMatrix< double >> &dofs_subcell)
virtual std::size_t memory_consumption() const override
virtual std::string get_name() const =0
void build_dofs_cell(std::vector< FullMatrix< double >> &dofs_cell, std::vector< FullMatrix< double >> &dofs_subcell) const
virtual void get_face_interpolation_matrix(const FiniteElement< dim > &source, FullMatrix< double > &matrix) const override
const unsigned int dofs_per_cell
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim > &fe_other) const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim > &fe_other) const override
virtual std::unique_ptr< FiniteElement< dim, dim > > clone() const override
friend class FE_Q_Hierarchical
static std::vector< unsigned int > hierarchic_to_fe_q_hierarchical_numbering(const FiniteElementData< dim > &fe)
void initialize_embedding_and_restriction(const std::vector< FullMatrix< double >> &dofs_cell, const std::vector< FullMatrix< double >> &dofs_subcell)
unsigned int n_components() const
const unsigned int dofs_per_face
static ::ExceptionBase & ExcNotImplemented()
const unsigned int dofs_per_vertex
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
TensorProductPolynomials< dim > poly_space
void initialize_generalized_face_support_points()
virtual bool hp_constraints_are_implemented() const override
static ::ExceptionBase & ExcInternalError()