515 2 * this->n_dofs_per_vertex() + this->n_dofs_per_line();
517 this->interface_constraints.TableBase<2, double>::reinit(
518 this->interface_constraints_size());
531 for (
unsigned int i = 0; i <
dofs_1d; ++i)
532 this->interface_constraints(0, i) =
dofs_subcell[0](1, i);
536 for (
unsigned int i = 0; i <
dofs_1d; ++i)
538 this->interface_constraints(1 + c * (this->degree - 1) +
j - 2,
548 this->interface_constraints(0, face_renumber[i]) =
553 this->interface_constraints(1, face_renumber[i]) =
556 this->interface_constraints(2, face_renumber[i]) =
559 this->interface_constraints(3, face_renumber[i]) =
562 this->interface_constraints(4, face_renumber[i]) =
567 for (
unsigned int j = 0;
j < (this->degree - 1); ++
j)
569 this->interface_constraints(5 +
j, face_renumber[i]) =
572 this->interface_constraints(5 + (this->degree - 1) +
j,
576 this->interface_constraints(5 + 2 * (this->degree - 1) +
j,
580 this->interface_constraints(5 + 3 * (this->degree - 1) +
j,
587 for (
unsigned int j = 0;
j < (this->degree - 1); ++
j)
590 this->interface_constraints(5 + 4 * (this->degree - 1) +
j,
594 this->interface_constraints(5 + 4 * (this->degree - 1) +
595 (this->degree - 1) +
j,
600 this->interface_constraints(5 + 4 * (this->degree - 1) +
601 2 * (this->degree - 1) +
j,
605 this->interface_constraints(5 + 4 * (this->degree - 1) +
606 3 * (this->degree - 1) +
j,
611 this->interface_constraints(5 + 4 * (this->degree - 1) +
612 4 * (this->degree - 1) +
j,
616 this->interface_constraints(5 + 4 * (this->degree - 1) +
617 5 * (this->degree - 1) +
j,
622 this->interface_constraints(5 + 4 * (this->degree - 1) +
623 6 * (this->degree - 1) +
j,
627 this->interface_constraints(5 + 4 * (this->degree - 1) +
628 7 * (this->degree - 1) +
j,
635 for (
unsigned int j = 0;
j < (this->degree - 1); ++
j)
636 for (
unsigned int k = 0;
k < (this->degree - 1); ++
k)
639 this->interface_constraints(5 + 12 * (this->degree - 1) +
640 j +
k * (this->degree - 1),
645 this->interface_constraints(5 + 12 * (this->degree - 1) +
646 j +
k * (this->degree - 1) +
653 this->interface_constraints(5 + 12 * (this->degree - 1) +
654 j +
k * (this->degree - 1) +
655 2 * (this->degree - 1) *
661 this->interface_constraints(5 + 12 * (this->degree - 1) +
662 j +
k * (this->degree - 1) +
663 3 * (this->degree - 1) *
689 2 * this->n_dofs_per_vertex() + this->n_dofs_per_line();
692 const std::vector<unsigned int> &renumber =
697 this->prolongation[
iso][c].
reinit(this->n_dofs_per_cell(),
698 this->n_dofs_per_cell());
699 this->restriction[
iso][c].reinit(this->n_dofs_per_cell(),
700 this->n_dofs_per_cell());
726 for (
unsigned int j = 0;
j < this->n_dofs_per_cell(); ++
j)
727 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
732 for (
unsigned int c = 0;
737 const unsigned int c0 = c % 2;
739 const unsigned int c1 = c / 2;
741 this->prolongation[
iso][c](
j, i) =
746 (renumber[i] - (renumber[i] %
dofs_1d)) /
749 this->restriction[
iso][c](
j, i) =
754 (renumber[i] - (renumber[i] %
dofs_1d)) /
762 for (
unsigned int c = 0;
767 const unsigned int c0 = c % 2;
769 const unsigned int c1 = (c % 4) / 2;
771 const unsigned int c2 = c / 4;
773 this->prolongation[
iso][c](
j, i) =
791 this->restriction[
iso][c](
j, i) =
1022 const unsigned int subface,
1024 const unsigned int face_no)
const
1073 for (
unsigned int dof = 2;
1074 dof < this->n_dofs_per_face(
face_no);)
1082 for (
unsigned int i = 2; i < this->n_dofs_per_face(
face_no);
1090 for (
unsigned int j = i + 1;
1091 j < this->n_dofs_per_face(
face_no);
1097 if (((i +
j) & 1) != 0
u)
1117 for (
unsigned int dof = 2;
1118 dof < this->n_dofs_per_face(
face_no);)
1128 for (
unsigned int i = 2; i < this->n_dofs_per_face(
face_no);
1136 for (
unsigned int j = i + 1;
1137 j < this->n_dofs_per_face(
face_no);
1165 for (
unsigned int i = 0; i < this->degree - 1;)
1167 for (
unsigned int line = 0;
1171 i + line * (this->degree - 1) +
1174 for (
unsigned int j = 0;
j < this->degree - 1;)
1177 i + (
j + 4) * this->degree -
j) =
1188 for (
unsigned int vertex = 0;
1195 for (
unsigned int i = 2; i <= this->degree; ++i)
1200 i + 2 *
this->degree) = tmp;
1205 i +
this->degree + 1) = tmp;
1207 i + 2 *
this->degree) = tmp;
1209 i + 3 *
this->degree - 1) = tmp;
1212 for (
unsigned int j = 0;
j < this->degree - 1;)
1215 (i + 2) *
this->degree +
j + 2 -
1218 i + (
j + 4) *
this->degree -
j -
1225 for (
unsigned int j = 2;
j <= this->degree; ++
j)
1229 i + (
j + 2) *
this->degree -
j) =
1235 for (
unsigned int k =
j + 1;
k < this->degree; ++
k)
1240 if (((
j +
k) & 1) != 0
u)
1243 i + (
k + 2) *
this->degree -
k) =
1250 i + (
k + 2) *
this->degree -
k) =
1260 for (
unsigned int j = i + 1;
j <= this->degree; ++
j)
1265 if (((i +
j) & 1) != 0
u)
1271 j + 2 *
this->degree) = tmp;
1274 for (
unsigned int k = 2;
k <= this->degree; ++
k)
1278 j + (
k + 2) *
this->degree -
k) =
1284 for (
unsigned int l =
k + 1;
1291 if (((
k + l) & 1) != 0
u)
1294 j + (l + 2) *
this->degree - l) =
1302 j + (l + 2) *
this->degree - l) =
1312 j +
this->degree + 1) = tmp;
1314 j + 2 *
this->degree) = tmp;
1316 j + 3 *
this->degree - 1) =
1320 for (
unsigned int k = 0;
k < this->degree - 1;)
1323 (
j + 2) *
this->degree +
1327 j + (
k + 4) *
this->degree -
k - 2) = tmp;
1337 j + 2 *
this->degree) = tmp;
1340 for (
unsigned int k = 2;
k <= this->degree; ++
k)
1344 j + (
k + 2) *
this->degree -
k) =
1350 for (
unsigned int l =
k + 1;
1357 if (((
k + l) & 1) != 0
u)
1360 j + (l + 2) *
this->degree - l) =
1368 j + (l + 2) *
this->degree - l) =
1378 j +
this->degree + 1) = tmp;
1380 j + 2 *
this->degree) = tmp;
1382 j + 3 *
this->degree - 1) =
1386 for (
unsigned int k = 0;
k < this->degree - 1;)
1389 (
j + 2) *
this->degree +
1393 j + (
k + 4) *
this->degree -
k - 2) = tmp;
1411 for (
unsigned int i = 0; i < this->degree - 1;)
1413 for (
unsigned int line = 0;
1417 i + line * (this->degree - 1) +
1420 for (
unsigned int j = 0;
j < this->degree - 1;)
1423 i + (
j + 4) * this->degree -
j) =
1434 for (
unsigned int vertex = 0;
1441 for (
unsigned int i = 2; i <= this->degree; ++i)
1447 i + 2 *
this->degree) = tmp;
1449 i + 3 *
this->degree - 1) = tmp;
1452 for (
unsigned int j = 0;
j < this->degree - 1;)
1455 j + (i + 2) * this->degree + 2 -
1458 i + (
j + 4) *
this->degree -
j -
1465 i +
this->degree + 1) = tmp;
1467 i + 2 *
this->degree) = tmp;
1472 for (
unsigned int j = i + 1;
j <= this->degree; ++
j)
1479 j + 2 *
this->degree) = tmp;
1482 for (
unsigned int k = 2;
k <= this->degree; ++
k)
1486 j + (
k + 2) *
this->degree -
k) =
1492 for (
unsigned int l =
k + 1; l <= this->degree;
1498 if (((
k + l) & 1) != 0
u)
1501 j + (l + 2) *
this->degree - l) =
1509 j + (l + 2) *
this->degree - l) =
1517 for (
unsigned int k = 0;
k < this->degree - 1;)
1520 j + (
k + 4) *
this->degree -
1527 j + 2 *
this->degree) = tmp;
1529 j + 3 *
this->degree - 1) = tmp;
1531 if (((i +
j) & 1) != 0
u)
1538 j +
this->degree + 1) =
1542 for (
unsigned int k = 0;
k < this->degree - 1;)
1545 k + (
j + 2) * this->degree +
1553 for (
unsigned int j = 2;
j <= this->degree; ++
j)
1557 i + (
j + 2) *
this->degree -
j) =
1563 for (
unsigned int k =
j + 1;
k <= this->degree; ++
k)
1568 if (((
j +
k) & 1) != 0
u)
1571 i + (
k + 2) *
this->degree -
k) =
1578 i + (
k + 2) *
this->degree -
k) =
1596 for (
unsigned int i = 0; i < this->degree - 1;)
1598 for (
unsigned int line = 0;
1602 i + line * (this->degree - 1) +
1605 for (
unsigned int j = 0;
j < this->degree - 1;)
1608 i + (
j + 4) * this->degree -
j) =
1618 for (
unsigned int vertex = 0;
1625 for (
unsigned int i = 2; i <= this->degree; ++i)
1630 i + 3 *
this->degree - 1) = tmp;
1635 i +
this->degree + 1) = tmp;
1637 i + 2 *
this->degree) = tmp;
1639 i + 3 *
this->degree - 1) = tmp;
1642 for (
unsigned int j = 0;
j < this->degree - 1;)
1645 j + (i + 2) *
this->degree + 2 -
1648 i + (
j + 4) *
this->degree -
j -
1655 for (
unsigned int j = 2;
j <= this->degree; ++
j)
1659 i + (
j + 2) *
this->degree -
j) =
1665 for (
unsigned int k =
j + 1;
k <= this->degree; ++
k)
1671 i + (
k + 2) *
this->degree -
k) =
1681 for (
unsigned int j = i + 1;
j <= this->degree; ++
j)
1690 for (
unsigned int k = 0;
k < this->degree - 1;)
1693 k + (
j + 2) *
this->degree +
1702 j +
this->degree + 1) = tmp;
1704 if (((i +
j) & 1) != 0
u)
1708 j + 2 *
this->degree) = tmp;
1710 j + 3 *
this->degree - 1) = tmp;
1713 j + 3 *
this->degree - 1) = tmp;
1716 for (
unsigned int k = 2;
k <= this->degree; ++
k)
1720 j + (
k + 2) *
this->degree -
k) =
1726 for (
unsigned int l =
k + 1; l <= this->degree;
1733 j + (l + 2) *
this->degree - l) =
1741 for (
unsigned int k = 0;
k < this->degree - 1;)
1744 j + (
k + 4) *
this->degree -
1756 for (
unsigned int vertex = 0;
1761 for (
unsigned int i = 0; i < this->degree - 1;)
1763 for (
unsigned int line = 0;
1767 i + line * (this->degree - 1) +
1770 for (
unsigned int j = 0;
j < this->degree - 1;)
1773 i + (
j + 4) * this->degree -
j) =
1791 for (
unsigned int i = 2; i <= this->degree; ++i)
1797 i + 2 *
this->degree) = tmp;
1799 i + 3 *
this->degree - 1) = tmp;
1802 for (
unsigned int j = 0;
j < this->degree - 1;)
1805 j + (i + 2) * this->degree + 2 -
1808 i + (
j + 4) *
this->degree - 2) =
1815 i +
this->degree + 1) = tmp;
1817 i + 3 *
this->degree - 1) = tmp;
1820 for (
unsigned int j = 2;
j <= this->degree; ++
j)
1824 i + (
j + 2) *
this->degree -
j) =
1830 for (
unsigned int k =
j + 1;
k <= this->degree; ++
k)
1836 i + (
k + 2) *
this->degree -
k) =
1846 for (
unsigned int j = i + 1;
j <= this->degree; ++
j)
1856 j + 2 *
this->degree) = tmp;
1858 j + 3 *
this->degree - 1) = tmp;
1861 j +
this->degree + 1) = tmp;
1863 j + 3 *
this->degree - 1) = tmp;
1866 for (
unsigned int k = 2;
k <= this->degree; ++
k)
1870 j + (
k + 2) *
this->degree -
k) =
1876 for (
unsigned int l =
k + 1; l <= this->degree;
1883 j + (l + 2) *
this->degree - l) =
1891 for (
unsigned int k = 0;
k < this->degree - 1;)
1894 k + (
j + 2) * this->degree +
1897 j + (
k + 4) *
this->degree -
1985 std::vector<unsigned int>
h2l(fe.n_dofs_per_cell());
1988 const unsigned int degree = fe.n_dofs_per_line() + 1;
1991 const unsigned int n = degree + 1;
2009 for (
unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
2030 unsigned int next_index = 0;
2032 h2l[next_index++] = 0;
2033 h2l[next_index++] = 1;
2034 h2l[next_index++] = n;
2035 h2l[next_index++] = n + 1;
2037 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2038 h2l[next_index++] = (2 + i) * n;
2040 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2041 h2l[next_index++] = (2 + i) * n + 1;
2043 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2044 h2l[next_index++] = 2 + i;
2046 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2047 h2l[next_index++] = n + 2 + i;
2049 Assert(fe.n_dofs_per_quad(0 ) ==
2050 fe.n_dofs_per_line() * fe.n_dofs_per_line(),
2052 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2053 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2054 h2l[next_index++] = (2 + i) * n + 2 +
j;
2063 unsigned int next_index = 0;
2064 const unsigned int n2 = n * n;
2067 h2l[next_index++] = 0;
2068 h2l[next_index++] = 1;
2069 h2l[next_index++] = n;
2070 h2l[next_index++] = n + 1;
2072 h2l[next_index++] =
n2;
2073 h2l[next_index++] =
n2 + 1;
2074 h2l[next_index++] =
n2 + n;
2075 h2l[next_index++] =
n2 + n + 1;
2079 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2080 h2l[next_index++] = (2 + i) * n;
2081 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2082 h2l[next_index++] = (2 + i) * n + 1;
2083 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2084 h2l[next_index++] = 2 + i;
2085 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2086 h2l[next_index++] = n + 2 + i;
2088 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2089 h2l[next_index++] =
n2 + (2 + i) * n;
2090 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2091 h2l[next_index++] =
n2 + (2 + i) * n + 1;
2092 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2093 h2l[next_index++] =
n2 + 2 + i;
2094 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2095 h2l[next_index++] =
n2 + n + 2 + i;
2097 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2098 h2l[next_index++] = (2 + i) *
n2;
2099 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2100 h2l[next_index++] = (2 + i) *
n2 + 1;
2101 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2102 h2l[next_index++] = (2 + i) *
n2 + n;
2103 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2104 h2l[next_index++] = (2 + i) *
n2 + n + 1;
2109 const unsigned int face_no = 0;
2114 fe.n_dofs_per_line() * fe.n_dofs_per_line(),
2117 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2118 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2119 h2l[next_index++] = (2 + i) *
n2 + (2 +
j) * n;
2121 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2122 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2123 h2l[next_index++] = (2 + i) *
n2 + (2 +
j) * n + 1;
2125 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2126 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2127 h2l[next_index++] = (2 + i) *
n2 + 2 +
j;
2129 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2130 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2131 h2l[next_index++] = (2 + i) *
n2 + n + 2 +
j;
2133 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2134 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2135 h2l[next_index++] = (2 + i) * n + 2 +
j;
2137 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2138 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2139 h2l[next_index++] =
n2 + (2 + i) * n + 2 +
j;
2142 Assert(fe.n_dofs_per_hex() ==
2143 fe.n_dofs_per_quad(
face_no) * fe.n_dofs_per_line(),
2145 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2146 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2147 for (
unsigned int k = 0;
k < fe.n_dofs_per_line(); ++
k)
2148 h2l[next_index++] = (2 + i) *
n2 + (2 +
j) * n + 2 +
k;