39 count_nonzeros(
const std::vector<unsigned int> &vec)
41 return std::count_if(vec.begin(), vec.end(), [](
const unsigned int i) {
54 template <
int dim,
int spacedim = dim>
57 const unsigned int base_no)
65 unsigned int out_index = 0;
66 for (
unsigned int system_index = 0; system_index < fe.
n_dofs_per_cell();
73 const unsigned int base_component =
75 const unsigned int base_index =
80 table[base_component][base_index] = out_index;
91 template <
int dim,
int spacedim = dim>
92 std::vector<typename FESystem<dim, spacedim>::BaseOffsets>
94 const unsigned int base_no)
96 std::vector<typename FESystem<dim, spacedim>::BaseOffsets> table;
99 unsigned int out_index = 0;
100 for (
unsigned int system_index = 0; system_index < fe.
n_dofs_per_cell();
105 const unsigned int base_index =
108 table.emplace_back();
110 table.back().n_nonzero_components =
112 unsigned int in_index = 0;
113 for (
unsigned int i = 0; i < base_index; ++i)
116 table.back().in_index = in_index;
117 table.back().out_index = out_index;
132 template <
int dim,
int spacedim = dim>
136 const unsigned int base_no,
137 const unsigned int n_q_points,
147 const unsigned int n_dofs_per_cell =
149 for (
unsigned int component = 0; component < n_components; ++component)
150 for (
unsigned int b = 0;
b < n_dofs_per_cell; ++
b)
152 const unsigned int out_index = base_to_system_table[component][
b];
155 for (
unsigned int q = 0; q < n_q_points; ++q)
160 for (
unsigned int q = 0; q < n_q_points; ++q)
165 for (
unsigned int q = 0; q < n_q_points; ++q)
170 for (
unsigned int q = 0; q < n_q_points; ++q)
180 template <
int dim,
int spacedim = dim>
184 const unsigned int base_no,
185 const unsigned int n_q_points,
197 for (
const auto &offset : offsets)
200 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
201 for (
unsigned int q = 0; q < n_q_points; ++q)
206 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
207 for (
unsigned int q = 0; q < n_q_points; ++q)
212 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
213 for (
unsigned int q = 0; q < n_q_points; ++q)
218 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
219 for (
unsigned int q = 0; q < n_q_points; ++q)
228 template <
int dim,
int spacedim>
230 const unsigned int n_base_elements)
231 : base_fe_datas(n_base_elements)
232 , base_fe_output_objects(n_base_elements)
237 template <
int dim,
int spacedim>
241 for (
unsigned int i = 0; i < base_fe_datas.size(); ++i)
242 base_fe_datas[i].reset();
246 template <
int dim,
int spacedim>
249 const unsigned int base_no)
const
252 return *base_fe_datas[base_no];
257 template <
int dim,
int spacedim>
260 const unsigned int base_no,
264 base_fe_datas[base_no] = std::move(ptr);
269 template <
int dim,
int spacedim>
272 const unsigned int base_no)
const
275 return base_fe_output_objects[base_no];
283 template <
int dim,
int spacedim>
287 template <
int dim,
int spacedim>
289 const unsigned int n_elements)
297 std::vector<const FiniteElement<dim, spacedim> *> fes;
299 std::vector<unsigned int> multiplicities;
300 multiplicities.push_back(n_elements);
306 template <
int dim,
int spacedim>
308 const unsigned int n1,
310 const unsigned int n2)
318 , base_elements(static_cast<int>(n1 > 0) + static_cast<int>(n2 > 0))
320 std::vector<const FiniteElement<dim, spacedim> *> fes;
323 std::vector<unsigned int> multiplicities;
324 multiplicities.push_back(n1);
325 multiplicities.push_back(n2);
331 template <
int dim,
int spacedim>
333 const unsigned int n1,
335 const unsigned int n2,
337 const unsigned int n3)
352 , base_elements(static_cast<int>(n1 > 0) + static_cast<int>(n2 > 0) +
353 static_cast<int>(n3 > 0))
355 std::vector<const FiniteElement<dim, spacedim> *> fes;
359 std::vector<unsigned int> multiplicities;
360 multiplicities.push_back(n1);
361 multiplicities.push_back(n2);
362 multiplicities.push_back(n3);
368 template <
int dim,
int spacedim>
370 const unsigned int n1,
372 const unsigned int n2,
374 const unsigned int n3,
376 const unsigned int n4)
402 , base_elements(static_cast<int>(n1 > 0) + static_cast<int>(n2 > 0) +
403 static_cast<int>(n3 > 0) + static_cast<int>(n4 > 0))
405 std::vector<const FiniteElement<dim, spacedim> *> fes;
410 std::vector<unsigned int> multiplicities;
411 multiplicities.push_back(n1);
412 multiplicities.push_back(n2);
413 multiplicities.push_back(n3);
414 multiplicities.push_back(n4);
420 template <
int dim,
int spacedim>
422 const unsigned int n1,
424 const unsigned int n2,
426 const unsigned int n3,
428 const unsigned int n4,
430 const unsigned int n5)
433 multiply_dof_numbers(&fe1, n1, &fe2, n2, &fe3, n3, &fe4, n4, &fe5, n5),
454 , base_elements(static_cast<int>(n1 > 0) + static_cast<int>(n2 > 0) +
455 static_cast<int>(n3 > 0) + static_cast<int>(n4 > 0) +
456 static_cast<int>(n5 > 0))
458 std::vector<const FiniteElement<dim, spacedim> *> fes;
464 std::vector<unsigned int> multiplicities;
465 multiplicities.push_back(n1);
466 multiplicities.push_back(n2);
467 multiplicities.push_back(n3);
468 multiplicities.push_back(n4);
469 multiplicities.push_back(n5);
475 template <
int dim,
int spacedim>
478 const std::vector<unsigned int> & multiplicities)
485 , base_elements(count_nonzeros(multiplicities))
492 template <
int dim,
int spacedim>
503 std::ostringstream namebuf;
506 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
508 namebuf << base_element(i).get_name();
509 if (this->element_multiplicity(i) != 1)
510 namebuf <<
'^' << this->element_multiplicity(i);
511 if (i != this->n_base_elements() - 1)
516 return namebuf.str();
521 template <
int dim,
int spacedim>
522 std::unique_ptr<FiniteElement<dim, spacedim>>
525 std::vector<const FiniteElement<dim, spacedim> *> fes;
526 std::vector<unsigned int> multiplicities;
528 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
530 fes.push_back(&base_element(i));
531 multiplicities.push_back(this->element_multiplicity(i));
533 return std::make_unique<FESystem<dim, spacedim>>(fes, multiplicities);
538 template <
int dim,
int spacedim>
541 const unsigned int first_component,
542 const unsigned int n_selected_components)
const
544 Assert(first_component + n_selected_components <= this->n_components(),
545 ExcMessage(
"Invalid arguments (not a part of this FiniteElement)."));
547 const unsigned int base_index =
548 this->component_to_base_table[first_component].first.first;
549 const unsigned int component_in_base =
550 this->component_to_base_table[first_component].first.second;
551 const unsigned int base_components =
552 this->base_element(base_index).n_components();
556 if (n_selected_components <= base_components)
557 return this->base_element(base_index)
558 .get_sub_fe(component_in_base, n_selected_components);
560 Assert(n_selected_components == this->n_components(),
561 ExcMessage(
"You can not select a part of a FiniteElement."));
567 template <
int dim,
int spacedim>
573 Assert(this->is_primitive(i),
577 return (base_element(this->system_to_base_table[i].
first.first)
578 .shape_value(this->system_to_base_table[i].second, p));
583 template <
int dim,
int spacedim>
586 const unsigned int i,
588 const unsigned int component)
const
595 if (this->nonzero_components[i][component] ==
false)
603 const unsigned int base = this->component_to_base_index(component).first;
604 const unsigned int component_in_base =
605 this->component_to_base_index(component).second;
613 return (base_element(base).shape_value_component(
614 this->system_to_base_table[i].
second, p, component_in_base));
619 template <
int dim,
int spacedim>
625 Assert(this->is_primitive(i),
629 return (base_element(this->system_to_base_table[i].
first.first)
630 .shape_grad(this->system_to_base_table[i].second, p));
635 template <
int dim,
int spacedim>
638 const unsigned int i,
640 const unsigned int component)
const
646 if (this->nonzero_components[i][component] ==
false)
651 const unsigned int base = this->component_to_base_index(component).first;
652 const unsigned int component_in_base =
653 this->component_to_base_index(component).second;
658 return (base_element(base).shape_grad_component(
659 this->system_to_base_table[i].
second, p, component_in_base));
664 template <
int dim,
int spacedim>
670 Assert(this->is_primitive(i),
674 return (base_element(this->system_to_base_table[i].
first.first)
675 .shape_grad_grad(this->system_to_base_table[i].second, p));
680 template <
int dim,
int spacedim>
683 const unsigned int i,
685 const unsigned int component)
const
691 if (this->nonzero_components[i][component] ==
false)
696 const unsigned int base = this->component_to_base_index(component).first;
697 const unsigned int component_in_base =
698 this->component_to_base_index(component).second;
703 return (base_element(base).shape_grad_grad_component(
704 this->system_to_base_table[i].
second, p, component_in_base));
709 template <
int dim,
int spacedim>
715 Assert(this->is_primitive(i),
719 return (base_element(this->system_to_base_table[i].
first.first)
720 .shape_3rd_derivative(this->system_to_base_table[i].second, p));
725 template <
int dim,
int spacedim>
728 const unsigned int i,
730 const unsigned int component)
const
736 if (this->nonzero_components[i][component] ==
false)
741 const unsigned int base = this->component_to_base_index(component).first;
742 const unsigned int component_in_base =
743 this->component_to_base_index(component).second;
748 return (base_element(base).shape_3rd_derivative_component(
749 this->system_to_base_table[i].
second, p, component_in_base));
754 template <
int dim,
int spacedim>
760 Assert(this->is_primitive(i),
764 return (base_element(this->system_to_base_table[i].
first.first)
765 .shape_4th_derivative(this->system_to_base_table[i].second, p));
770 template <
int dim,
int spacedim>
773 const unsigned int i,
775 const unsigned int component)
const
781 if (this->nonzero_components[i][component] ==
false)
786 const unsigned int base = this->component_to_base_index(component).first;
787 const unsigned int component_in_base =
788 this->component_to_base_index(component).second;
793 return (base_element(base).shape_4th_derivative_component(
794 this->system_to_base_table[i].
second, p, component_in_base));
799 template <
int dim,
int spacedim>
809 Assert((interpolation_matrix.
m() == this->n_dofs_per_cell()) ||
812 this->n_dofs_per_cell()));
814 (this->n_dofs_per_cell() == 0),
824 (x_source_fe.
get_name().find(
"FESystem<") == 0) ||
838 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
842 spacedim>::ExcInterpolationNotImplemented()));
851 std::vector<FullMatrix<double>> base_matrices(this->n_base_elements());
852 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
854 base_matrices[i].reinit(base_element(i).n_dofs_per_cell(),
856 base_element(i).get_interpolation_matrix(source_fe.
base_element(i),
863 interpolation_matrix = 0;
864 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
866 if (this->system_to_base_table[i].
first ==
868 interpolation_matrix(i, j) =
869 (base_matrices[this->system_to_base_table[i].first.first](
870 this->system_to_base_table[i].second,
876 template <
int dim,
int spacedim>
879 const unsigned int child,
886 "Restriction matrices are only available for refined cells!"));
890 if (this->restriction[refinement_case - 1][child].n() == 0)
892 std::lock_guard<std::mutex> lock(this->mutex);
895 if (this->restriction[refinement_case - 1][child].n() ==
896 this->n_dofs_per_cell())
897 return this->restriction[refinement_case - 1][child];
900 bool do_restriction =
true;
903 std::vector<const FullMatrix<double> *> base_matrices(
904 this->n_base_elements());
906 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
909 &base_element(i).get_restriction_matrix(child, refinement_case);
910 if (base_matrices[i]->n() != base_element(i).n_dofs_per_cell())
911 do_restriction =
false;
920 this->n_dofs_per_cell());
930 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
931 for (
unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
938 if (this->system_to_base_table[i].
first !=
939 this->system_to_base_table[j].
first)
943 const unsigned int base =
944 this->system_to_base_table[i].first.first;
946 const unsigned int base_index_i =
947 this->system_to_base_table[i].second,
949 this->system_to_base_table[j].second;
954 (*base_matrices[base])(base_index_i, base_index_j);
958 this->restriction[refinement_case - 1][child]));
962 return this->restriction[refinement_case - 1][child];
967 template <
int dim,
int spacedim>
970 const unsigned int child,
977 "Restriction matrices are only available for refined cells!"));
982 if (this->prolongation[refinement_case - 1][child].n() == 0)
984 std::lock_guard<std::mutex> lock(this->mutex);
986 if (this->prolongation[refinement_case - 1][child].n() ==
987 this->n_dofs_per_cell())
988 return this->prolongation[refinement_case - 1][child];
990 bool do_prolongation =
true;
991 std::vector<const FullMatrix<double> *> base_matrices(
992 this->n_base_elements());
993 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
996 &base_element(i).get_prolongation_matrix(child, refinement_case);
997 if (base_matrices[i]->n() != base_element(i).n_dofs_per_cell())
998 do_prolongation =
false;
1003 if (do_prolongation)
1006 this->n_dofs_per_cell());
1008 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
1009 for (
unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
1011 if (this->system_to_base_table[i].
first !=
1012 this->system_to_base_table[j].
first)
1014 const unsigned int base =
1015 this->system_to_base_table[i].first.first;
1017 const unsigned int base_index_i =
1018 this->system_to_base_table[i].second,
1020 this->system_to_base_table[j].second;
1022 (*base_matrices[base])(base_index_i, base_index_j);
1025 this->prolongation[refinement_case - 1][child]));
1029 return this->prolongation[refinement_case - 1][child];
1033 template <
int dim,
int spacedim>
1036 const unsigned int face,
1037 const bool face_orientation,
1038 const bool face_flip,
1039 const bool face_rotation)
const
1044 const std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>
1045 face_base_index = this->face_system_to_base_index(face_dof_index, face);
1047 const unsigned int base_face_to_cell_index =
1048 this->base_element(face_base_index.first.first)
1049 .face_to_cell_index(face_base_index.second,
1060 const std::pair<std::pair<unsigned int, unsigned int>,
unsigned int> target =
1061 std::make_pair(face_base_index.first, base_face_to_cell_index);
1062 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
1063 if (this->system_to_base_index(i) == target)
1078 template <
int dim,
int spacedim>
1085 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1086 out |= base_element(base_no).requires_update_flags(flags);
1092 template <
int dim,
int spacedim>
1093 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1109 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1110 data_ptr = std::make_unique<InternalData>(this->n_base_elements());
1112 data.update_each = requires_update_flags(flags);
1126 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1129 &base_fe_output_object = data.get_fe_output_object(base_no);
1132 base_element(base_no),
1133 flags | base_element(base_no).requires_update_flags(flags));
1141 auto base_fe_data = base_element(base_no).get_data(flags,
1144 base_fe_output_object);
1146 data.set_fe_data(base_no, std::move(base_fe_data));
1155 template <
int dim,
int spacedim>
1156 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1172 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1173 data_ptr = std::make_unique<InternalData>(this->n_base_elements());
1175 data.update_each = requires_update_flags(flags);
1189 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1192 &base_fe_output_object = data.get_fe_output_object(base_no);
1195 base_element(base_no),
1196 flags | base_element(base_no).requires_update_flags(flags));
1204 auto base_fe_data = base_element(base_no).get_face_data(
1205 flags, mapping, quadrature, base_fe_output_object);
1207 data.set_fe_data(base_no, std::move(base_fe_data));
1218 template <
int dim,
int spacedim>
1219 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1235 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1236 data_ptr = std::make_unique<InternalData>(this->n_base_elements());
1239 data.update_each = requires_update_flags(flags);
1253 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1256 &base_fe_output_object = data.get_fe_output_object(base_no);
1259 base_element(base_no),
1260 flags | base_element(base_no).requires_update_flags(flags));
1268 auto base_fe_data = base_element(base_no).get_subface_data(
1269 flags, mapping, quadrature, base_fe_output_object);
1271 data.set_fe_data(base_no, std::move(base_fe_data));
1279 template <
int dim,
int spacedim>
1287 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
1295 compute_fill(mapping,
1297 invalid_face_number,
1298 invalid_face_number,
1309 template <
int dim,
int spacedim>
1313 const unsigned int face_no,
1317 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
1325 compute_fill(mapping,
1328 invalid_face_number,
1339 template <
int dim,
int spacedim>
1343 const unsigned int face_no,
1344 const unsigned int sub_no,
1348 const ::internal::FEValuesImplementation::MappingRelatedData<dim,
1356 compute_fill(mapping,
1370 template <
int dim,
int spacedim>
1371 template <
class Q_or_QC>
1376 const unsigned int face_no,
1377 const unsigned int sub_no,
1378 const Q_or_QC & quadrature,
1410 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1423 const Quadrature<dim - 1> * sub_face_quadrature =
nullptr;
1427 if (face_no == invalid_face_number)
1429 const Subscriptor *quadrature_base_pointer = &quadrature;
1431 quadrature_base_pointer) !=
nullptr,
1436 n_q_points = cell_quadrature->
size();
1438 else if (sub_no == invalid_face_number)
1440 const Subscriptor *quadrature_base_pointer = &quadrature;
1442 quadrature_base_pointer) !=
nullptr,
1448 quadrature_base_pointer);
1450 (*face_quadrature)[face_quadrature->size() == 1 ? 0 : face_no]
1455 const Subscriptor *quadrature_base_pointer = &quadrature;
1457 quadrature_base_pointer) !=
nullptr,
1460 sub_face_quadrature =
1461 static_cast<const Quadrature<dim - 1
> *>(quadrature_base_pointer);
1462 n_q_points = sub_face_quadrature->size();
1474 if (face_no == invalid_face_number)
1483 else if (sub_no == invalid_face_number)
1496 *sub_face_quadrature,
1506 const UpdateFlags base_flags = base_fe_data.update_each;
1515 primitive_offset_tables[base_no],
1526 nonprimitive_offset_tables[base_no],
1534 template <
int dim,
int spacedim>
1542 for (
unsigned int base = 0; base < this->n_base_elements(); ++base)
1543 if (base_element(base).constraints_are_implemented() ==
false)
1549 const unsigned int face_no = 0;
1551 this->interface_constraints.TableBase<2, double>::reinit(
1552 this->interface_constraints_size());
1562 for (
unsigned int n = 0; n < this->interface_constraints.n(); ++n)
1563 for (
unsigned int m = 0; m < this->interface_constraints.m(); ++m)
1572 const std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>
1573 n_index = this->face_system_to_base_table[face_no][n];
1577 std::pair<std::pair<unsigned int, unsigned int>,
unsigned int> m_index;
1594 if (m < this->n_dofs_per_vertex())
1595 m_index = this->system_to_base_table[m];
1599 const unsigned int index_in_line =
1600 (m - this->n_dofs_per_vertex()) % this->n_dofs_per_line();
1601 const unsigned int sub_line =
1602 (m - this->n_dofs_per_vertex()) / this->n_dofs_per_line();
1609 const unsigned int tmp1 =
1610 2 * this->n_dofs_per_vertex() + index_in_line;
1612 this->face_system_to_base_table[face_no][tmp1].first;
1624 this->face_system_to_base_table[face_no][tmp1].
second >=
1626 base_element(m_index.first.first).n_dofs_per_vertex(),
1628 const unsigned int tmp2 =
1629 this->face_system_to_base_table[face_no][tmp1].second -
1630 2 * base_element(m_index.first.first).n_dofs_per_vertex();
1631 Assert(tmp2 < base_element(m_index.first.first)
1635 base_element(m_index.first.first).n_dofs_per_vertex() +
1636 base_element(m_index.first.first).n_dofs_per_line() *
1650 if (m < 5 * this->n_dofs_per_vertex())
1651 m_index = this->system_to_base_table[m];
1654 if (m < 5 * this->n_dofs_per_vertex() +
1655 12 * this->n_dofs_per_line())
1658 const unsigned int index_in_line =
1659 (m - 5 * this->n_dofs_per_vertex()) %
1660 this->n_dofs_per_line();
1661 const unsigned int sub_line =
1662 (m - 5 * this->n_dofs_per_vertex()) /
1663 this->n_dofs_per_line();
1666 const unsigned int tmp1 =
1667 4 * this->n_dofs_per_vertex() + index_in_line;
1669 this->face_system_to_base_table[face_no][tmp1].first;
1672 this->face_system_to_base_table[face_no][tmp1].
second >=
1674 base_element(m_index.first.first).n_dofs_per_vertex(),
1676 const unsigned int tmp2 =
1677 this->face_system_to_base_table[face_no][tmp1].second -
1678 4 * base_element(m_index.first.first).n_dofs_per_vertex();
1679 Assert(tmp2 < base_element(m_index.first.first)
1684 base_element(m_index.first.first).n_dofs_per_vertex() +
1685 base_element(m_index.first.first).n_dofs_per_line() *
1693 const unsigned int index_in_quad =
1694 (m - 5 * this->n_dofs_per_vertex() -
1695 12 * this->n_dofs_per_line()) %
1696 this->n_dofs_per_quad(face_no);
1697 Assert(index_in_quad < this->n_dofs_per_quad(face_no),
1699 const unsigned int sub_quad =
1700 ((m - 5 * this->n_dofs_per_vertex() -
1701 12 * this->n_dofs_per_line()) /
1702 this->n_dofs_per_quad(face_no));
1705 const unsigned int tmp1 = 4 * this->n_dofs_per_vertex() +
1706 4 * this->n_dofs_per_line() +
1709 this->face_system_to_base_table[face_no].size(),
1712 this->face_system_to_base_table[face_no][tmp1].first;
1715 this->face_system_to_base_table[face_no][tmp1].
second >=
1716 4 * base_element(m_index.first.first)
1717 .n_dofs_per_vertex() +
1719 base_element(m_index.first.first).n_dofs_per_line(),
1721 const unsigned int tmp2 =
1722 this->face_system_to_base_table[face_no][tmp1].second -
1724 base_element(m_index.first.first).n_dofs_per_vertex() -
1725 4 * base_element(m_index.first.first).n_dofs_per_line();
1726 Assert(tmp2 < base_element(m_index.first.first)
1727 .n_dofs_per_quad(face_no),
1731 base_element(m_index.first.first).n_dofs_per_vertex() +
1732 12 * base_element(m_index.first.first).n_dofs_per_line() +
1733 base_element(m_index.first.first)
1734 .n_dofs_per_quad(face_no) *
1749 if (n_index.first == m_index.first)
1750 this->interface_constraints(m, n) =
1751 (base_element(n_index.first.first)
1752 .constraints()(m_index.second, n_index.second));
1758 template <
int dim,
int spacedim>
1762 const std::vector<unsigned int> & multiplicities)
1764 Assert(fes.size() == multiplicities.size(),
1767 ExcMessage(
"Need to pass at least one finite element."));
1768 Assert(count_nonzeros(multiplicities) > 0,
1769 ExcMessage(
"You only passed FiniteElements with multiplicity 0."));
1774 this->base_to_block_indices.reinit(0, 0);
1776 for (
unsigned int i = 0; i < fes.size(); ++i)
1777 if (multiplicities[i] > 0)
1778 this->base_to_block_indices.push_back(multiplicities[i]);
1783 unsigned int ind = 0;
1784 for (
unsigned int i = 0; i < fes.size(); ++i)
1785 if (multiplicities[i] > 0)
1788 base_elements[ind] = {fes[i]->clone(), multiplicities[i]};
1802 this->system_to_component_table.resize(this->n_dofs_per_cell());
1805 this->system_to_component_table,
1806 this->component_to_base_table,
1809 this->face_system_to_component_table.resize(this->n_unique_faces());
1811 for (
unsigned int face_no = 0; face_no < this->n_unique_faces(); ++face_no)
1813 this->face_system_to_component_table[face_no].resize(
1814 this->n_dofs_per_face(face_no));
1817 this->face_system_to_base_table[face_no],
1818 this->face_system_to_component_table[face_no],
1839 for (
unsigned int base_el = 0; base_el < this->n_base_elements(); ++base_el)
1840 if (!base_element(base_el).has_support_points() &&
1841 base_element(base_el).n_dofs_per_cell() != 0)
1850 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
1852 const unsigned int base = this->system_to_base_table[i].first.first,
1853 base_index = this->system_to_base_table[i].second;
1858 base_element(base).unit_support_points[base_index];
1863 primitive_offset_tables.resize(this->n_base_elements());
1865 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1866 if (base_element(base_no).is_primitive())
1867 primitive_offset_tables[base_no] =
1872 nonprimitive_offset_tables.resize(this->n_base_elements());
1874 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1875 if (!base_element(base_no).is_primitive())
1876 nonprimitive_offset_tables[base_no] =
1883 for (
unsigned int face_no = 0; face_no < this->n_unique_faces();
1896 bool flag_has_no_support_points =
false;
1898 for (
unsigned int base_el = 0; base_el < this->n_base_elements();
1900 if (!base_element(base_el).has_support_points() &&
1901 (base_element(base_el).n_dofs_per_face(face_no) > 0))
1903 this->unit_face_support_points[face_no].resize(0);
1904 flag_has_no_support_points =
true;
1909 if (flag_has_no_support_points)
1914 this->unit_face_support_points[face_no].resize(
1915 this->n_dofs_per_face(face_no));
1917 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
1919 const unsigned int base_i =
1920 this->face_system_to_base_table[face_no][i].first.first;
1921 const unsigned int index_in_base =
1922 this->face_system_to_base_table[face_no][i].second;
1926 base_element(base_i).unit_face_support_points[face_no].size(),
1929 this->unit_face_support_points[face_no][i] =
1930 base_element(base_i)
1931 .unit_face_support_points[face_no][index_in_base];
1944 generalized_support_points_index_table.resize(this->n_base_elements());
1946 for (
unsigned int base = 0; base < this->n_base_elements(); ++base)
1957 if (!base_element(base).has_generalized_support_points())
1960 for (
const auto &
point :
1961 base_element(base).get_generalized_support_points())
1965 std::find(
std::begin(this->generalized_support_points),
1966 std::end(this->generalized_support_points),
1969 if (p ==
std::end(this->generalized_support_points))
1972 const auto n = this->generalized_support_points.size();
1973 generalized_support_points_index_table[base].push_back(n);
1974 this->generalized_support_points.push_back(
point);
1979 const auto n = p -
std::begin(this->generalized_support_points);
1980 generalized_support_points_index_table[base].push_back(n);
1987 for (
unsigned int i = 0; i < base_elements.size(); ++i)
1989 if (!base_element(i).has_generalized_support_points())
1992 const auto &points =
1993 base_elements[i].first->get_generalized_support_points();
1994 for (
unsigned int j = 0; j < points.size(); ++j)
1996 const auto n = generalized_support_points_index_table[i][j];
1997 Assert(this->generalized_support_points[n] == points[j],
2007 for (
unsigned int face_no = 0; face_no < this->n_unique_faces();
2012 Assert(this->adjust_quad_dof_index_for_face_orientation_table[face_no]
2013 .n_elements() == 8 * this->n_dofs_per_quad(face_no),
2018 unsigned int index = 0;
2019 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2022 this->base_element(
b)
2023 .adjust_quad_dof_index_for_face_orientation_table[face_no];
2024 for (
unsigned int c = 0; c < this->element_multiplicity(
b); ++c)
2026 for (
unsigned int i = 0; i < temp.size(0); ++i)
2027 for (
unsigned int j = 0; j < 8; ++j)
2028 this->adjust_quad_dof_index_for_face_orientation_table
2029 [face_no](index + i, j) = temp(i, j);
2030 index += temp.size(0);
2037 Assert(this->adjust_line_dof_index_for_line_orientation_table.size() ==
2038 this->n_dofs_per_line(),
2040 unsigned int index = 0;
2041 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2043 const std::vector<int> &temp2 =
2044 this->base_element(
b)
2045 .adjust_line_dof_index_for_line_orientation_table;
2046 for (
unsigned int c = 0; c < this->element_multiplicity(
b); ++c)
2051 this->adjust_line_dof_index_for_line_orientation_table.begin() +
2053 index += temp2.size();
2065 template <
int dim,
int spacedim>
2069 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2070 if (base_element(
b).hp_constraints_are_implemented() ==
false)
2078 template <
int dim,
int spacedim>
2083 const unsigned int face_no)
const
2085 Assert(interpolation_matrix.
n() == this->n_dofs_per_face(face_no),
2087 this->n_dofs_per_face(face_no)));
2102 if (
const auto *fe_other_system =
2106 interpolation_matrix = 0;
2110 unsigned int base_index = 0, base_index_other = 0;
2111 unsigned int multiplicity = 0, multiplicity_other = 0;
2126 base_to_base_interpolation.reinit(base_other.n_dofs_per_face(face_no),
2129 base_to_base_interpolation,
2135 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
2136 if (this->face_system_to_base_index(i, face_no).first ==
2137 std::make_pair(base_index, multiplicity))
2138 for (
unsigned int j = 0;
2139 j < fe_other_system->n_dofs_per_face(face_no);
2141 if (fe_other_system->face_system_to_base_index(j, face_no)
2143 std::make_pair(base_index_other, multiplicity_other))
2144 interpolation_matrix(j, i) = base_to_base_interpolation(
2145 fe_other_system->face_system_to_base_index(j, face_no)
2147 this->face_system_to_base_index(i, face_no).second);
2153 if (multiplicity == this->element_multiplicity(base_index))
2158 ++multiplicity_other;
2159 if (multiplicity_other ==
2160 fe_other_system->element_multiplicity(base_index_other))
2162 multiplicity_other = 0;
2168 if (base_index == this->n_base_elements())
2170 Assert(base_index_other == fe_other_system->n_base_elements(),
2177 Assert(base_index_other != fe_other_system->n_base_elements(),
2188 spacedim>::ExcInterpolationNotImplemented()));
2194 template <
int dim,
int spacedim>
2198 const unsigned int subface,
2200 const unsigned int face_no)
const
2203 (x_source_fe.
get_name().find(
"FESystem<") == 0) ||
2207 Assert(interpolation_matrix.
n() == this->n_dofs_per_face(face_no),
2209 this->n_dofs_per_face(face_no)));
2226 if (fe_other_system !=
nullptr)
2229 interpolation_matrix = 0;
2233 unsigned int base_index = 0, base_index_other = 0;
2234 unsigned int multiplicity = 0, multiplicity_other = 0;
2249 base_to_base_interpolation.reinit(base_other.n_dofs_per_face(face_no),
2253 base_to_base_interpolation,
2259 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
2260 if (this->face_system_to_base_index(i, face_no).first ==
2261 std::make_pair(base_index, multiplicity))
2262 for (
unsigned int j = 0;
2267 std::make_pair(base_index_other, multiplicity_other))
2268 interpolation_matrix(j, i) = base_to_base_interpolation(
2271 this->face_system_to_base_index(i, face_no).second);
2277 if (multiplicity == this->element_multiplicity(base_index))
2282 ++multiplicity_other;
2283 if (multiplicity_other ==
2286 multiplicity_other = 0;
2292 if (base_index == this->n_base_elements())
2309 fe_other_system !=
nullptr,
2311 spacedim>::ExcInterpolationNotImplemented()));
2317 template <
int dim,
int spacedim>
2318 template <
int structdim>
2319 std::vector<std::pair<unsigned int, unsigned int>>
2322 const unsigned int face_no)
const
2341 unsigned int base_index = 0, base_index_other = 0;
2342 unsigned int multiplicity = 0, multiplicity_other = 0;
2346 unsigned int dof_offset = 0, dof_offset_other = 0;
2348 std::vector<std::pair<unsigned int, unsigned int>> identities;
2362 std::vector<std::pair<unsigned int, unsigned int>> base_identities;
2379 for (
const auto &base_identity : base_identities)
2380 identities.emplace_back(base_identity.first + dof_offset,
2381 base_identity.second + dof_offset_other);
2384 dof_offset += base.template n_dofs_per_object<structdim>();
2386 base_other.template n_dofs_per_object<structdim>();
2392 if (multiplicity == this->element_multiplicity(base_index))
2397 ++multiplicity_other;
2398 if (multiplicity_other ==
2399 fe_other_system->element_multiplicity(base_index_other))
2401 multiplicity_other = 0;
2407 if (base_index == this->n_base_elements())
2409 Assert(base_index_other == fe_other_system->n_base_elements(),
2416 Assert(base_index_other != fe_other_system->n_base_elements(),
2425 return std::vector<std::pair<unsigned int, unsigned int>>();
2431 template <
int dim,
int spacedim>
2432 std::vector<std::pair<unsigned int, unsigned int>>
2436 return hp_object_dof_identities<0>(fe_other);
2439 template <
int dim,
int spacedim>
2440 std::vector<std::pair<unsigned int, unsigned int>>
2444 return hp_object_dof_identities<1>(fe_other);
2449 template <
int dim,
int spacedim>
2450 std::vector<std::pair<unsigned int, unsigned int>>
2453 const unsigned int face_no)
const
2455 return hp_object_dof_identities<2>(fe_other, face_no);
2460 template <
int dim,
int spacedim>
2464 const unsigned int codim)
const
2475 Assert(this->n_components() == fe_sys_other->n_components(),
2477 Assert(this->n_base_elements() == fe_sys_other->n_base_elements(),
2484 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2486 Assert(this->base_element(
b).n_components() ==
2487 fe_sys_other->base_element(
b).n_components(),
2489 Assert(this->element_multiplicity(
b) ==
2490 fe_sys_other->element_multiplicity(
b),
2496 (this->base_element(
b).compare_for_domination(
2497 fe_sys_other->base_element(
b), codim));
2498 domination = domination & base_domination;
2510 template <
int dim,
int spacedim>
2515 return *base_elements[index].first;
2520 template <
int dim,
int spacedim>
2523 const unsigned int shape_index,
2524 const unsigned int face_index)
const
2526 return (base_element(this->system_to_base_index(shape_index).
first.first)
2527 .has_support_on_face(this->system_to_base_index(shape_index).second,
2533 template <
int dim,
int spacedim>
2539 (this->unit_support_points.size() == 0),
2548 return (base_element(this->system_to_base_index(index).
first.first)
2549 .unit_support_point(this->system_to_base_index(index).second));
2554 template <
int dim,
int spacedim>
2557 const unsigned int index,
2558 const unsigned int face_no)
const
2562 (this->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2563 .size() == this->n_dofs_per_face(face_no)) ||
2564 (this->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2569 if (this->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2572 ->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2578 base_element(this->face_system_to_base_index(index, face_no).
first.first)
2579 .unit_face_support_point(
2580 this->face_system_to_base_index(index, face_no).second, face_no));
2585 template <
int dim,
int spacedim>
2586 std::pair<Table<2, bool>, std::vector<unsigned int>>
2592 Table<2, bool> constant_modes(this->n_components(), this->n_dofs_per_cell());
2593 std::vector<unsigned int> components;
2594 for (
unsigned int i = 0; i < base_elements.size(); ++i)
2596 const std::pair<Table<2, bool>, std::vector<unsigned int>> base_table =
2597 base_elements[i].first->get_constant_modes();
2599 const unsigned int element_multiplicity = this->element_multiplicity(i);
2604 const unsigned int comp = components.size();
2605 if (constant_modes.n_rows() <
2606 comp + base_table.first.n_rows() * element_multiplicity)
2608 Table<2, bool> new_constant_modes(comp + base_table.first.n_rows() *
2609 element_multiplicity,
2610 constant_modes.n_cols());
2611 for (
unsigned int r = 0; r < comp; ++r)
2612 for (
unsigned int c = 0; c < this->n_dofs_per_cell(); ++c)
2613 new_constant_modes(r, c) = constant_modes(r, c);
2614 constant_modes.swap(new_constant_modes);
2619 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
2621 std::pair<std::pair<unsigned int, unsigned int>,
unsigned int> ind =
2622 this->system_to_base_index(k);
2623 if (ind.first.first == i)
2624 for (
unsigned int c = 0; c < base_table.first.n_rows(); ++c)
2625 constant_modes(comp +
2626 ind.first.second * base_table.first.n_rows() + c,
2627 k) = base_table.first(c, ind.second);
2629 for (
unsigned int r = 0; r < element_multiplicity; ++r)
2630 for (
const unsigned int c : base_table.second)
2631 components.push_back(
2632 comp + r * this->base_elements[i].
first->n_components() + c);
2635 return std::pair<Table<2, bool>, std::vector<unsigned int>>(constant_modes,
2641 template <
int dim,
int spacedim>
2645 std::vector<double> & dof_values)
const
2647 Assert(this->has_generalized_support_points(),
2648 ExcMessage(
"The FESystem does not have generalized support points"));
2651 this->get_generalized_support_points().size());
2654 std::vector<double> base_dof_values;
2655 std::vector<Vector<double>> base_point_values;
2660 unsigned int current_vector_component = 0;
2661 for (
unsigned int base = 0; base < base_elements.size(); ++base)
2666 const auto & base_element = this->base_element(base);
2667 const unsigned int multiplicity = this->element_multiplicity(base);
2668 const unsigned int n_base_dofs = base_element.n_dofs_per_cell();
2669 const unsigned int n_base_components = base_element.n_components();
2674 if (n_base_dofs == 0)
2676 current_vector_component += multiplicity * n_base_components;
2680 if (base_element.has_generalized_support_points())
2682 const unsigned int n_base_points =
2683 base_element.get_generalized_support_points().size();
2685 base_dof_values.resize(n_base_dofs);
2686 base_point_values.resize(n_base_points);
2688 for (
unsigned int m = 0; m < multiplicity;
2689 ++m, current_vector_component += n_base_components)
2693 for (
unsigned int j = 0; j < base_point_values.size(); ++j)
2695 base_point_values[j].reinit(n_base_components,
false);
2698 generalized_support_points_index_table[base][j];
2704 const auto end =
begin + n_base_components;
2709 .convert_generalized_support_point_values_to_dof_values(
2710 base_point_values, base_dof_values);
2719 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
2720 if (this->system_to_base_index(i).first ==
2721 std::make_pair(base, m))
2723 base_dof_values[this->system_to_base_index(i).second];
2735 for (
unsigned int m = 0; m < multiplicity; ++m)
2736 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
2737 if (this->system_to_base_index(i).first ==
2738 std::make_pair(base, m))
2739 dof_values[i] = std::numeric_limits<double>::signaling_NaN();
2741 current_vector_component += multiplicity * n_base_components;
2748 template <
int dim,
int spacedim>
2756 sizeof(base_elements));
2757 for (
unsigned int i = 0; i < base_elements.size(); ++i)
2765 #include "fe_system.inst"
void set_fe_data(const unsigned int base_no, std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase >)
InternalData(const unsigned int n_base_elements)
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 void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const override
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() 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 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
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const override
virtual unsigned int face_to_cell_index(const unsigned int face_dof_index, const unsigned int face, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false) const override
virtual Point< dim - 1 > unit_face_support_point(const unsigned int index, const unsigned int face_no=0) const override
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
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 Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
std::vector< std::pair< std::unique_ptr< const FiniteElement< dim, spacedim > >, unsigned int > > base_elements
virtual std::size_t memory_consumption() 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 convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double >> &support_point_values, std::vector< double > &dof_values) const override
virtual Tensor< 4, dim > shape_4th_derivative(const unsigned int i, const Point< dim > &p) const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
virtual Point< dim > unit_support_point(const unsigned int index) 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 double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) 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 bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
virtual double shape_value(const unsigned int i, const Point< dim > &p) const override
virtual std::string get_name() 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(const unsigned int i, const Point< dim > &p) const override
virtual Tensor< 4, dim > shape_4th_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
void build_interface_constraints()
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
virtual bool hp_constraints_are_implemented() const override
void initialize(const std::vector< const FiniteElement< dim, spacedim > * > &fes, const std::vector< unsigned int > &multiplicities)
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 FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
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 const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const override
virtual Tensor< 3, dim > shape_3rd_derivative(const unsigned int i, const Point< dim > &p) const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
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 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 std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
virtual Tensor< 3, dim > shape_3rd_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) 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 std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
bool is_primitive() 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
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
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 void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix, 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
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > system_to_base_table
unsigned int element_multiplicity(const unsigned int index) const
unsigned int n_nonzero_components(const unsigned int i) const
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 std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) 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
unsigned int n_base_elements() const
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > system_to_base_index(const unsigned int index) 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
unsigned int size() const
unsigned int max_n_quadrature_points() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define Assert(cond, exc)
static ::ExceptionBase & ExcNotImplemented()
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
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)
@ neither_element_dominates
std::enable_if_t< std::is_fundamental< T >::value, std::size_t > memory_consumption(const T &t)
Point< spacedim > point(const gp_Pnt &p, const double tolerance=1e-10)
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
VectorType::value_type * begin(VectorType &V)
VectorType::value_type * end(VectorType &V)
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)
void copy(const T *begin, const T *end, U *dest)
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 unsigned int n_q_points, 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)
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)
static const unsigned int invalid_unsigned_int