37 count_nonzeros(
const std::vector<unsigned int> &vec)
39 return std::count_if(vec.begin(), vec.end(), [](
const unsigned int i) {
52 template <
int dim,
int spacedim = dim>
55 const unsigned int base_no)
63 unsigned int out_index = 0;
64 for (
unsigned int system_index = 0; system_index < fe.
n_dofs_per_cell();
71 const unsigned int base_component =
73 const unsigned int base_index =
78 table[base_component][base_index] = out_index;
89 template <
int dim,
int spacedim = dim>
90 std::vector<typename FESystem<dim, spacedim>::BaseOffsets>
92 const unsigned int base_no)
94 std::vector<typename FESystem<dim, spacedim>::BaseOffsets> table;
97 unsigned int out_index = 0;
98 for (
unsigned int system_index = 0; system_index < fe.
n_dofs_per_cell();
103 const unsigned int base_index =
106 table.emplace_back();
108 table.back().n_nonzero_components =
110 unsigned int in_index = 0;
111 for (
unsigned int i = 0; i < base_index; ++i)
114 table.back().in_index = in_index;
115 table.back().out_index = out_index;
130 template <
int dim,
int spacedim = dim>
134 const unsigned int base_no,
144 const unsigned int n_dofs_per_cell =
147 auto copy_row = [](
const auto &row_in,
const auto &row_out) {
148 std::copy(row_in.begin(), row_in.end(), row_out.begin());
152 for (
unsigned int component = 0; component < n_components; ++component)
153 for (
unsigned int b = 0; b < n_dofs_per_cell; ++b)
156 output_data.
shape_values[base_to_system_table[component][b]]);
159 for (
unsigned int component = 0; component < n_components; ++component)
160 for (
unsigned int b = 0; b < n_dofs_per_cell; ++b)
166 for (
unsigned int component = 0; component < n_components; ++component)
167 for (
unsigned int b = 0; b < n_dofs_per_cell; ++b)
173 for (
unsigned int component = 0; component < n_components; ++component)
174 for (
unsigned int b = 0; b < n_dofs_per_cell; ++b)
185 template <
int dim,
int spacedim = dim>
189 const unsigned int base_no,
190 const unsigned int n_q_points,
200 for (
const auto &offset : offsets)
203 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
204 for (
unsigned int q = 0; q < n_q_points; ++q)
209 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
210 for (
unsigned int q = 0; q < n_q_points; ++q)
215 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
216 for (
unsigned int q = 0; q < n_q_points; ++q)
221 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
222 for (
unsigned int q = 0; q < n_q_points; ++q)
232template <
int dim,
int spacedim>
234 const unsigned int n_base_elements)
235 : base_fe_datas(n_base_elements)
236 , base_fe_output_objects(n_base_elements)
241template <
int dim,
int spacedim>
250template <
int dim,
int spacedim>
253 const unsigned int base_no)
const
256 return *base_fe_datas[base_no];
261template <
int dim,
int spacedim>
264 const unsigned int base_no,
268 base_fe_datas[base_no] = std::move(ptr);
273template <
int dim,
int spacedim>
276 const unsigned int base_no)
const
279 return base_fe_output_objects[base_no];
287template <
int dim,
int spacedim>
291template <
int dim,
int spacedim>
293 const unsigned int n_elements)
301 FETools::Compositing::compute_nonzero_components<dim, spacedim>(
304 , base_elements((n_elements > 0))
306 const std::vector<const FiniteElement<dim, spacedim> *> fes = {&fe};
307 const std::vector<unsigned int> multiplicities = {n_elements};
308 initialize(fes, multiplicities);
313template <
int dim,
int spacedim>
315 const unsigned int n1,
317 const unsigned int n2)
325 FETools::Compositing::compute_nonzero_components<dim, spacedim>({&fe1,
328 , base_elements(
static_cast<int>(n1 > 0) +
static_cast<int>(n2 > 0))
330 const std::vector<const FiniteElement<dim, spacedim> *> fes = {&fe1, &fe2};
331 const std::vector<unsigned int> multiplicities = {n1, n2};
332 initialize(fes, multiplicities);
337template <
int dim,
int spacedim>
339 const unsigned int n1,
341 const unsigned int n2,
343 const unsigned int n3)
352 FETools::Compositing::compute_nonzero_components<dim, spacedim>(
355 , base_elements(
static_cast<int>(n1 > 0) +
static_cast<int>(n2 > 0) +
356 static_cast<int>(n3 > 0))
358 const std::vector<const FiniteElement<dim, spacedim> *> fes = {&fe1,
361 const std::vector<unsigned int> multiplicities = {n1, n2, n3};
362 initialize(fes, multiplicities);
367template <
int dim,
int spacedim>
369 const unsigned int n1,
371 const unsigned int n2,
373 const unsigned int n3,
375 const unsigned int n4)
378 {&fe1, &fe2, &fe3, &fe4},
382 {&fe1, &fe2, &fe3, &fe4},
384 FETools::Compositing::compute_nonzero_components<dim, spacedim>(
385 {&fe1, &fe2, &fe3, &fe4},
387 , base_elements(
static_cast<int>(n1 > 0) +
static_cast<int>(n2 > 0) +
388 static_cast<int>(n3 > 0) +
static_cast<int>(n4 > 0))
390 const std::vector<const FiniteElement<dim, spacedim> *> fes = {&fe1,
394 const std::vector<unsigned int> multiplicities = {n1, n2, n3, n4};
395 initialize(fes, multiplicities);
400template <
int dim,
int spacedim>
402 const unsigned int n1,
404 const unsigned int n2,
406 const unsigned int n3,
408 const unsigned int n4,
410 const unsigned int n5)
413 {&fe1, &fe2, &fe3, &fe4, &fe5},
414 {n1, n2, n3, n4, n5}),
417 {&fe1, &fe2, &fe3, &fe4, &fe5},
418 {n1, n2, n3, n4, n5}),
419 FETools::Compositing::compute_nonzero_components<dim, spacedim>(
420 {&fe1, &fe2, &fe3, &fe4, &fe5},
421 {n1, n2, n3, n4, n5}))
422 , base_elements(
static_cast<int>(n1 > 0) +
static_cast<int>(n2 > 0) +
423 static_cast<int>(n3 > 0) +
static_cast<int>(n4 > 0) +
424 static_cast<int>(n5 > 0))
426 const std::vector<const FiniteElement<dim, spacedim> *> fes = {
427 &fe1, &fe2, &fe3, &fe4, &fe5};
428 const std::vector<unsigned int> multiplicities = {n1, n2, n3, n4, n5};
429 initialize(fes, multiplicities);
434template <
int dim,
int spacedim>
437 const std::vector<unsigned int> &multiplicities)
444 , base_elements(count_nonzeros(multiplicities))
446 initialize(fes, multiplicities);
451template <
int dim,
int spacedim>
462 std::ostringstream namebuf;
465 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
467 namebuf << base_element(i).get_name();
468 if (this->element_multiplicity(i) != 1)
469 namebuf <<
'^' << this->element_multiplicity(i);
470 if (i != this->n_base_elements() - 1)
475 return namebuf.str();
480template <
int dim,
int spacedim>
481std::unique_ptr<FiniteElement<dim, spacedim>>
484 std::vector<const FiniteElement<dim, spacedim> *> fes;
485 std::vector<unsigned int> multiplicities;
487 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
489 fes.push_back(&base_element(i));
490 multiplicities.push_back(this->element_multiplicity(i));
492 return std::make_unique<FESystem<dim, spacedim>>(fes, multiplicities);
497template <
int dim,
int spacedim>
500 const unsigned int first_component,
501 const unsigned int n_selected_components)
const
503 Assert(first_component + n_selected_components <= this->n_components(),
504 ExcMessage(
"Invalid arguments (not a part of this FiniteElement)."));
507 if ((first_component == 0) && (n_selected_components == this->n_components()))
511 const unsigned int base_index =
512 this->component_to_base_table[first_component].first.first;
513 const unsigned int component_in_base =
514 this->component_to_base_table[first_component].first.second;
515 const unsigned int base_components =
516 this->base_element(base_index).n_components();
518 if (n_selected_components <= base_components)
519 return this->base_element(base_index)
520 .get_sub_fe(component_in_base, n_selected_components);
525 std::to_string(n_selected_components) +
526 " components starting at component " +
527 std::to_string(first_component) +
528 " because these components are not jointly a "
529 "sub-element of the current element. Sub-elements "
530 "are the elements provided to the constructor "
538template <
int dim,
int spacedim>
544 Assert(this->is_primitive(i),
548 return (base_element(this->system_to_base_table[i].
first.first)
549 .shape_value(this->system_to_base_table[i].second, p));
554template <
int dim,
int spacedim>
557 const unsigned int i,
559 const unsigned int component)
const
566 if (this->nonzero_components[i][component] ==
false)
574 const unsigned int base = this->component_to_base_index(component).first;
575 const unsigned int component_in_base =
576 this->component_to_base_index(component).second;
584 return (base_element(base).shape_value_component(
585 this->system_to_base_table[i].
second, p, component_in_base));
590template <
int dim,
int spacedim>
596 Assert(this->is_primitive(i),
600 return (base_element(this->system_to_base_table[i].
first.first)
601 .shape_grad(this->system_to_base_table[i].second, p));
606template <
int dim,
int spacedim>
609 const unsigned int i,
611 const unsigned int component)
const
617 if (this->nonzero_components[i][component] ==
false)
622 const unsigned int base = this->component_to_base_index(component).first;
623 const unsigned int component_in_base =
624 this->component_to_base_index(component).second;
629 return (base_element(base).shape_grad_component(
630 this->system_to_base_table[i].
second, p, component_in_base));
635template <
int dim,
int spacedim>
641 Assert(this->is_primitive(i),
645 return (base_element(this->system_to_base_table[i].
first.first)
646 .shape_grad_grad(this->system_to_base_table[i].second, p));
651template <
int dim,
int spacedim>
654 const unsigned int i,
656 const unsigned int component)
const
662 if (this->nonzero_components[i][component] ==
false)
667 const unsigned int base = this->component_to_base_index(component).first;
668 const unsigned int component_in_base =
669 this->component_to_base_index(component).second;
674 return (base_element(base).shape_grad_grad_component(
675 this->system_to_base_table[i].
second, p, component_in_base));
680template <
int dim,
int spacedim>
686 Assert(this->is_primitive(i),
690 return (base_element(this->system_to_base_table[i].
first.first)
691 .shape_3rd_derivative(this->system_to_base_table[i].second, p));
696template <
int dim,
int spacedim>
699 const unsigned int i,
701 const unsigned int component)
const
707 if (this->nonzero_components[i][component] ==
false)
712 const unsigned int base = this->component_to_base_index(component).first;
713 const unsigned int component_in_base =
714 this->component_to_base_index(component).second;
719 return (base_element(base).shape_3rd_derivative_component(
720 this->system_to_base_table[i].
second, p, component_in_base));
725template <
int dim,
int spacedim>
731 Assert(this->is_primitive(i),
735 return (base_element(this->system_to_base_table[i].
first.first)
736 .shape_4th_derivative(this->system_to_base_table[i].second, p));
741template <
int dim,
int spacedim>
744 const unsigned int i,
746 const unsigned int component)
const
752 if (this->nonzero_components[i][component] ==
false)
757 const unsigned int base = this->component_to_base_index(component).first;
758 const unsigned int component_in_base =
759 this->component_to_base_index(component).second;
764 return (base_element(base).shape_4th_derivative_component(
765 this->system_to_base_table[i].
second, p, component_in_base));
770template <
int dim,
int spacedim>
780 Assert((interpolation_matrix.
m() == this->n_dofs_per_cell()) ||
783 this->n_dofs_per_cell()));
785 (this->n_dofs_per_cell() == 0),
795 (x_source_fe.
get_name().find(
"FESystem<") == 0) ||
809 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
813 spacedim>::ExcInterpolationNotImplemented()));
822 std::vector<FullMatrix<double>> base_matrices(this->n_base_elements());
823 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
825 base_matrices[i].reinit(base_element(i).n_dofs_per_cell(),
827 base_element(i).get_interpolation_matrix(source_fe.
base_element(i),
834 interpolation_matrix = 0;
835 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
837 if (this->system_to_base_table[i].
first ==
839 interpolation_matrix(i, j) =
840 (base_matrices[this->system_to_base_table[i].first.first](
841 this->system_to_base_table[i].second,
847template <
int dim,
int spacedim>
850 const unsigned int child,
857 "Restriction matrices are only available for refined cells!"));
863 if (this->restriction[refinement_case - 1][child].n() == 0)
865 std::scoped_lock lock(restriction_matrix_mutex);
868 if (this->restriction[refinement_case - 1][child].n() ==
869 this->n_dofs_per_cell())
870 return this->restriction[refinement_case - 1][child];
873 std::vector<const FullMatrix<double> *> base_matrices(
874 this->n_base_elements());
876 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
879 &base_element(i).get_restriction_matrix(child, refinement_case);
881 Assert(base_matrices[i]->n() == base_element(i).n_dofs_per_cell(),
886 this->n_dofs_per_cell());
896 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
897 for (
unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
904 if (this->system_to_base_table[i].
first !=
905 this->system_to_base_table[j].
first)
909 const unsigned int base = this->system_to_base_table[i].first.first;
911 const unsigned int base_index_i =
912 this->system_to_base_table[i].second,
914 this->system_to_base_table[j].second;
919 (*base_matrices[base])(base_index_i, base_index_j);
923 this->restriction[refinement_case - 1][child]) = std::move(restriction);
926 return this->restriction[refinement_case - 1][child];
931template <
int dim,
int spacedim>
934 const unsigned int child,
941 "Restriction matrices are only available for refined cells!"));
946 if (this->prolongation[refinement_case - 1][child].n() == 0)
948 std::scoped_lock lock(prolongation_matrix_mutex);
950 if (this->prolongation[refinement_case - 1][child].n() ==
951 this->n_dofs_per_cell())
952 return this->prolongation[refinement_case - 1][child];
954 std::vector<const FullMatrix<double> *> base_matrices(
955 this->n_base_elements());
956 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
959 &base_element(i).get_prolongation_matrix(child, refinement_case);
961 Assert(base_matrices[i]->n() == base_element(i).n_dofs_per_cell(),
966 this->n_dofs_per_cell());
968 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
969 for (
unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
971 if (this->system_to_base_table[i].
first !=
972 this->system_to_base_table[j].
first)
974 const unsigned int base = this->system_to_base_table[i].first.first;
976 const unsigned int base_index_i =
977 this->system_to_base_table[i].second,
979 this->system_to_base_table[j].second;
981 (*base_matrices[base])(base_index_i, base_index_j);
985 this->prolongation[refinement_case - 1][child]) = std::move(prolongate);
988 return this->prolongation[refinement_case - 1][child];
992template <
int dim,
int spacedim>
995 const unsigned int face_dof_index,
996 const unsigned int face,
1002 const std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>
1003 face_base_index = this->face_system_to_base_index(face_dof_index, face);
1005 const unsigned int base_face_to_cell_index =
1006 this->base_element(face_base_index.first.first)
1007 .face_to_cell_index(face_base_index.second, face, combined_orientation);
1014 const std::pair<std::pair<unsigned int, unsigned int>,
unsigned int> target =
1015 std::make_pair(face_base_index.first, base_face_to_cell_index);
1016 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
1017 if (this->system_to_base_index(i) == target)
1032template <
int dim,
int spacedim>
1039 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1040 out |= base_element(base_no).requires_update_flags(flags);
1046template <
int dim,
int spacedim>
1047std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1063 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1064 data_ptr = std::make_unique<InternalData>(this->n_base_elements());
1065 auto &
data =
dynamic_cast<InternalData &
>(*data_ptr);
1066 data.update_each = requires_update_flags(flags);
1080 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1083 &base_fe_output_object =
data.get_fe_output_object(base_no);
1086 base_element(base_no),
1087 flags | base_element(base_no).requires_update_flags(flags));
1095 auto base_fe_data = base_element(base_no).get_data(flags,
1098 base_fe_output_object);
1100 data.set_fe_data(base_no, std::move(base_fe_data));
1109template <
int dim,
int spacedim>
1110std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1126 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1127 data_ptr = std::make_unique<InternalData>(this->n_base_elements());
1128 auto &
data =
dynamic_cast<InternalData &
>(*data_ptr);
1129 data.update_each = requires_update_flags(flags);
1143 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1146 &base_fe_output_object =
data.get_fe_output_object(base_no);
1149 base_element(base_no),
1150 flags | base_element(base_no).requires_update_flags(flags));
1158 auto base_fe_data = base_element(base_no).get_face_data(
1159 flags, mapping, quadrature, base_fe_output_object);
1161 data.set_fe_data(base_no, std::move(base_fe_data));
1172template <
int dim,
int spacedim>
1173std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1189 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1190 data_ptr = std::make_unique<InternalData>(this->n_base_elements());
1191 auto &
data =
dynamic_cast<InternalData &
>(*data_ptr);
1193 data.update_each = requires_update_flags(flags);
1207 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1210 &base_fe_output_object =
data.get_fe_output_object(base_no);
1213 base_element(base_no),
1214 flags | base_element(base_no).requires_update_flags(flags));
1222 auto base_fe_data = base_element(base_no).get_subface_data(
1223 flags, mapping, quadrature, base_fe_output_object);
1225 data.set_fe_data(base_no, std::move(base_fe_data));
1233template <
int dim,
int spacedim>
1248 compute_fill(mapping,
1250 invalid_face_number,
1251 invalid_face_number,
1262template <
int dim,
int spacedim>
1266 const unsigned int face_no,
1277 compute_fill(mapping,
1280 invalid_face_number,
1291template <
int dim,
int spacedim>
1295 const unsigned int face_no,
1296 const unsigned int sub_no,
1307 compute_fill(mapping,
1321template <
int dim,
int spacedim>
1322template <
class Q_or_QC>
1327 const unsigned int face_no,
1328 const unsigned int sub_no,
1329 const Q_or_QC &quadrature,
1342 Assert(
dynamic_cast<const InternalData *
>(&fe_internal) !=
nullptr,
1344 const InternalData &fe_data =
static_cast<const InternalData &
>(fe_internal);
1361 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1365 fe_data.get_fe_data(base_no);
1368 &base_data = fe_data.get_fe_output_object(base_no);
1374 const Quadrature<dim - 1> *sub_face_quadrature =
nullptr;
1378 if (face_no == invalid_face_number)
1383 n_q_points = cell_quadrature->
size();
1385 else if (sub_no == invalid_face_number)
1394 (*face_quadrature)[face_quadrature->size() == 1 ? 0 : face_no]
1399 sub_face_quadrature =
1400 dynamic_cast<const Quadrature<dim - 1
> *>(&quadrature);
1403 n_q_points = sub_face_quadrature->size();
1415 if (face_no == invalid_face_number)
1424 else if (sub_no == invalid_face_number)
1437 *sub_face_quadrature,
1455 primitive_offset_tables[base_no],
1466 nonprimitive_offset_tables[base_no],
1474template <
int dim,
int spacedim>
1482 for (
unsigned int base = 0; base < this->n_base_elements(); ++base)
1483 if (base_element(base).constraints_are_implemented() ==
false)
1489 const unsigned int face_no = 0;
1491 this->interface_constraints.TableBase<2, double>::reinit(
1492 this->interface_constraints_size());
1502 for (
unsigned int n = 0; n < this->interface_constraints.n(); ++n)
1503 for (
unsigned int m = 0; m < this->interface_constraints.m(); ++m)
1512 const std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>
1513 n_index = this->face_system_to_base_table[face_no][n];
1517 std::pair<std::pair<unsigned int, unsigned int>,
unsigned int> m_index;
1534 if (m < this->n_dofs_per_vertex())
1535 m_index = this->system_to_base_table[m];
1539 const unsigned int index_in_line =
1540 (m - this->n_dofs_per_vertex()) % this->n_dofs_per_line();
1541 const unsigned int sub_line =
1542 (m - this->n_dofs_per_vertex()) / this->n_dofs_per_line();
1549 const unsigned int tmp1 =
1550 2 * this->n_dofs_per_vertex() + index_in_line;
1552 this->face_system_to_base_table[face_no][tmp1].first;
1564 this->face_system_to_base_table[face_no][tmp1].
second >=
1566 base_element(m_index.first.first).n_dofs_per_vertex(),
1568 const unsigned int tmp2 =
1569 this->face_system_to_base_table[face_no][tmp1].second -
1570 2 * base_element(m_index.first.first).n_dofs_per_vertex();
1571 Assert(tmp2 < base_element(m_index.first.first)
1575 base_element(m_index.first.first).n_dofs_per_vertex() +
1576 base_element(m_index.first.first).n_dofs_per_line() *
1586 ReferenceCells::get_hypercube<dim>(),
1594 if (m < 5 * this->n_dofs_per_vertex())
1595 m_index = this->system_to_base_table[m];
1598 if (m < 5 * this->n_dofs_per_vertex() +
1599 12 * this->n_dofs_per_line())
1602 const unsigned int index_in_line =
1603 (m - 5 * this->n_dofs_per_vertex()) %
1604 this->n_dofs_per_line();
1605 const unsigned int sub_line =
1606 (m - 5 * this->n_dofs_per_vertex()) /
1607 this->n_dofs_per_line();
1610 const unsigned int tmp1 =
1611 4 * this->n_dofs_per_vertex() + index_in_line;
1613 this->face_system_to_base_table[face_no][tmp1].first;
1616 this->face_system_to_base_table[face_no][tmp1].
second >=
1617 4 * base_element(m_index.first.first)
1618 .n_dofs_per_vertex(),
1620 const unsigned int tmp2 =
1621 this->face_system_to_base_table[face_no][tmp1].second -
1623 base_element(m_index.first.first).n_dofs_per_vertex();
1624 Assert(tmp2 < base_element(m_index.first.first)
1628 5 * base_element(m_index.first.first)
1629 .n_dofs_per_vertex() +
1630 base_element(m_index.first.first).n_dofs_per_line() *
1638 const unsigned int index_in_quad =
1639 (m - 5 * this->n_dofs_per_vertex() -
1640 12 * this->n_dofs_per_line()) %
1641 this->n_dofs_per_quad(face_no);
1642 Assert(index_in_quad < this->n_dofs_per_quad(face_no),
1644 const unsigned int sub_quad =
1645 ((m - 5 * this->n_dofs_per_vertex() -
1646 12 * this->n_dofs_per_line()) /
1647 this->n_dofs_per_quad(face_no));
1650 const unsigned int tmp1 = 4 * this->n_dofs_per_vertex() +
1651 4 * this->n_dofs_per_line() +
1654 this->face_system_to_base_table[face_no].
size(),
1657 this->face_system_to_base_table[face_no][tmp1].first;
1660 this->face_system_to_base_table[face_no][tmp1].
second >=
1661 4 * base_element(m_index.first.first)
1662 .n_dofs_per_vertex() +
1663 4 * base_element(m_index.first.first)
1666 const unsigned int tmp2 =
1667 this->face_system_to_base_table[face_no][tmp1].second -
1668 4 * base_element(m_index.first.first)
1669 .n_dofs_per_vertex() -
1670 4 * base_element(m_index.first.first).n_dofs_per_line();
1671 Assert(tmp2 < base_element(m_index.first.first)
1672 .n_dofs_per_quad(face_no),
1675 5 * base_element(m_index.first.first)
1676 .n_dofs_per_vertex() +
1678 base_element(m_index.first.first).n_dofs_per_line() +
1679 base_element(m_index.first.first)
1680 .n_dofs_per_quad(face_no) *
1695 if (n_index.first == m_index.first)
1696 this->interface_constraints(m, n) =
1697 (base_element(n_index.first.first)
1698 .constraints()(m_index.second, n_index.second));
1704template <
int dim,
int spacedim>
1708 const std::vector<unsigned int> &multiplicities)
1710 Assert(fes.size() == multiplicities.size(),
1713 ExcMessage(
"Need to pass at least one finite element."));
1714 Assert(count_nonzeros(multiplicities) > 0,
1715 ExcMessage(
"You only passed FiniteElements with multiplicity 0."));
1718 Assert(std::all_of(fes.begin(),
1721 return fe->reference_cell() == reference_cell;
1723 ExcMessage(
"You cannot combine finite elements defined on "
1724 "different reference cells into a combined element "
1725 "such as an FESystem or FE_Enriched object."));
1730 this->base_to_block_indices.reinit(0, 0);
1732 for (
unsigned int i = 0; i < fes.size(); ++i)
1733 if (multiplicities[i] > 0)
1734 this->base_to_block_indices.push_back(multiplicities[i]);
1739 unsigned int ind = 0;
1740 for (
unsigned int i = 0; i < fes.size(); ++i)
1741 if (multiplicities[i] > 0)
1744 base_elements[ind] = {fes[i]->clone(), multiplicities[i]};
1758 this->system_to_component_table.resize(this->n_dofs_per_cell());
1761 this->system_to_component_table,
1762 this->component_to_base_table,
1765 this->face_system_to_component_table.resize(this->n_unique_faces());
1767 for (
unsigned int face_no = 0; face_no < this->n_unique_faces(); ++face_no)
1769 this->face_system_to_component_table[face_no].resize(
1770 this->n_dofs_per_face(face_no));
1773 this->face_system_to_base_table[face_no],
1774 this->face_system_to_component_table[face_no],
1795 for (
unsigned int base_el = 0; base_el < this->n_base_elements(); ++base_el)
1796 if (!base_element(base_el).has_support_points() &&
1797 base_element(base_el).n_dofs_per_cell() != 0)
1806 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
1808 const unsigned int base = this->system_to_base_table[i].first.first,
1809 base_index = this->system_to_base_table[i].second;
1813 const unsigned int n_base_elements = this->n_base_elements();
1818 base_element(base).unit_support_points[base_index];
1823 primitive_offset_tables.resize(this->n_base_elements());
1825 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1826 if (base_element(base_no).is_primitive())
1827 primitive_offset_tables[base_no] =
1832 nonprimitive_offset_tables.resize(this->n_base_elements());
1834 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1835 if (!base_element(base_no).is_primitive())
1836 nonprimitive_offset_tables[base_no] =
1843 for (
unsigned int face_no = 0; face_no < this->n_unique_faces();
1856 bool flag_has_no_support_points =
false;
1858 for (
unsigned int base_el = 0; base_el < this->n_base_elements();
1860 if (!base_element(base_el).has_support_points() &&
1861 (base_element(base_el).n_dofs_per_face(face_no) > 0))
1863 this->unit_face_support_points[face_no].resize(0);
1864 flag_has_no_support_points =
true;
1869 if (flag_has_no_support_points)
1874 this->unit_face_support_points[face_no].resize(
1875 this->n_dofs_per_face(face_no));
1877 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
1879 const unsigned int base_i =
1880 this->face_system_to_base_table[face_no][i].first.first;
1881 const unsigned int index_in_base =
1882 this->face_system_to_base_table[face_no][i].second;
1886 base_element(base_i).unit_face_support_points[face_no].
size(),
1889 this->unit_face_support_points[face_no][i] =
1890 base_element(base_i)
1891 .unit_face_support_points[face_no][index_in_base];
1904 generalized_support_points_index_table.resize(this->n_base_elements());
1906 for (
unsigned int base = 0; base < this->n_base_elements(); ++base)
1917 if (!base_element(base).has_generalized_support_points())
1920 for (
const auto &point :
1921 base_element(base).get_generalized_support_points())
1925 std::find(std::begin(this->generalized_support_points),
1926 std::end(this->generalized_support_points),
1929 if (p == std::end(this->generalized_support_points))
1932 const auto n = this->generalized_support_points.size();
1933 generalized_support_points_index_table[base].push_back(n);
1934 this->generalized_support_points.push_back(point);
1939 const auto n = p - std::begin(this->generalized_support_points);
1940 generalized_support_points_index_table[base].push_back(n);
1948 for (
unsigned int i = 0; i < base_elements.size(); ++i)
1950 if (!base_element(i).has_generalized_support_points())
1953 const auto &points =
1954 base_elements[i].first->get_generalized_support_points();
1955 for (
unsigned int j = 0; j < points.size(); ++j)
1957 const auto n = generalized_support_points_index_table[i][j];
1958 Assert(this->generalized_support_points[n] == points[j],
1968 for (
unsigned int face_no = 0; face_no < this->n_unique_faces();
1976 const unsigned int n_elements =
1977 this->adjust_quad_dof_index_for_face_orientation_table[face_no]
1979 const unsigned int n_face_orientations =
1981 const unsigned int n_dofs_per_quad = this->n_dofs_per_quad(face_no);
1982 Assert(n_elements == n_face_orientations * n_dofs_per_quad,
1987 unsigned int index = 0;
1988 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
1991 this->base_element(b)
1992 .adjust_quad_dof_index_for_face_orientation_table[face_no];
1993 for (
unsigned int c = 0; c < this->element_multiplicity(b); ++c)
1995 for (
unsigned int i = 0; i < temp.size(0); ++i)
1996 for (
unsigned int j = 0;
2000 this->adjust_quad_dof_index_for_face_orientation_table
2001 [face_no](index + i, j) = temp(i, j);
2002 index += temp.size(0);
2015 const unsigned int table_size =
2016 this->adjust_line_dof_index_for_line_orientation_table.size();
2017 const unsigned int n_dofs_per_line = this->n_dofs_per_line();
2019 unsigned int index = 0;
2020 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2022 const std::vector<int> &temp2 =
2023 this->base_element(b)
2024 .adjust_line_dof_index_for_line_orientation_table;
2025 for (
unsigned int c = 0; c < this->element_multiplicity(b); ++c)
2030 this->adjust_line_dof_index_for_line_orientation_table.begin() +
2032 index += temp2.size();
2048 const bool have_nonempty = [&]() ->
bool {
2049 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2051 if (!this->base_element(b).get_local_dof_sparsity_pattern().empty() &&
2052 (this->element_multiplicity(b) > 0))
2060 this->local_dof_sparsity_pattern.reinit(this->n_dofs_per_cell(),
2061 this->n_dofs_per_cell());
2064 this->local_dof_sparsity_pattern.fill(
true);
2068 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
2069 for (
unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
2071 const auto vi = this->system_to_base_index(i);
2072 const auto vj = this->system_to_base_index(j);
2074 const auto base_index_i = vi.first.first;
2075 const auto base_index_j = vj.first.first;
2076 if (base_index_i == base_index_j)
2078 const auto shape_index_i = vi.second;
2079 const auto shape_index_j = vj.second;
2081 const auto &pattern = this->base_element(base_index_i)
2082 .get_local_dof_sparsity_pattern();
2084 if (!pattern.empty())
2085 this->local_dof_sparsity_pattern(i, j) =
2086 pattern(shape_index_i, shape_index_j);
2094 init_tasks.join_all();
2099template <
int dim,
int spacedim>
2103 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2104 if (base_element(b).hp_constraints_are_implemented() ==
false)
2112template <
int dim,
int spacedim>
2117 const unsigned int face_no)
const
2119 Assert(interpolation_matrix.
n() == this->n_dofs_per_face(face_no),
2121 this->n_dofs_per_face(face_no)));
2136 if (
const auto *fe_other_system =
2140 interpolation_matrix = 0;
2144 unsigned int base_index = 0, base_index_other = 0;
2145 unsigned int multiplicity = 0, multiplicity_other = 0;
2153 fe_other_system->base_element(
2160 base_to_base_interpolation.reinit(base_other.n_dofs_per_face(face_no),
2163 base_to_base_interpolation,
2169 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
2170 if (this->face_system_to_base_index(i, face_no).first ==
2171 std::make_pair(base_index, multiplicity))
2172 for (
unsigned int j = 0;
2173 j < fe_other_system->n_dofs_per_face(face_no);
2175 if (fe_other_system->face_system_to_base_index(j, face_no)
2177 std::make_pair(base_index_other, multiplicity_other))
2178 interpolation_matrix(j, i) = base_to_base_interpolation(
2179 fe_other_system->face_system_to_base_index(j, face_no)
2181 this->face_system_to_base_index(i, face_no).second);
2187 if (multiplicity == this->element_multiplicity(base_index))
2192 ++multiplicity_other;
2193 if (multiplicity_other ==
2194 fe_other_system->element_multiplicity(base_index_other))
2196 multiplicity_other = 0;
2202 if (base_index == this->n_base_elements())
2204 Assert(base_index_other == fe_other_system->n_base_elements(),
2211 Assert(base_index_other != fe_other_system->n_base_elements(),
2222 spacedim>::ExcInterpolationNotImplemented()));
2228template <
int dim,
int spacedim>
2232 const unsigned int subface,
2234 const unsigned int face_no)
const
2237 (x_source_fe.
get_name().find(
"FESystem<") == 0) ||
2241 Assert(interpolation_matrix.
n() == this->n_dofs_per_face(face_no),
2243 this->n_dofs_per_face(face_no)));
2260 if (fe_other_system !=
nullptr)
2263 interpolation_matrix = 0;
2267 unsigned int base_index = 0, base_index_other = 0;
2268 unsigned int multiplicity = 0, multiplicity_other = 0;
2283 base_to_base_interpolation.reinit(base_other.n_dofs_per_face(face_no),
2287 base_to_base_interpolation,
2293 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
2294 if (this->face_system_to_base_index(i, face_no).first ==
2295 std::make_pair(base_index, multiplicity))
2296 for (
unsigned int j = 0;
2301 std::make_pair(base_index_other, multiplicity_other))
2302 interpolation_matrix(j, i) = base_to_base_interpolation(
2305 this->face_system_to_base_index(i, face_no).second);
2311 if (multiplicity == this->element_multiplicity(base_index))
2316 ++multiplicity_other;
2317 if (multiplicity_other ==
2320 multiplicity_other = 0;
2326 if (base_index == this->n_base_elements())
2343 fe_other_system !=
nullptr,
2345 spacedim>::ExcInterpolationNotImplemented()));
2351template <
int dim,
int spacedim>
2352template <
int structdim>
2353std::vector<std::pair<unsigned int, unsigned int>>
2356 const unsigned int face_no)
const
2375 unsigned int base_index = 0, base_index_other = 0;
2376 unsigned int multiplicity = 0, multiplicity_other = 0;
2380 unsigned int dof_offset = 0, dof_offset_other = 0;
2382 std::vector<std::pair<unsigned int, unsigned int>> identities;
2396 std::vector<std::pair<unsigned int, unsigned int>> base_identities;
2413 for (
const auto &base_identity : base_identities)
2414 identities.emplace_back(base_identity.
first + dof_offset,
2415 base_identity.
second + dof_offset_other);
2418 dof_offset += base.template n_dofs_per_object<structdim>();
2420 base_other.template n_dofs_per_object<structdim>();
2426 if (multiplicity == this->element_multiplicity(base_index))
2431 ++multiplicity_other;
2432 if (multiplicity_other ==
2435 multiplicity_other = 0;
2441 if (base_index == this->n_base_elements())
2459 return std::vector<std::pair<unsigned int, unsigned int>>();
2465template <
int dim,
int spacedim>
2466std::vector<std::pair<unsigned int, unsigned int>>
2470 return hp_object_dof_identities<0>(fe_other);
2473template <
int dim,
int spacedim>
2474std::vector<std::pair<unsigned int, unsigned int>>
2478 return hp_object_dof_identities<1>(fe_other);
2483template <
int dim,
int spacedim>
2484std::vector<std::pair<unsigned int, unsigned int>>
2487 const unsigned int face_no)
const
2489 return hp_object_dof_identities<2>(fe_other, face_no);
2494template <
int dim,
int spacedim>
2498 const unsigned int codim)
const
2507 Assert(this->n_components() == fe_sys_other->n_components(),
2508 ExcMessage(
"You can only compare two elements for domination "
2509 "that have the same number of vector components. The "
2510 "current element has " +
2511 std::to_string(this->n_components()) +
2512 " vector components, and you are comparing it "
2513 "against an element with " +
2514 std::to_string(fe_sys_other->n_components()) +
2515 " vector components."));
2523 if ((this->n_base_elements() == fe_sys_other->n_base_elements()) &&
2527 for (unsigned int b = 0; b < this->n_base_elements(); ++b)
2528 if (this->element_multiplicity(b) !=
2529 fe_sys_other->element_multiplicity(b))
2534 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2536 Assert(this->base_element(b).n_components() ==
2537 fe_sys_other->base_element(b).n_components(),
2542 (this->base_element(b).compare_for_domination(
2543 fe_sys_other->base_element(b), codim));
2545 domination = domination & base_domination;
2552 for (
unsigned int c = 0; c < this->n_components(); ++c)
2554 const unsigned int base_element_index_in_fe_sys_this =
2555 this->component_to_base_index(c).first;
2556 const unsigned int base_element_index_in_fe_sys_other =
2557 fe_sys_other->component_to_base_index(c).first;
2559 Assert(this->base_element(base_element_index_in_fe_sys_this)
2562 ->base_element(base_element_index_in_fe_sys_other)
2569 (this->base_element(base_element_index_in_fe_sys_this)
2570 .compare_for_domination(
2571 fe_sys_other->base_element(
2572 base_element_index_in_fe_sys_other),
2575 domination = domination & base_domination;
2588template <
int dim,
int spacedim>
2593 return *base_elements[
index].first;
2598template <
int dim,
int spacedim>
2601 const unsigned int shape_index,
2602 const unsigned int face_index)
const
2604 return (base_element(this->system_to_base_index(shape_index).
first.first)
2605 .has_support_on_face(this->system_to_base_index(shape_index).second,
2611template <
int dim,
int spacedim>
2617 (this->unit_support_points.empty()),
2626 return (base_element(this->system_to_base_index(index).
first.first)
2627 .unit_support_point(this->system_to_base_index(index).second));
2632template <
int dim,
int spacedim>
2635 const unsigned int index,
2636 const unsigned int face_no)
const
2640 (this->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2641 .
size() == this->n_dofs_per_face(face_no)) ||
2642 (this->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2644 (typename
FiniteElement<dim, spacedim>::ExcFEHasNoSupportPoints()));
2647 if (this->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2650 ->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2656 base_element(this->face_system_to_base_index(index, face_no).
first.first)
2657 .unit_face_support_point(
2658 this->face_system_to_base_index(index, face_no).second, face_no));
2663template <
int dim,
int spacedim>
2664std::pair<Table<2, bool>, std::vector<unsigned int>>
2670 Table<2, bool> constant_modes(this->n_components(), this->n_dofs_per_cell());
2671 std::vector<unsigned int> components;
2672 for (
unsigned int i = 0; i < base_elements.size(); ++i)
2674 const std::pair<Table<2, bool>, std::vector<unsigned int>> base_table =
2675 base_elements[i].first->get_constant_modes();
2677 const unsigned int element_multiplicity = this->element_multiplicity(i);
2682 const unsigned int comp = components.size();
2683 if (constant_modes.n_rows() <
2684 comp + base_table.first.n_rows() * element_multiplicity)
2686 Table<2, bool> new_constant_modes(comp + base_table.first.n_rows() *
2687 element_multiplicity,
2688 constant_modes.n_cols());
2689 for (
unsigned int r = 0; r < comp; ++r)
2690 for (
unsigned int c = 0; c < this->n_dofs_per_cell(); ++c)
2691 new_constant_modes(r, c) = constant_modes(r, c);
2693 constant_modes = std::move(new_constant_modes);
2698 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
2700 std::pair<std::pair<unsigned int, unsigned int>,
unsigned int> ind =
2701 this->system_to_base_index(k);
2702 if (ind.first.first == i)
2703 for (
unsigned int c = 0; c < base_table.first.n_rows(); ++c)
2704 constant_modes(comp +
2705 ind.first.second * base_table.first.n_rows() + c,
2706 k) = base_table.first(c, ind.second);
2708 for (
unsigned int r = 0; r < element_multiplicity; ++r)
2709 for (
const unsigned int c : base_table.
second)
2711 comp + r * this->base_elements[i].
first->n_components() + c);
2714 return std::pair<Table<2, bool>, std::vector<unsigned int>>(constant_modes,
2720template <
int dim,
int spacedim>
2724 std::vector<double> &dof_values)
const
2726 Assert(this->has_generalized_support_points(),
2727 ExcMessage(
"The FESystem does not have generalized support points"));
2730 this->get_generalized_support_points().size());
2733 std::vector<double> base_dof_values;
2734 std::vector<Vector<double>> base_point_values;
2739 unsigned int current_vector_component = 0;
2740 for (
unsigned int base = 0; base < base_elements.size(); ++base)
2745 const auto &base_element = this->base_element(base);
2746 const unsigned int multiplicity = this->element_multiplicity(base);
2747 const unsigned int n_base_dofs = base_element.n_dofs_per_cell();
2748 const unsigned int n_base_components = base_element.n_components();
2753 if (n_base_dofs == 0)
2755 current_vector_component += multiplicity * n_base_components;
2759 if (base_element.has_generalized_support_points())
2761 const unsigned int n_base_points =
2762 base_element.get_generalized_support_points().size();
2764 base_dof_values.resize(n_base_dofs);
2765 base_point_values.resize(n_base_points);
2767 for (
unsigned int m = 0; m < multiplicity;
2768 ++m, current_vector_component += n_base_components)
2772 for (
unsigned int j = 0; j < base_point_values.size(); ++j)
2774 base_point_values[j].reinit(n_base_components,
false);
2777 generalized_support_points_index_table[base][j];
2781 const auto *
const begin =
2782 std::begin(point_values[n]) + current_vector_component;
2783 const auto *
const end =
begin + n_base_components;
2784 std::copy(
begin,
end, std::begin(base_point_values[j]));
2788 .convert_generalized_support_point_values_to_dof_values(
2789 base_point_values, base_dof_values);
2798 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
2799 if (this->system_to_base_index(i).first ==
2800 std::make_pair(base, m))
2802 base_dof_values[this->system_to_base_index(i).second];
2814 for (
unsigned int m = 0; m < multiplicity; ++m)
2815 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
2816 if (this->system_to_base_index(i).first ==
2817 std::make_pair(base, m))
2818 dof_values[i] = std::numeric_limits<double>::signaling_NaN();
2820 current_vector_component += multiplicity * n_base_components;
2827template <
int dim,
int spacedim>
2835 sizeof(base_elements));
2836 for (
unsigned int i = 0; i < base_elements.size(); ++i)
2844#include "fe/fe_system.inst"
***mech_lbc_system increment_interpolation_handlers push_back(scale_z_handler)
void set_fe_data(const unsigned int base_no, std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase >)
InternalData(const unsigned int n_base_elements)
std::vector< std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > > base_fe_datas
FiniteElement< dim, spacedim >::InternalDataBase & get_fe_data(const unsigned int base_no) const
internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > & get_fe_output_object(const unsigned int base_no) const
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 Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const override
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const override
virtual Point< dim > unit_support_point(const unsigned int index) const override
virtual void fill_fe_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual Tensor< 3, dim > shape_3rd_derivative(const unsigned int i, const Point< dim > &p) const override
virtual std::string get_name() 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 const FiniteElement< dim, spacedim > & get_sub_fe(const unsigned int first_component, const unsigned int n_selected_components) const override
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
virtual unsigned int face_to_cell_index(const unsigned int face_dof_index, const unsigned int face, const types::geometric_orientation combined_orientation=numbers::default_geometric_orientation) const override
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const hp::QCollection< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const override
void compute_fill(const Mapping< dim, spacedim > &mapping, const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Q_or_QC &quadrature, const CellSimilarity::Similarity cell_similarity, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_data, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const
virtual Tensor< 3, dim > shape_3rd_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const override
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const override
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_face_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const hp::QCollection< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual bool hp_constraints_are_implemented() const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
void build_interface_constraints()
virtual Tensor< 4, dim > shape_4th_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual Point< dim - 1 > unit_face_support_point(const unsigned int index, const unsigned int face_no=0) const override
void initialize(const std::vector< const FiniteElement< dim, spacedim > * > &fes, const std::vector< unsigned int > &multiplicities)
virtual void convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double > > &support_point_values, std::vector< double > &dof_values) const override
std::vector< std::pair< unsigned int, unsigned int > > hp_object_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const
virtual void fill_fe_subface_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Quadrature< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual double shape_value(const unsigned int i, const Point< dim > &p) const override
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix, const unsigned int face_no=0) 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 void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix, const unsigned int face_no=0) const override
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
virtual std::size_t memory_consumption() const override
virtual Tensor< 4, dim > shape_4th_derivative(const unsigned int i, const Point< dim > &p) const override
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_subface_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
unsigned int n_dofs_per_cell() const
unsigned int n_dofs_per_face(unsigned int face_no=0, unsigned int child=0) const
unsigned int n_components() const
virtual std::string get_name() const =0
virtual void fill_fe_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const hp::QCollection< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const
bool is_primitive() const
virtual void fill_fe_subface_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Quadrature< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix, const unsigned int face_no=0) const
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > system_to_base_table
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > system_to_base_index(const unsigned int index) const
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > face_system_to_base_index(const unsigned int index, const unsigned int face_no=0) const
unsigned int element_multiplicity(const unsigned int index) const
unsigned int n_nonzero_components(const unsigned int i) const
unsigned int n_base_elements() const
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix, const unsigned int face_no=0) const
virtual std::size_t memory_consumption() const
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Abstract base class for mapping classes.
unsigned int size() const
unsigned int n_face_orientations(const unsigned int face_no) const
unsigned int max_n_quadrature_points() const
#define DEAL_II_NAMESPACE_OPEN
constexpr bool running_in_debug_mode()
#define DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_ASSERT_UNREACHABLE()
#define DEAL_II_NOT_IMPLEMENTED()
static ::ExceptionBase & ExcNotImplemented()
#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)
#define AssertThrow(cond, exc)
@ update_hessians
Second derivatives of shape functions.
@ update_values
Shape function values.
@ update_3rd_derivatives
Third derivatives of shape functions.
@ update_gradients
Shape function gradients.
@ update_default
No update.
Task< RT > new_task(const std::function< RT()> &function)
std::vector< index_type > data
@ neither_element_dominates
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell< dim > &reference_cell)
std::enable_if_t< std::is_fundamental_v< T >, std::size_t > memory_consumption(const T &t)
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
std::string dim_string(const int dim, const int spacedim)
std::vector< Point< dim > > unit_support_points(const std::vector< Point< 1 > > &line_support_points, const std::vector< unsigned int > &renumbering)
std::vector< typename FESystem< dim, spacedim >::BaseOffsets > setup_nonprimitive_offset_table(const FESystem< dim, spacedim > &fe, const unsigned int base_no)
Table< 2, unsigned int > setup_primitive_offset_table(const FESystem< dim, spacedim > &fe, const unsigned int base_no)
void copy_nonprimitive_base_element_values(const FESystem< dim, spacedim > &fe, const unsigned int base_no, const unsigned int n_q_points, const UpdateFlags base_flags, const std::vector< typename FESystem< dim, spacedim >::BaseOffsets > &offsets, const FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &base_data, FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data)
void copy_primitive_base_element_values(const FESystem< dim, spacedim > &fe, const unsigned int base_no, const UpdateFlags base_flags, const Table< 2, unsigned int > &base_to_system_table, const FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &base_data, FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data)
constexpr unsigned int invalid_unsigned_int
std::uint8_t geometric_orientation