511 2 * this->n_dofs_per_vertex() + this->n_dofs_per_line();
513 this->interface_constraints.TableBase<2, double>::reinit(
514 this->interface_constraints_size());
527 for (
unsigned int i = 0; i <
dofs_1d; ++i)
528 this->interface_constraints(0, i) =
dofs_subcell[0](1, i);
532 for (
unsigned int i = 0; i <
dofs_1d; ++i)
534 this->interface_constraints(1 + c * (this->degree - 1) +
j - 2,
544 this->interface_constraints(0, face_renumber[i]) =
549 this->interface_constraints(1, face_renumber[i]) =
552 this->interface_constraints(2, face_renumber[i]) =
555 this->interface_constraints(3, face_renumber[i]) =
558 this->interface_constraints(4, face_renumber[i]) =
563 for (
unsigned int j = 0;
j < (this->degree - 1); ++
j)
565 this->interface_constraints(5 +
j, face_renumber[i]) =
568 this->interface_constraints(5 + (this->degree - 1) +
j,
572 this->interface_constraints(5 + 2 * (this->degree - 1) +
j,
576 this->interface_constraints(5 + 3 * (this->degree - 1) +
j,
583 for (
unsigned int j = 0;
j < (this->degree - 1); ++
j)
586 this->interface_constraints(5 + 4 * (this->degree - 1) +
j,
590 this->interface_constraints(5 + 4 * (this->degree - 1) +
591 (this->degree - 1) +
j,
596 this->interface_constraints(5 + 4 * (this->degree - 1) +
597 2 * (this->degree - 1) +
j,
601 this->interface_constraints(5 + 4 * (this->degree - 1) +
602 3 * (this->degree - 1) +
j,
607 this->interface_constraints(5 + 4 * (this->degree - 1) +
608 4 * (this->degree - 1) +
j,
612 this->interface_constraints(5 + 4 * (this->degree - 1) +
613 5 * (this->degree - 1) +
j,
618 this->interface_constraints(5 + 4 * (this->degree - 1) +
619 6 * (this->degree - 1) +
j,
623 this->interface_constraints(5 + 4 * (this->degree - 1) +
624 7 * (this->degree - 1) +
j,
631 for (
unsigned int j = 0;
j < (this->degree - 1); ++
j)
632 for (
unsigned int k = 0;
k < (this->degree - 1); ++
k)
635 this->interface_constraints(5 + 12 * (this->degree - 1) +
636 j +
k * (this->degree - 1),
641 this->interface_constraints(5 + 12 * (this->degree - 1) +
642 j +
k * (this->degree - 1) +
649 this->interface_constraints(5 + 12 * (this->degree - 1) +
650 j +
k * (this->degree - 1) +
651 2 * (this->degree - 1) *
657 this->interface_constraints(5 + 12 * (this->degree - 1) +
658 j +
k * (this->degree - 1) +
659 3 * (this->degree - 1) *
685 2 * this->n_dofs_per_vertex() + this->n_dofs_per_line();
688 const std::vector<unsigned int> &renumber =
693 this->prolongation[
iso][c].reinit(this->n_dofs_per_cell(),
694 this->n_dofs_per_cell());
695 this->restriction[
iso][c].reinit(this->n_dofs_per_cell(),
696 this->n_dofs_per_cell());
722 for (
unsigned int j = 0;
j < this->n_dofs_per_cell(); ++
j)
723 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
728 for (
unsigned int c = 0;
733 const unsigned int c0 = c % 2;
735 const unsigned int c1 = c / 2;
737 this->prolongation[
iso][c](
j, i) =
742 (renumber[i] - (renumber[i] %
dofs_1d)) /
745 this->restriction[
iso][c](
j, i) =
750 (renumber[i] - (renumber[i] %
dofs_1d)) /
758 for (
unsigned int c = 0;
763 const unsigned int c0 = c % 2;
765 const unsigned int c1 = (c % 4) / 2;
767 const unsigned int c2 = c / 4;
769 this->prolongation[
iso][c](
j, i) =
787 this->restriction[
iso][c](
j, i) =
1018 const unsigned int subface,
1020 const unsigned int face_no)
const
1069 for (
unsigned int dof = 2;
1070 dof < this->n_dofs_per_face(
face_no);)
1078 for (
unsigned int i = 2; i < this->n_dofs_per_face(
face_no);
1086 for (
unsigned int j = i + 1;
1087 j < this->n_dofs_per_face(
face_no);
1093 if (((i +
j) & 1) != 0
u)
1113 for (
unsigned int dof = 2;
1114 dof < this->n_dofs_per_face(
face_no);)
1124 for (
unsigned int i = 2; i < this->n_dofs_per_face(
face_no);
1132 for (
unsigned int j = i + 1;
1133 j < this->n_dofs_per_face(
face_no);
1161 for (
unsigned int i = 0; i < this->degree - 1;)
1163 for (
unsigned int line = 0;
1167 i + line * (this->degree - 1) +
1170 for (
unsigned int j = 0;
j < this->degree - 1;)
1173 i + (
j + 4) * this->degree -
j) =
1184 for (
unsigned int vertex = 0;
1191 for (
unsigned int i = 2; i <= this->degree; ++i)
1196 i + 2 *
this->degree) = tmp;
1201 i +
this->degree + 1) = tmp;
1203 i + 2 *
this->degree) = tmp;
1205 i + 3 *
this->degree - 1) = tmp;
1208 for (
unsigned int j = 0;
j < this->degree - 1;)
1211 (i + 2) *
this->degree +
j + 2 -
1214 i + (
j + 4) *
this->degree -
j -
1221 for (
unsigned int j = 2;
j <= this->degree; ++
j)
1225 i + (
j + 2) *
this->degree -
j) =
1231 for (
unsigned int k =
j + 1;
k < this->degree; ++
k)
1236 if (((
j +
k) & 1) != 0
u)
1239 i + (
k + 2) *
this->degree -
k) =
1246 i + (
k + 2) *
this->degree -
k) =
1256 for (
unsigned int j = i + 1;
j <= this->degree; ++
j)
1261 if (((i +
j) & 1) != 0
u)
1267 j + 2 *
this->degree) = tmp;
1270 for (
unsigned int k = 2;
k <= this->degree; ++
k)
1274 j + (
k + 2) *
this->degree -
k) =
1280 for (
unsigned int l =
k + 1;
1287 if (((
k + l) & 1) != 0
u)
1290 j + (l + 2) *
this->degree - l) =
1298 j + (l + 2) *
this->degree - l) =
1309 j +
this->degree + 1) = tmp;
1311 j + 2 *
this->degree) = tmp;
1313 j + 3 *
this->degree - 1) =
1317 for (
unsigned int k = 0;
k < this->degree - 1;)
1320 (
j + 2) *
this->degree +
1324 j + (
k + 4) *
this->degree -
k - 2) = tmp;
1334 j + 2 *
this->degree) = tmp;
1337 for (
unsigned int k = 2;
k <= this->degree; ++
k)
1341 j + (
k + 2) *
this->degree -
k) =
1347 for (
unsigned int l =
k + 1;
1354 if (((
k + l) & 1) != 0
u)
1357 j + (l + 2) *
this->degree - l) =
1365 j + (l + 2) *
this->degree - l) =
1376 j +
this->degree + 1) = tmp;
1378 j + 2 *
this->degree) = tmp;
1380 j + 3 *
this->degree - 1) =
1384 for (
unsigned int k = 0;
k < this->degree - 1;)
1387 (
j + 2) *
this->degree +
1391 j + (
k + 4) *
this->degree -
k - 2) = tmp;
1409 for (
unsigned int i = 0; i < this->degree - 1;)
1411 for (
unsigned int line = 0;
1415 i + line * (this->degree - 1) +
1418 for (
unsigned int j = 0;
j < this->degree - 1;)
1421 i + (
j + 4) * this->degree -
j) =
1432 for (
unsigned int vertex = 0;
1439 for (
unsigned int i = 2; i <= this->degree; ++i)
1445 i + 2 *
this->degree) = tmp;
1447 i + 3 *
this->degree - 1) = tmp;
1450 for (
unsigned int j = 0;
j < this->degree - 1;)
1453 j + (i + 2) * this->degree + 2 -
1456 i + (
j + 4) *
this->degree -
j -
1463 i +
this->degree + 1) = tmp;
1465 i + 2 *
this->degree) = tmp;
1470 for (
unsigned int j = i + 1;
j <= this->degree; ++
j)
1477 j + 2 *
this->degree) = tmp;
1480 for (
unsigned int k = 2;
k <= this->degree; ++
k)
1484 j + (
k + 2) *
this->degree -
k) =
1490 for (
unsigned int l =
k + 1; l <= this->degree;
1496 if (((
k + l) & 1) != 0
u)
1499 j + (l + 2) *
this->degree - l) =
1507 j + (l + 2) *
this->degree - l) =
1516 for (
unsigned int k = 0;
k < this->degree - 1;)
1519 j + (
k + 4) *
this->degree -
1526 j + 2 *
this->degree) = tmp;
1528 j + 3 *
this->degree - 1) = tmp;
1530 if (((i +
j) & 1) != 0
u)
1537 j +
this->degree + 1) =
1541 for (
unsigned int k = 0;
k < this->degree - 1;)
1544 k + (
j + 2) * this->degree +
1552 for (
unsigned int j = 2;
j <= this->degree; ++
j)
1556 i + (
j + 2) *
this->degree -
j) =
1562 for (
unsigned int k =
j + 1;
k <= this->degree; ++
k)
1567 if (((
j +
k) & 1) != 0
u)
1570 i + (
k + 2) *
this->degree -
k) =
1577 i + (
k + 2) *
this->degree -
k) =
1595 for (
unsigned int i = 0; i < this->degree - 1;)
1597 for (
unsigned int line = 0;
1601 i + line * (this->degree - 1) +
1604 for (
unsigned int j = 0;
j < this->degree - 1;)
1607 i + (
j + 4) * this->degree -
j) =
1617 for (
unsigned int vertex = 0;
1624 for (
unsigned int i = 2; i <= this->degree; ++i)
1629 i + 3 *
this->degree - 1) = tmp;
1634 i +
this->degree + 1) = tmp;
1636 i + 2 *
this->degree) = tmp;
1638 i + 3 *
this->degree - 1) = tmp;
1641 for (
unsigned int j = 0;
j < this->degree - 1;)
1644 j + (i + 2) *
this->degree + 2 -
1647 i + (
j + 4) *
this->degree -
j -
1654 for (
unsigned int j = 2;
j <= this->degree; ++
j)
1658 i + (
j + 2) *
this->degree -
j) =
1664 for (
unsigned int k =
j + 1;
k <= this->degree; ++
k)
1670 i + (
k + 2) *
this->degree -
k) =
1680 for (
unsigned int j = i + 1;
j <= this->degree; ++
j)
1689 for (
unsigned int k = 0;
k < this->degree - 1;)
1692 k + (
j + 2) *
this->degree +
1701 j +
this->degree + 1) = tmp;
1703 if (((i +
j) & 1) != 0
u)
1707 j + 2 *
this->degree) = tmp;
1709 j + 3 *
this->degree - 1) = tmp;
1712 j + 3 *
this->degree - 1) = tmp;
1715 for (
unsigned int k = 2;
k <= this->degree; ++
k)
1719 j + (
k + 2) *
this->degree -
k) =
1725 for (
unsigned int l =
k + 1; l <= this->degree;
1732 j + (l + 2) *
this->degree - l) =
1740 for (
unsigned int k = 0;
k < this->degree - 1;)
1743 j + (
k + 4) *
this->degree -
1755 for (
unsigned int vertex = 0;
1760 for (
unsigned int i = 0; i < this->degree - 1;)
1762 for (
unsigned int line = 0;
1766 i + line * (this->degree - 1) +
1769 for (
unsigned int j = 0;
j < this->degree - 1;)
1772 i + (
j + 4) * this->degree -
j) =
1790 for (
unsigned int i = 2; i <= this->degree; ++i)
1796 i + 2 *
this->degree) = tmp;
1798 i + 3 *
this->degree - 1) = tmp;
1801 for (
unsigned int j = 0;
j < this->degree - 1;)
1804 j + (i + 2) * this->degree + 2 -
1807 i + (
j + 4) *
this->degree - 2) =
1814 i +
this->degree + 1) = tmp;
1816 i + 3 *
this->degree - 1) = tmp;
1819 for (
unsigned int j = 2;
j <= this->degree; ++
j)
1823 i + (
j + 2) *
this->degree -
j) =
1829 for (
unsigned int k =
j + 1;
k <= this->degree; ++
k)
1835 i + (
k + 2) *
this->degree -
k) =
1845 for (
unsigned int j = i + 1;
j <= this->degree; ++
j)
1855 j + 2 *
this->degree) = tmp;
1857 j + 3 *
this->degree - 1) = tmp;
1860 j +
this->degree + 1) = tmp;
1862 j + 3 *
this->degree - 1) = tmp;
1865 for (
unsigned int k = 2;
k <= this->degree; ++
k)
1869 j + (
k + 2) *
this->degree -
k) =
1875 for (
unsigned int l =
k + 1; l <= this->degree;
1882 j + (l + 2) *
this->degree - l) =
1890 for (
unsigned int k = 0;
k < this->degree - 1;)
1893 k + (
j + 2) * this->degree +
1896 j + (
k + 4) *
this->degree -
1984 std::vector<unsigned int>
h2l(fe.n_dofs_per_cell());
1987 const unsigned int degree = fe.n_dofs_per_line() + 1;
1990 const unsigned int n = degree + 1;
2008 for (
unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
2029 unsigned int next_index = 0;
2031 h2l[next_index++] = 0;
2032 h2l[next_index++] = 1;
2033 h2l[next_index++] = n;
2034 h2l[next_index++] = n + 1;
2036 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2037 h2l[next_index++] = (2 + i) * n;
2039 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2040 h2l[next_index++] = (2 + i) * n + 1;
2042 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2043 h2l[next_index++] = 2 + i;
2045 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2046 h2l[next_index++] = n + 2 + i;
2048 Assert(fe.n_dofs_per_quad(0 ) ==
2049 fe.n_dofs_per_line() * fe.n_dofs_per_line(),
2051 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2052 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2053 h2l[next_index++] = (2 + i) * n + 2 +
j;
2062 unsigned int next_index = 0;
2063 const unsigned int n2 = n * n;
2066 h2l[next_index++] = 0;
2067 h2l[next_index++] = 1;
2068 h2l[next_index++] = n;
2069 h2l[next_index++] = n + 1;
2071 h2l[next_index++] =
n2;
2072 h2l[next_index++] =
n2 + 1;
2073 h2l[next_index++] =
n2 + n;
2074 h2l[next_index++] =
n2 + n + 1;
2078 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2079 h2l[next_index++] = (2 + i) * n;
2080 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2081 h2l[next_index++] = (2 + i) * n + 1;
2082 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2083 h2l[next_index++] = 2 + i;
2084 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2085 h2l[next_index++] = n + 2 + i;
2087 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2088 h2l[next_index++] =
n2 + (2 + i) * n;
2089 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2090 h2l[next_index++] =
n2 + (2 + i) * n + 1;
2091 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2092 h2l[next_index++] =
n2 + 2 + i;
2093 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2094 h2l[next_index++] =
n2 + n + 2 + i;
2096 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2097 h2l[next_index++] = (2 + i) *
n2;
2098 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2099 h2l[next_index++] = (2 + i) *
n2 + 1;
2100 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2101 h2l[next_index++] = (2 + i) *
n2 + n;
2102 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2103 h2l[next_index++] = (2 + i) *
n2 + n + 1;
2108 const unsigned int face_no = 0;
2113 fe.n_dofs_per_line() * fe.n_dofs_per_line(),
2116 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2117 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2118 h2l[next_index++] = (2 + i) *
n2 + (2 +
j) * n;
2120 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2121 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2122 h2l[next_index++] = (2 + i) *
n2 + (2 +
j) * n + 1;
2124 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2125 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2126 h2l[next_index++] = (2 + i) *
n2 + 2 +
j;
2128 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2129 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2130 h2l[next_index++] = (2 + i) *
n2 + n + 2 +
j;
2132 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2133 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2134 h2l[next_index++] = (2 + i) * n + 2 +
j;
2136 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2137 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2138 h2l[next_index++] =
n2 + (2 + i) * n + 2 +
j;
2141 Assert(fe.n_dofs_per_hex() ==
2142 fe.n_dofs_per_quad(
face_no) * fe.n_dofs_per_line(),
2144 for (
unsigned int i = 0; i < fe.n_dofs_per_line(); ++i)
2145 for (
unsigned int j = 0;
j < fe.n_dofs_per_line(); ++
j)
2146 for (
unsigned int k = 0;
k < fe.n_dofs_per_line(); ++
k)
2147 h2l[next_index++] = (2 + i) *
n2 + (2 +
j) * n + 2 +
k;