24template <
int dim,
int spacedim>
62 FETools::compute_face_embedding_matrices<dim, double>(
100 for (
unsigned int i = 0; i < 2; ++i)
106 for (
unsigned int i = 0; i < 2; ++i)
107 for (
unsigned int j = 3 * this->degree;
113 for (
unsigned int i = 0; i < 2; ++i)
114 for (
unsigned int j = 0;
j < 2; ++
j)
115 for (
unsigned int k = i * this->degree;
116 k < (i + 1) * this->degree;
122 for (
unsigned int i = 0; i < 2; ++i)
123 for (
unsigned int j = 0;
j < 2; ++
j)
124 for (
unsigned int k = (i + 2) * this->
degree;
125 k < (i + 3) * this->degree;
133 for (
unsigned int j =
151template <
int dim,
int spacedim>
162template <
int dim,
int spacedim>
165 const unsigned int i,
167 const unsigned int component)
const
173 typename ::FiniteElement<dim, spacedim>::InternalDataBase>
174 data_ptr = std::make_unique<InternalData>();
176 std::vector<Point<dim>>
p_list = {p};
188template <
int dim,
int spacedim>
199template <
int dim,
int spacedim>
202 const unsigned int i,
204 const unsigned int component)
const
210 typename ::FiniteElement<dim, spacedim>::InternalDataBase>
211 data_ptr = std::make_unique<InternalData>();
213 std::vector<Point<dim>>
p_list = {p};
225template <
int dim,
int spacedim>
236template <
int dim,
int spacedim>
239 const unsigned int i,
241 const unsigned int component)
const
247 typename ::FiniteElement<dim, spacedim>::InternalDataBase>
248 data_ptr = std::make_unique<InternalData>();
250 std::vector<Point<dim>>
p_list = {p};
262template <
int dim,
int spacedim>
268 typename ::FiniteElement<dim, spacedim>::InternalDataBase> &
data_ptr)
272 data.update_each = requires_update_flags(update_flags);
275 const unsigned int degree(this->degree - 1);
281 const unsigned int n_line_dofs = this->n_dofs_per_line() * lines_per_cell;
283 const unsigned int n_face_dofs = this->n_dofs_per_quad(0) * faces_per_cell;
285 const unsigned int n_q_points =
p_list.size();
290 data.sigma_imj_values.resize(
292 std::vector<std::vector<double>>(vertices_per_cell,
293 std::vector<double>(vertices_per_cell)));
295 data.sigma_imj_grads.resize(vertices_per_cell,
296 std::vector<std::vector<double>>(
297 vertices_per_cell, std::vector<double>(dim)));
301 data.shape_values.resize(this->n_dofs_per_cell(),
305 data.shape_grads.resize(this->n_dofs_per_cell(),
310 data.shape_hessians.resize(this->n_dofs_per_cell(),
316 std::vector<std::vector<double>>
sigma(n_q_points,
317 std::vector<double>(lines_per_cell));
318 std::vector<std::vector<double>> lambda(n_q_points,
319 std::vector<double>(lines_per_cell));
325 for (
unsigned int q = 0;
q < n_q_points; ++
q)
336 for (
unsigned int i = 0; i < vertices_per_cell; ++i)
337 for (
unsigned int j = 0;
j < vertices_per_cell; ++
j)
349 {-1, -1}, {1, -1}, {-1, 1}, {1, 1}};
354 for (
unsigned int i = 0; i < vertices_per_cell; ++i)
355 for (
unsigned int j = 0;
j < vertices_per_cell; ++
j)
368 for (
unsigned int d = 0; d < dim; ++d)
391 data.edge_sigma_values.resize(lines_per_cell,
392 std::vector<double>(n_q_points));
393 data.edge_sigma_grads.resize(lines_per_cell,
394 std::vector<double>(dim));
403 data.edge_lambda_values.resize(lines_per_cell,
404 std::vector<double>(n_q_points));
406 data.edge_lambda_grads_2d.resize(lines_per_cell,
407 std::vector<double>(dim));
409 for (
unsigned int m = 0; m < lines_per_cell; ++m)
414 const unsigned int e1(
416 const unsigned int e2(
418 for (
unsigned int q = 0;
q < n_q_points; ++
q)
420 data.edge_sigma_values[m][
q] =
422 data.edge_lambda_values[m][
q] = lambda[
q][
e1] + lambda[
q][
e2];
428 data.edge_lambda_grads_2d[0] = {-1.0, 0.0};
429 data.edge_lambda_grads_2d[1] = {1.0, 0.0};
430 data.edge_lambda_grads_2d[2] = {0.0, -1.0};
431 data.edge_lambda_grads_2d[3] = {0.0, 1.0};
521 for (
unsigned int q = 0;
q < n_q_points; ++
q)
522 for (
unsigned int d = 0; d < dim; ++d)
526 for (
unsigned int q = 0;
q < n_q_points; ++
q)
543 std::vector<std::vector<double>>
polyx(
545 std::vector<std::vector<double>>
polyy(
547 for (
unsigned int i = 0; i < degree; ++i)
552 IntegratedLegendrePolynomials[i + 2].value(
554 IntegratedLegendrePolynomials[i + 2].value(
560 for (
unsigned int j = 0;
j < degree; ++
j)
562 const unsigned int shift_j(
j * degree);
563 for (
unsigned int i = 0; i < degree; ++i)
597 for (
unsigned int j = 0;
j < degree; ++
j)
599 const unsigned int shift_j(
j * degree);
600 for (
unsigned int i = 0; i < degree; ++i)
648 for (
unsigned int j = 0;
j < degree; ++
j)
650 const unsigned int shift_j(
j * degree);
651 for (
unsigned int i = 0; i < degree; ++i)
683 for (
unsigned int d = 0; d < dim; ++d)
730 for (
unsigned int q = 0;
q < n_q_points; ++
q)
760 for (
unsigned int i = 0; i < vertices_per_cell; ++i)
761 for (
unsigned int j = 0;
j < vertices_per_cell; ++
j)
797 for (
unsigned int i = 0; i < vertices_per_cell; ++i)
798 for (
unsigned int j = 0;
j < vertices_per_cell; ++
j)
811 for (
unsigned int d = 0; d < dim; ++d)
834 data.edge_sigma_values.resize(lines_per_cell,
835 std::vector<double>(n_q_points));
836 data.edge_lambda_values.resize(lines_per_cell,
837 std::vector<double>(n_q_points));
838 data.edge_sigma_grads.resize(lines_per_cell,
839 std::vector<double>(dim));
840 data.edge_lambda_grads_3d.resize(
842 std::vector<std::vector<double>>(n_q_points,
843 std::vector<double>(dim)));
844 data.edge_lambda_gradgrads_3d.resize(
846 std::vector<std::vector<double>>(dim, std::vector<double>(dim)));
851 1, 1, 0, 0, 1, 1, 0, 0, 2, 2, 2, 2};
853 for (
unsigned int m = 0; m < lines_per_cell; ++m)
858 const unsigned int e1(
860 const unsigned int e2(
863 for (
unsigned int q = 0;
q < n_q_points; ++
q)
865 data.edge_sigma_values[m][
q] =
867 data.edge_lambda_values[m][
q] = lambda[
q][
e1] + lambda[
q][
e2];
874 for (
unsigned int q = 0;
q < n_q_points; ++
q)
879 data.edge_lambda_grads_3d[0][
q] = {z - 1.0, 0.0,
x - 1.0};
880 data.edge_lambda_grads_3d[1][
q] = {1.0 - z, 0.0, -
x};
881 data.edge_lambda_grads_3d[2][
q] = {0.0, z - 1.0,
y - 1.0};
882 data.edge_lambda_grads_3d[3][
q] = {0.0, 1.0 - z, -
y};
883 data.edge_lambda_grads_3d[4][
q] = {-z, 0.0, 1.0 -
x};
884 data.edge_lambda_grads_3d[5][
q] = {z, 0.0,
x};
885 data.edge_lambda_grads_3d[6][
q] = {0.0, -z, 1.0 -
y};
886 data.edge_lambda_grads_3d[7][
q] = {0.0, z,
y};
887 data.edge_lambda_grads_3d[8][
q] = {
y - 1.0,
x - 1.0, 0.0};
888 data.edge_lambda_grads_3d[9][
q] = {1.0 -
y, -
x, 0.0};
889 data.edge_lambda_grads_3d[10][
q] = {-
y, 1.0 -
x, 0.0};
890 data.edge_lambda_grads_3d[11][
q] = {
y,
x, 0.0};
895 1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1};
914 for (
unsigned int m = 0; m < lines_per_cell; ++m)
929 data.face_lambda_values.resize(faces_per_cell,
930 std::vector<double>(n_q_points));
931 data.face_lambda_grads.resize(faces_per_cell,
932 std::vector<double>(dim));
935 for (
unsigned int q = 0;
q < n_q_points; ++
q)
940 data.face_lambda_values[0][
q] = 1.0 -
x;
941 data.face_lambda_values[1][
q] =
x;
942 data.face_lambda_values[2][
q] = 1.0 -
y;
943 data.face_lambda_values[3][
q] =
y;
944 data.face_lambda_values[4][
q] = 1.0 - z;
945 data.face_lambda_values[5][
q] = z;
949 data.face_lambda_grads[0] = {-1.0, 0.0, 0.0};
950 data.face_lambda_grads[1] = {1.0, 0.0, 0.0};
951 data.face_lambda_grads[2] = {0.0, -1.0, 0.0};
952 data.face_lambda_grads[3] = {0.0, 1.0, 0.0};
953 data.face_lambda_grads[4] = {0.0, 0.0, -1.0};
954 data.face_lambda_grads[5] = {0.0, 0.0, 1.0};
980 degree * degree * degree);
982 degree * degree * degree);
993 degree * degree * degree);
1001 for (
unsigned int q = 0;
q < n_q_points; ++
q)
1003 for (
unsigned int d = 0; d < dim; ++d)
1019 for (
unsigned int q = 0;
q < n_q_points; ++
q)
1027 std::vector<std::vector<double>>
polyx(
1029 std::vector<std::vector<double>>
polyy(
1031 std::vector<std::vector<double>>
polyz(
1033 for (
unsigned int i = 0; i < degree; ++i)
1036 IntegratedLegendrePolynomials[i + 2].value(
1038 IntegratedLegendrePolynomials[i + 2].value(
1040 IntegratedLegendrePolynomials[i + 2].value(
1046 for (
unsigned int k = 0;
k < degree; ++
k)
1048 const unsigned int shift_k(
k * degree * degree);
1052 for (
unsigned int j = 0;
j < degree; ++
j)
1055 for (
unsigned int i = 0; i < degree; ++i)
1124 for (
unsigned int k = 0;
k < degree; ++
k)
1126 const unsigned int shift_k(
k * degree * degree);
1130 for (
unsigned int j = 0;
j < degree; ++
j)
1133 for (
unsigned int i = 0; i < degree; ++i)
1174 for (
unsigned int d = 0; d < dim; ++d)
1205 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
1207 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
1239 for (
unsigned int k = 0;
k < degree; ++
k)
1241 const unsigned int shift_k(
k * degree * degree);
1246 for (
unsigned int j = 0;
j < degree; ++
j)
1249 for (
unsigned int i = 0; i < degree; ++i)
1339 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
1341 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
1385 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
1387 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
1389 for (
unsigned int d3 = 0;
d3 < dim; ++
d3)
1449template <
int dim,
int spacedim>
1450std::unique_ptr<typename ::FiniteElement<dim, spacedim>::InternalDataBase>
1460 typename ::FiniteElement<dim, spacedim>::InternalDataBase>
1461 data_ptr = std::make_unique<InternalData>();
1463 const unsigned int n_q_points = quadrature.size();
1464 std::vector<Point<dim>>
p_list(n_q_points);
1465 p_list = quadrature.get_points();
1474template <
int dim,
int spacedim>
1495 const unsigned int n_q_points = quadrature.size();
1500 this->n_dofs_per_cell()));
1506 const unsigned int degree(
1515 std::vector<std::vector<unsigned int>>
edge_order(
1528 std::vector<int>
edge_sign(lines_per_cell);
1529 for (
unsigned int m = 0; m < lines_per_cell; ++m)
1541 if (cell->face(m)->at_boundary() ==
false)
1542 if (cell->neighbor_is_coarser(m))
1595 std::vector<std::vector<double>> edge_sigma_values(
1597 std::vector<std::vector<double>> edge_sigma_grads(
1600 std::vector<std::vector<double>> edge_lambda_values(
1606 for (
unsigned int m = 0; m < lines_per_cell; ++m)
1608 std::transform(edge_sigma_values[m].begin(),
1609 edge_sigma_values[m].end(),
1610 edge_sigma_values[m].begin(),
1615 std::transform(edge_sigma_grads[m].begin(),
1616 edge_sigma_grads[m].end(),
1617 edge_sigma_grads[m].begin(),
1632 for (
unsigned int m = 0; m < lines_per_cell; ++m)
1634 const unsigned int shift_m(m * this->n_dofs_per_line());
1635 for (
unsigned int q = 0;
q < n_q_points; ++
q)
1638 std::vector<std::vector<double>> poly(
1640 for (
unsigned int i = 1; i < degree + 1; ++i)
1645 IntegratedLegendrePolynomials[i + 1].value(
1646 edge_sigma_values[m][
q], poly[i - 1]);
1651 for (
unsigned int d = 0; d < dim; ++d)
1654 0.5 * edge_sigma_grads[m][d] *
1655 edge_lambda_values[m][
q];
1658 for (
unsigned int i = 1; i < degree + 1; ++i)
1661 const unsigned int dof_index(i +
shift_m);
1662 for (
unsigned int d = 0; d < dim; ++d)
1665 edge_sigma_grads[m][d] *
1667 edge_lambda_values[m][
q] +
1676 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
1678 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
1683 0.5 * edge_sigma_grads[m][
d1] *
1688 for (
unsigned int i = 1; i < degree + 1; ++i)
1691 const unsigned int dof_index(i +
shift_m);
1694 edge_sigma_grads[m][0] *
1695 edge_sigma_grads[m][0] *
1699 (edge_sigma_grads[m][0] *
1701 edge_sigma_grads[m][1] *
1709 edge_sigma_grads[m][1] *
1710 edge_sigma_grads[m][1] *
1717 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
1719 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
1721 for (
unsigned int d3 = 0;
d3 < dim; ++
d3)
1730 for (
unsigned int i = 0; i < degree; ++i)
1732 const unsigned int dof_index(i + 1 +
shift_m);
1734 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
1736 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
1738 for (
unsigned int d3 = 0;
d3 < dim; ++
d3)
1742 edge_sigma_grads[m][
d1] *
1743 edge_sigma_grads[m][
d2] *
1744 edge_sigma_grads[m][
d3] *
1746 edge_lambda_values[m][
q] +
1748 (edge_sigma_grads[m][
d1] *
1749 edge_sigma_grads[m][
d2] *
1751 edge_sigma_grads[m][
d3] *
1752 edge_sigma_grads[m][
d1] *
1754 edge_sigma_grads[m][
d3] *
1755 edge_sigma_grads[m][
d2] *
1774 std::vector<int>
edge_sign(lines_per_cell);
1775 for (
unsigned int m = 0; m < lines_per_cell; ++m)
1798 for (
unsigned int f = 0; f < 6; ++f)
1799 if (cell->face(f)->at_boundary() ==
false)
1800 if (cell->neighbor_is_coarser(f))
1801 for (
unsigned int m = 0; m < 4; ++m)
1812 cell->parent()->vertex_index(
v0_loc);
1814 cell->parent()->vertex_index(
v1_loc);
1857 for (
unsigned int f = 0; f < 6; ++f)
1859 if (!cell->face(f)->at_boundary() &&
1861 if (!cell->neighbor_is_coarser(f) &&
1863 if (!cell->neighbor(f)
1866 if (cell->neighbor(f)->neighbor_is_coarser(
1878 cell->parent()->vertex_index(
v0_loc);
1880 cell->parent()->vertex_index(
v1_loc);
1895 if (!cell->face(f)->at_boundary() &&
1897 if (!cell->neighbor_is_coarser(f) &&
1899 if (!cell->neighbor(f)
1902 if (cell->neighbor(f)->neighbor_is_coarser(
1914 cell->parent()->vertex_index(
v0_loc);
1916 cell->parent()->vertex_index(
v1_loc);
1969 std::vector<std::vector<double>> edge_sigma_values(
1971 std::vector<std::vector<double>> edge_lambda_values(
1973 std::vector<std::vector<double>> edge_sigma_grads(
1977 std::vector<std::vector<std::vector<double>>>
1981 for (
unsigned int m = 0; m < lines_per_cell; ++m)
1983 std::transform(edge_sigma_values[m].begin(),
1984 edge_sigma_values[m].end(),
1985 edge_sigma_values[m].begin(),
1989 std::transform(edge_sigma_grads[m].begin(),
1990 edge_sigma_grads[m].end(),
1991 edge_sigma_grads[m].begin(),
2006 std::vector<std::vector<double>> poly(
2008 for (
unsigned int m = 0; m < lines_per_cell; ++m)
2010 const unsigned int shift_m(m * this->n_dofs_per_line());
2011 for (
unsigned int q = 0;
q < n_q_points; ++
q)
2017 for (
unsigned int i = 0; i < degree; ++i)
2019 IntegratedLegendrePolynomials[i + 2].value(
2020 edge_sigma_values[m][
q], poly[i]);
2026 for (
unsigned int d = 0; d < dim; ++d)
2029 0.5 * edge_sigma_grads[m][d] *
2030 edge_lambda_values[m][
q];
2035 for (
unsigned int i = 0; i < degree; ++i)
2037 const unsigned int dof_index(i + 1 +
shift_m);
2038 for (
unsigned int d = 0; d < dim; ++d)
2041 edge_sigma_grads[m][d] * poly[i][1] *
2042 edge_lambda_values[m][
q] +
2051 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
2053 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
2056 0.5 * edge_sigma_grads[m][
d1] *
2063 for (
unsigned int i = 0; i < degree; ++i)
2065 const unsigned int dof_index(i + 1 +
shift_m);
2067 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
2069 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
2073 edge_sigma_grads[m][
d1] *
2074 edge_sigma_grads[m][
d2] *
2076 edge_lambda_values[m][
q] +
2077 (edge_sigma_grads[m][
d1] *
2079 edge_sigma_grads[m][
d2] *
2082 edge_lambda_gradgrads_3d[m][
d1]
2093 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
2095 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
2097 for (
unsigned int d3 = 0;
d3 < dim; ++
d3)
2101 0.5 * edge_sigma_grads[m][
d1] *
2102 edge_lambda_gradgrads_3d[m][
d3][
d2];
2110 for (
unsigned int i = 0; i < degree; ++i)
2112 const unsigned int dof_index(i + 1 +
shift_m);
2114 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
2116 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
2118 for (
unsigned int d3 = 0;
d3 < dim;
2124 edge_sigma_grads[m][
d1] *
2125 edge_sigma_grads[m][
d2] *
2126 edge_sigma_grads[m][
d3] *
2128 edge_lambda_values[m][
q] +
2130 (edge_sigma_grads[m][
d1] *
2131 edge_sigma_grads[m][
d2] *
2134 edge_sigma_grads[m][
d3] *
2135 edge_sigma_grads[m][
d1] *
2138 edge_sigma_grads[m][
d3] *
2139 edge_sigma_grads[m][
d2] *
2143 (edge_sigma_grads[m][
d1] *
2144 edge_lambda_gradgrads_3d
2146 edge_sigma_grads[m][
d2] *
2147 edge_lambda_gradgrads_3d
2149 edge_sigma_grads[m][
d3] *
2150 edge_lambda_gradgrads_3d
2172template <
int dim,
int spacedim>
2192 const unsigned int degree(
2203 const unsigned int n_q_points = quadrature.size();
2208 this->n_dofs_per_cell()));
2215 const unsigned int vertices_per_face(
2224 std::vector<std::vector<unsigned int>> face_orientation(
2225 faces_per_cell, std::vector<unsigned int>(vertices_per_face));
2235 {1, 2}, {0, 3}, {3, 0}, {2, 1}};
2237 for (
unsigned int m = 0; m < faces_per_cell; ++m)
2241 if (cell->face(m)->at_boundary() ==
false)
2242 if (cell->neighbor_is_coarser(m))
2254 unsigned int current_glob = cell->parent()->vertex_index(
2256 for (
unsigned int v = 1; v < vertices_per_face; ++v)
2259 cell->parent()->vertex_index(
2274 for (
unsigned int v = 1; v < vertices_per_face; ++v)
2287 face_orientation[m][0] =
2302 if (cell->parent()->vertex_index(
2305 cell->parent()->vertex_index(
2309 face_orientation[m][1] =
2312 face_orientation[m][3] =
2318 face_orientation[m][1] =
2321 face_orientation[m][3] =
2328 if (cell->vertex_index(
2335 face_orientation[m][1] =
2338 face_orientation[m][3] =
2344 face_orientation[m][1] =
2347 face_orientation[m][3] =
2356 faces_per_cell, std::vector<double>(n_q_points));
2358 faces_per_cell, std::vector<double>(dim));
2360 faces_per_cell, std::vector<double>(n_q_points));
2362 faces_per_cell, std::vector<double>(dim));
2364 std::vector<std::vector<double>> face_lambda_values(
2365 faces_per_cell, std::vector<double>(n_q_points));
2366 std::vector<std::vector<double>> face_lambda_grads(
2367 faces_per_cell, std::vector<double>(dim));
2368 for (
unsigned int m = 0; m < faces_per_cell; ++m)
2370 for (
unsigned int q = 0;
q < n_q_points; ++
q)
2374 [face_orientation[m][1]];
2377 [face_orientation[m][3]];
2380 for (
unsigned int d = 0; d < dim; ++d)
2384 [face_orientation[m][1]][d];
2387 [face_orientation[m][3]][d];
2398 std::vector<std::vector<double>>
polyxi(
2400 std::vector<std::vector<double>>
polyeta(
2404 for (
unsigned int m = 0; m < faces_per_cell; ++m)
2407 const unsigned int shift_m(m * this->n_dofs_per_quad(0));
2444 for (
unsigned int q = 0;
q < n_q_points; ++
q)
2453 for (
unsigned int i = 0; i < degree; ++i)
2456 IntegratedLegendrePolynomials[i + 2].value(
2458 IntegratedLegendrePolynomials[i + 2].value(
2464 for (
unsigned int j = 0;
j < degree; ++
j)
2466 const unsigned int shift_j(
j * degree);
2467 for (
unsigned int i = 0; i < degree; ++i)
2473 for (
unsigned int d = 0; d < dim; ++d)
2480 face_lambda_values[m][
q] +
2481 face_lambda_grads[m][d] *
polyxi[i][0] *
2487 for (
unsigned int d = 0; d < dim; ++d)
2494 face_lambda_values[m][
q];
2502 for (
unsigned int d = 0; d < dim; ++d)
2506 face_lambda_values[m][
q];
2510 face_lambda_values[m][
q];
2516 for (
unsigned int j = 0;
j < degree; ++
j)
2518 const unsigned int shift_j(
j * degree);
2519 for (
unsigned int i = 0; i < degree; ++i)
2525 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
2527 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
2542 face_lambda_values[m][
q] +
2547 face_lambda_grads[m][
d1] +
2552 face_lambda_grads[m][
d2];
2558 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
2560 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
2575 face_lambda_values[m][
q] +
2580 face_lambda_grads[m][
d2];
2589 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
2591 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
2596 face_lambda_values[m][
q] +
2602 face_lambda_values[m][
q] +
2603 face_lambda_grads[m][
d2] *
polyxi[
j][0]);
2610 for (
unsigned int j = 0;
j < degree; ++
j)
2612 const unsigned int shift_j(
j * degree);
2613 for (
unsigned int i = 0; i < degree; ++i)
2620 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
2622 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
2624 for (
unsigned int d3 = 0;
d3 < dim; ++
d3)
2633 face_lambda_values[m][
q] +
2635 face_lambda_grads[m][
d2]) +
2638 face_lambda_grads[m][
d1]) +
2644 face_lambda_values[m][
q] +
2648 face_lambda_grads[m][
d3] +
2651 face_lambda_grads[m]
2661 face_lambda_grads[m][
d2] +
2663 face_lambda_grads[m][
d1]) +
2664 face_lambda_grads[m][
d3] *
2673 face_lambda_values[m][
q] *
2700 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
2702 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
2704 for (
unsigned int d3 = 0;
d3 < dim; ++
d3)
2711 face_lambda_grads[m][
d3] +
2713 face_lambda_grads[m][
d2]) +
2716 face_lambda_grads[m][
d3] +
2718 face_lambda_grads[m][
d2]) +
2719 face_lambda_values[m][
q] *
2739 face_lambda_values[m][
q] +
2741 face_lambda_grads[m][
d3]) +
2744 face_lambda_grads[m][
d2]) -
2750 face_lambda_values[m][
q] +
2752 face_lambda_grads[m][
d2]) +
2757 face_lambda_values[m]
2760 face_lambda_grads[m]
2764 face_lambda_values[m][
q]));
2774 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
2776 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
2778 for (
unsigned int d3 = 0;
d3 < dim; ++
d3)
2786 face_lambda_values[m][
q] +
2788 face_lambda_grads[m][
d3]) +
2789 face_lambda_grads[m][
d2] *
2799 face_lambda_values[m][
q] +
2801 face_lambda_grads[m][
d3]) +
2802 face_lambda_grads[m][
d2] *
2817template <
int dim,
int spacedim>
2839 fill_edge_values(cell, quadrature, fe_data);
2840 if (dim == 3 && this->degree > 1)
2842 fill_face_values(cell, quadrature, fe_data);
2846 const unsigned int n_q_points = quadrature.size();
2851 this->n_dofs_per_cell()));
2860 std::vector<Tensor<1, dim>> transformed_shape_values(n_q_points);
2861 for (
unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
2863 const unsigned int first =
2864 data.shape_function_to_row_table[dof * this->n_components() +
2865 this->get_nonzero_components(dof)
2866 .first_selected_component()];
2872 for (
unsigned int q = 0;
q < n_q_points; ++
q)
2874 for (
unsigned int d = 0; d < dim; ++d)
2877 transformed_shape_values[
q][d];
2887 std::vector<Tensor<2, dim>> input(n_q_points);
2888 std::vector<Tensor<2, dim>> transformed_shape_grads(n_q_points);
2889 for (
unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
2891 for (
unsigned int q = 0;
q < n_q_points; ++
q)
2900 const unsigned int first =
2901 data.shape_function_to_row_table[dof * this->n_components() +
2902 this->get_nonzero_components(dof)
2903 .first_selected_component()];
2905 for (
unsigned int q = 0;
q < n_q_points; ++
q)
2907 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
2909 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
2911 transformed_shape_grads[
q][
d1] -=
2918 for (
unsigned int q = 0;
q < n_q_points; ++
q)
2920 for (
unsigned int d = 0; d < dim; ++d)
2923 transformed_shape_grads[
q][d];
2933 std::vector<Tensor<3, dim>> input(n_q_points);
2934 std::vector<Tensor<3, dim>> transformed_shape_hessians(n_q_points);
2935 for (
unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
2937 for (
unsigned int q = 0;
q < n_q_points; ++
q)
2946 const unsigned int first =
2947 data.shape_function_to_row_table[dof * this->n_components() +
2948 this->get_nonzero_components(dof)
2949 .first_selected_component()];
2951 for (
unsigned int q = 0;
q < n_q_points; ++
q)
2953 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
2955 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
2957 for (
unsigned int d3 = 0;
d3 < dim; ++
d3)
2959 for (
unsigned int d4 = 0;
d4 < dim; ++
d4)
2961 transformed_shape_hessians[
q][
d1][
d3][
d4] -=
2984 for (
unsigned int q = 0;
q < n_q_points; ++
q)
2986 for (
unsigned int d = 0; d < dim; ++d)
2989 transformed_shape_hessians[
q][d];
2998template <
int dim,
int spacedim>
3034 fill_edge_values(cell,
3038 if (dim == 3 && this->degree > 1)
3040 fill_face_values(cell,
3042 this->reference_cell(), quadrature[0]),
3047 const unsigned int n_q_points = quadrature[0].
size();
3051 cell->combined_face_orientation(
3059 std::vector<Tensor<1, dim>> transformed_shape_values(n_q_points);
3060 for (
unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
3069 const unsigned int first =
3070 data.shape_function_to_row_table[dof * this->n_components() +
3071 this->get_nonzero_components(dof)
3072 .first_selected_component()];
3074 for (
unsigned int q = 0;
q < n_q_points; ++
q)
3076 for (
unsigned int d = 0; d < dim; ++d)
3079 transformed_shape_values[
q][d];
3088 std::vector<Tensor<2, dim>> input(n_q_points);
3089 std::vector<Tensor<2, dim>> transformed_shape_grads(n_q_points);
3090 for (
unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
3092 for (
unsigned int q = 0;
q < n_q_points; ++
q)
3096 mapping.transform(input,
3101 const unsigned int first =
3102 data.shape_function_to_row_table[dof * this->n_components() +
3103 this->get_nonzero_components(dof)
3104 .first_selected_component()];
3106 for (
unsigned int q = 0;
q < n_q_points; ++
q)
3108 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
3110 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
3112 transformed_shape_grads[
q][
d1] -=
3119 for (
unsigned int q = 0;
q < n_q_points; ++
q)
3121 for (
unsigned int d = 0; d < dim; ++d)
3124 transformed_shape_grads[
q][d];
3133 std::vector<Tensor<3, dim>> input(n_q_points);
3134 std::vector<Tensor<3, dim>> transformed_shape_hessians(n_q_points);
3135 for (
unsigned int dof = 0; dof < this->n_dofs_per_cell(); ++dof)
3137 for (
unsigned int q = 0;
q < n_q_points; ++
q)
3140 mapping.transform(input,
3145 const unsigned int first =
3146 data.shape_function_to_row_table[dof * this->n_components() +
3147 this->get_nonzero_components(dof)
3148 .first_selected_component()];
3150 for (
unsigned int q = 0;
q < n_q_points; ++
q)
3152 for (
unsigned int d1 = 0;
d1 < dim; ++
d1)
3154 for (
unsigned int d2 = 0;
d2 < dim; ++
d2)
3156 for (
unsigned int d3 = 0;
d3 < dim; ++
d3)
3158 for (
unsigned int d4 = 0;
d4 < dim; ++
d4)
3160 transformed_shape_hessians[
q][
d1][
d3][
d4] -=
3183 for (
unsigned int q = 0;
q < n_q_points; ++
q)
3185 for (
unsigned int d = 0; d < dim; ++d)
3188 transformed_shape_hessians[
q][d];
3197template <
int dim,
int spacedim>
3201 const unsigned int ,
3202 const unsigned int ,
3217template <
int dim,
int spacedim>
3243template <
int dim,
int spacedim>
3251 << this->degree - 1 <<
")";
3258template <
int dim,
int spacedim>
3259std::unique_ptr<FiniteElement<dim, dim>>
3262 return std::make_unique<FE_NedelecSZ<dim, spacedim>>(*this);
3267template <
int dim,
int spacedim>
3268std::vector<unsigned int>
3277 std::vector<unsigned int>
dpo;
3280 dpo.push_back(degree + 1);
3282 dpo.push_back(2 * degree * (degree + 1));
3284 dpo.push_back(3 * degree * degree * (degree + 1));
3291template <
int dim,
int spacedim>
3300 return 2 * (degree + 1) * (degree + 2);
3303 return 3 * (degree + 1) * (degree + 2) * (degree + 2);
3315template <
int dim,
int spacedim>
3320 IntegratedLegendrePolynomials =
3326template <
int dim,
int spacedim>
3329 const unsigned int child,
3336 "Prolongation matrices are only available for refined cells!"));
3338 child, this->reference_cell().
template n_children<dim>(refinement_case));
3341 if (this->prolongation[refinement_case - 1][child].n() == 0)
3343 std::lock_guard<std::mutex> lock(prolongation_matrix_mutex);
3346 if (this->prolongation[refinement_case - 1][child].n() ==
3347 this->n_dofs_per_cell())
3348 return this->prolongation[refinement_case - 1][child];
3359 this_nonconst.reinit_restriction_and_prolongation_matrices();
3371 return this->prolongation[refinement_case - 1][child];
3375#include "fe/fe_nedelec_sz.inst"
ArrayView< std::remove_reference_t< typename std::iterator_traits< Iterator >::reference >, MemorySpaceType > make_array_view(const Iterator begin, const Iterator end)
std::vector< std::vector< double > > edge_lambda_grads_2d
std::vector< std::vector< Tensor< 1, dim > > > shape_values
std::vector< std::vector< std::vector< double > > > sigma_imj_values
std::vector< std::vector< double > > edge_sigma_grads
std::vector< std::vector< double > > edge_sigma_values
std::vector< std::vector< DerivativeForm< 2, dim, dim > > > shape_hessians
std::vector< std::vector< std::vector< double > > > sigma_imj_grads
std::vector< std::vector< double > > face_lambda_values
std::vector< std::vector< DerivativeForm< 1, dim, dim > > > shape_grads
std::vector< std::vector< std::vector< double > > > edge_lambda_grads_3d
std::vector< std::vector< double > > edge_lambda_values
std::vector< std::vector< std::vector< double > > > edge_lambda_gradgrads_3d
std::vector< std::vector< double > > face_lambda_grads
void evaluate(const std::vector< Point< dim > > &p_list, const UpdateFlags update_flags, std::unique_ptr< typename ::FiniteElement< dim, spacedim >::InternalDataBase > &data_ptr) const
unsigned int compute_num_dofs(const unsigned int degree) const
virtual void fill_fe_values(const typename Triangulation< dim, dim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const Mapping< dim, dim > &mapping, const typename Mapping< dim, dim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, dim > &mapping_data, const typename FiniteElement< dim, dim >::InternalDataBase &fedata, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, dim > &data) const override
virtual std::unique_ptr< FiniteElement< dim, dim > > clone() const override
virtual void fill_fe_subface_values(const typename Triangulation< dim, dim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Quadrature< dim - 1 > &quadrature, const Mapping< dim, dim > &mapping, const typename Mapping< dim, dim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, dim > &mapping_data, const typename FiniteElement< dim, dim >::InternalDataBase &fedata, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, dim > &data) const override
FE_NedelecSZ(const unsigned int order)
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
static std::vector< unsigned int > get_dpo_vector(const unsigned int degree)
void create_polynomials(const unsigned int degree)
virtual std::unique_ptr< typename ::FiniteElement< dim, spacedim >::InternalDataBase > get_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual void fill_fe_face_values(const typename Triangulation< dim, dim >::cell_iterator &cell, const unsigned int face_no, const hp::QCollection< dim - 1 > &quadrature, const Mapping< dim, dim > &mapping, const typename Mapping< dim, dim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, dim > &mapping_data, const typename FiniteElement< dim, dim >::InternalDataBase &fedata, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, dim > &data) const override
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
virtual std::string get_name() const override
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const override
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const override
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
void fill_face_values(const typename Triangulation< dim, dim >::cell_iterator &cell, const Quadrature< dim > &quadrature, const InternalData &fedata) const
void fill_edge_values(const typename Triangulation< dim, dim >::cell_iterator &cell, const Quadrature< dim > &quadrature, const InternalData &fedata) const
virtual double shape_value(const unsigned int i, const Point< dim > &p) const override
const unsigned int degree
unsigned int n_dofs_per_face(unsigned int face_no=0, unsigned int child=0) const
unsigned int n_components() const
unsigned int n_unique_faces() const
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > component_to_base_table
FullMatrix< double > interface_constraints
static std::vector< Polynomials::Polynomial< double > > generate_complete_basis(const unsigned int degree)
static DataSetDescriptor face(const ReferenceCell &reference_cell, const unsigned int face_no, const bool face_orientation, const bool face_flip, const bool face_rotation, const unsigned int n_quadrature_points)
unsigned int size() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcMessage(std::string arg1)
@ update_jacobian_pushed_forward_2nd_derivatives
@ update_jacobian_pushed_forward_grads
@ update_hessians
Second derivatives of shape functions.
@ update_values
Shape function values.
@ update_covariant_transformation
Covariant transformation.
@ update_gradients
Shape function gradients.
@ update_default
No update.
@ mapping_covariant_gradient
@ mapping_covariant_hessian
#define DEAL_II_NOT_IMPLEMENTED()
std::vector< index_type > data
std::string dim_string(const int dim, const int spacedim)
::VectorizedArray< Number, width > exp(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > pow(const ::VectorizedArray< Number, width > &, const Number p)
static unsigned int face_to_cell_vertices(const unsigned int face, const unsigned int vertex, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false)
static unsigned int line_to_cell_vertices(const unsigned int line, const unsigned int vertex)
static unsigned int face_to_cell_lines(const unsigned int face, const unsigned int line, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false)