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,
146 const unsigned int n_dofs_per_cell =
149 auto copy_row = [](
const auto row_in,
auto row_out) {
150 std::copy(row_in.begin(), row_in.end(), row_out.begin());
154 for (
unsigned int component = 0; component < n_components; ++component)
155 for (
unsigned int b = 0; b < n_dofs_per_cell; ++b)
158 output_data.
shape_values[base_to_system_table[component][b]]);
161 for (
unsigned int component = 0; component < n_components; ++component)
162 for (
unsigned int b = 0; b < n_dofs_per_cell; ++b)
168 for (
unsigned int component = 0; component < n_components; ++component)
169 for (
unsigned int b = 0; b < n_dofs_per_cell; ++b)
175 for (
unsigned int component = 0; component < n_components; ++component)
176 for (
unsigned int b = 0; b < n_dofs_per_cell; ++b)
187 template <
int dim,
int spacedim = dim>
191 const unsigned int base_no,
192 const unsigned int n_q_points,
204 for (
const auto &offset : offsets)
207 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
208 for (
unsigned int q = 0; q < n_q_points; ++q)
213 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
214 for (
unsigned int q = 0; q < n_q_points; ++q)
219 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
220 for (
unsigned int q = 0; q < n_q_points; ++q)
225 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
226 for (
unsigned int q = 0; q < n_q_points; ++q)
236template <
int dim,
int spacedim>
238 const unsigned int n_base_elements)
239 : base_fe_datas(n_base_elements)
240 , base_fe_output_objects(n_base_elements)
245template <
int dim,
int spacedim>
254template <
int dim,
int spacedim>
257 const unsigned int base_no)
const
260 return *base_fe_datas[base_no];
265template <
int dim,
int spacedim>
268 const unsigned int base_no,
272 base_fe_datas[base_no] = std::move(ptr);
277template <
int dim,
int spacedim>
280 const unsigned int base_no)
const
283 return base_fe_output_objects[base_no];
291template <
int dim,
int spacedim>
295template <
int dim,
int spacedim>
297 const unsigned int n_elements)
308 , base_elements((n_elements > 0))
310 const std::vector<const FiniteElement<dim, spacedim> *> fes = {&fe};
311 const std::vector<unsigned int> multiplicities = {n_elements};
312 initialize(fes, multiplicities);
317template <
int dim,
int spacedim>
319 const unsigned int n1,
321 const unsigned int n2)
332 , base_elements(
static_cast<int>(n1 > 0) +
static_cast<int>(n2 > 0))
334 const std::vector<const FiniteElement<dim, spacedim> *> fes = {&fe1, &fe2};
335 const std::vector<unsigned int> multiplicities = {n1, n2};
336 initialize(fes, multiplicities);
341template <
int dim,
int spacedim>
343 const unsigned int n1,
345 const unsigned int n2,
347 const unsigned int n3)
359 , base_elements(
static_cast<int>(n1 > 0) +
static_cast<int>(n2 > 0) +
360 static_cast<int>(n3 > 0))
362 const std::vector<const FiniteElement<dim, spacedim> *> fes = {&fe1,
365 const std::vector<unsigned int> multiplicities = {n1, n2, n3};
366 initialize(fes, multiplicities);
371template <
int dim,
int spacedim>
373 const unsigned int n1,
375 const unsigned int n2,
377 const unsigned int n3,
379 const unsigned int n4)
382 {&fe1, &fe2, &fe3, &fe4},
386 {&fe1, &fe2, &fe3, &fe4},
389 {&fe1, &fe2, &fe3, &fe4},
391 , base_elements(
static_cast<int>(n1 > 0) +
static_cast<int>(n2 > 0) +
392 static_cast<int>(n3 > 0) +
static_cast<int>(n4 > 0))
394 const std::vector<const FiniteElement<dim, spacedim> *> fes = {&fe1,
398 const std::vector<unsigned int> multiplicities = {n1, n2, n3, n4};
399 initialize(fes, multiplicities);
404template <
int dim,
int spacedim>
406 const unsigned int n1,
408 const unsigned int n2,
410 const unsigned int n3,
412 const unsigned int n4,
414 const unsigned int n5)
417 {&fe1, &fe2, &fe3, &fe4, &fe5},
418 {n1, n2, n3, n4, n5}),
421 {&fe1, &fe2, &fe3, &fe4, &fe5},
422 {n1, n2, n3, n4, n5}),
424 {&fe1, &fe2, &fe3, &fe4, &fe5},
425 {n1, n2, n3, n4, n5}))
426 , base_elements(
static_cast<int>(n1 > 0) +
static_cast<int>(n2 > 0) +
427 static_cast<int>(n3 > 0) +
static_cast<int>(n4 > 0) +
428 static_cast<int>(n5 > 0))
430 const std::vector<const FiniteElement<dim, spacedim> *> fes = {
431 &fe1, &fe2, &fe3, &fe4, &fe5};
432 const std::vector<unsigned int> multiplicities = {n1, n2, n3, n4, n5};
433 initialize(fes, multiplicities);
438template <
int dim,
int spacedim>
441 const std::vector<unsigned int> &multiplicities)
448 , base_elements(count_nonzeros(multiplicities))
450 initialize(fes, multiplicities);
455template <
int dim,
int spacedim>
466 std::ostringstream namebuf;
469 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
471 namebuf << base_element(i).get_name();
472 if (this->element_multiplicity(i) != 1)
473 namebuf <<
'^' << this->element_multiplicity(i);
474 if (i != this->n_base_elements() - 1)
479 return namebuf.str();
484template <
int dim,
int spacedim>
485std::unique_ptr<FiniteElement<dim, spacedim>>
488 std::vector<const FiniteElement<dim, spacedim> *> fes;
489 std::vector<unsigned int> multiplicities;
491 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
493 fes.push_back(&base_element(i));
494 multiplicities.push_back(this->element_multiplicity(i));
496 return std::make_unique<FESystem<dim, spacedim>>(fes, multiplicities);
501template <
int dim,
int spacedim>
504 const unsigned int first_component,
505 const unsigned int n_selected_components)
const
507 Assert(first_component + n_selected_components <= this->n_components(),
508 ExcMessage(
"Invalid arguments (not a part of this FiniteElement)."));
510 const unsigned int base_index =
511 this->component_to_base_table[first_component].first.first;
512 const unsigned int component_in_base =
513 this->component_to_base_table[first_component].first.second;
514 const unsigned int base_components =
515 this->base_element(base_index).n_components();
519 if (n_selected_components <= base_components)
520 return this->base_element(base_index)
521 .get_sub_fe(component_in_base, n_selected_components);
523 Assert(n_selected_components == this->n_components(),
524 ExcMessage(
"You can not select a part of a FiniteElement."));
530template <
int dim,
int spacedim>
536 Assert(this->is_primitive(i),
540 return (base_element(this->system_to_base_table[i].
first.first)
541 .shape_value(this->system_to_base_table[i].second, p));
546template <
int dim,
int spacedim>
549 const unsigned int i,
551 const unsigned int component)
const
558 if (this->nonzero_components[i][component] ==
false)
566 const unsigned int base = this->component_to_base_index(component).first;
567 const unsigned int component_in_base =
568 this->component_to_base_index(component).second;
576 return (base_element(base).shape_value_component(
577 this->system_to_base_table[i].
second, p, component_in_base));
582template <
int dim,
int spacedim>
588 Assert(this->is_primitive(i),
592 return (base_element(this->system_to_base_table[i].
first.first)
593 .shape_grad(this->system_to_base_table[i].second, p));
598template <
int dim,
int spacedim>
601 const unsigned int i,
603 const unsigned int component)
const
609 if (this->nonzero_components[i][component] ==
false)
614 const unsigned int base = this->component_to_base_index(component).first;
615 const unsigned int component_in_base =
616 this->component_to_base_index(component).second;
621 return (base_element(base).shape_grad_component(
622 this->system_to_base_table[i].
second, p, component_in_base));
627template <
int dim,
int spacedim>
633 Assert(this->is_primitive(i),
637 return (base_element(this->system_to_base_table[i].
first.first)
638 .shape_grad_grad(this->system_to_base_table[i].second, p));
643template <
int dim,
int spacedim>
646 const unsigned int i,
648 const unsigned int component)
const
654 if (this->nonzero_components[i][component] ==
false)
659 const unsigned int base = this->component_to_base_index(component).first;
660 const unsigned int component_in_base =
661 this->component_to_base_index(component).second;
666 return (base_element(base).shape_grad_grad_component(
667 this->system_to_base_table[i].
second, p, component_in_base));
672template <
int dim,
int spacedim>
678 Assert(this->is_primitive(i),
682 return (base_element(this->system_to_base_table[i].
first.first)
683 .shape_3rd_derivative(this->system_to_base_table[i].second, p));
688template <
int dim,
int spacedim>
691 const unsigned int i,
693 const unsigned int component)
const
699 if (this->nonzero_components[i][component] ==
false)
704 const unsigned int base = this->component_to_base_index(component).first;
705 const unsigned int component_in_base =
706 this->component_to_base_index(component).second;
711 return (base_element(base).shape_3rd_derivative_component(
712 this->system_to_base_table[i].
second, p, component_in_base));
717template <
int dim,
int spacedim>
723 Assert(this->is_primitive(i),
727 return (base_element(this->system_to_base_table[i].
first.first)
728 .shape_4th_derivative(this->system_to_base_table[i].second, p));
733template <
int dim,
int spacedim>
736 const unsigned int i,
738 const unsigned int component)
const
744 if (this->nonzero_components[i][component] ==
false)
749 const unsigned int base = this->component_to_base_index(component).first;
750 const unsigned int component_in_base =
751 this->component_to_base_index(component).second;
756 return (base_element(base).shape_4th_derivative_component(
757 this->system_to_base_table[i].
second, p, component_in_base));
762template <
int dim,
int spacedim>
772 Assert((interpolation_matrix.
m() == this->n_dofs_per_cell()) ||
775 this->n_dofs_per_cell()));
777 (this->n_dofs_per_cell() == 0),
787 (x_source_fe.
get_name().find(
"FESystem<") == 0) ||
801 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
805 spacedim>::ExcInterpolationNotImplemented()));
814 std::vector<FullMatrix<double>> base_matrices(this->n_base_elements());
815 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
817 base_matrices[i].reinit(base_element(i).n_dofs_per_cell(),
819 base_element(i).get_interpolation_matrix(source_fe.
base_element(i),
826 interpolation_matrix = 0;
827 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
829 if (this->system_to_base_table[i].
first ==
831 interpolation_matrix(i, j) =
832 (base_matrices[this->system_to_base_table[i].first.first](
833 this->system_to_base_table[i].second,
839template <
int dim,
int spacedim>
842 const unsigned int child,
849 "Restriction matrices are only available for refined cells!"));
855 if (this->restriction[refinement_case - 1][child].n() == 0)
857 std::lock_guard<std::mutex> lock(restriction_matrix_mutex);
860 if (this->restriction[refinement_case - 1][child].n() ==
861 this->n_dofs_per_cell())
862 return this->restriction[refinement_case - 1][child];
865 std::vector<const FullMatrix<double> *> base_matrices(
866 this->n_base_elements());
868 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
871 &base_element(i).get_restriction_matrix(child, refinement_case);
873 Assert(base_matrices[i]->n() == base_element(i).n_dofs_per_cell(),
878 this->n_dofs_per_cell());
888 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
889 for (
unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
896 if (this->system_to_base_table[i].
first !=
897 this->system_to_base_table[j].
first)
901 const unsigned int base = this->system_to_base_table[i].first.first;
903 const unsigned int base_index_i =
904 this->system_to_base_table[i].second,
906 this->system_to_base_table[j].second;
911 (*base_matrices[base])(base_index_i, base_index_j);
915 this->restriction[refinement_case - 1][child]) = std::move(restriction);
918 return this->restriction[refinement_case - 1][child];
923template <
int dim,
int spacedim>
926 const unsigned int child,
933 "Restriction matrices are only available for refined cells!"));
938 if (this->prolongation[refinement_case - 1][child].n() == 0)
940 std::lock_guard<std::mutex> lock(prolongation_matrix_mutex);
942 if (this->prolongation[refinement_case - 1][child].n() ==
943 this->n_dofs_per_cell())
944 return this->prolongation[refinement_case - 1][child];
946 std::vector<const FullMatrix<double> *> base_matrices(
947 this->n_base_elements());
948 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
951 &base_element(i).get_prolongation_matrix(child, refinement_case);
953 Assert(base_matrices[i]->n() == base_element(i).n_dofs_per_cell(),
958 this->n_dofs_per_cell());
960 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
961 for (
unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
963 if (this->system_to_base_table[i].
first !=
964 this->system_to_base_table[j].
first)
966 const unsigned int base = this->system_to_base_table[i].first.first;
968 const unsigned int base_index_i =
969 this->system_to_base_table[i].second,
971 this->system_to_base_table[j].second;
973 (*base_matrices[base])(base_index_i, base_index_j);
977 this->prolongation[refinement_case - 1][child]) = std::move(prolongate);
980 return this->prolongation[refinement_case - 1][child];
984template <
int dim,
int spacedim>
987 const unsigned int face_dof_index,
988 const unsigned int face,
989 const unsigned char combined_orientation)
const
994 const std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>
995 face_base_index = this->face_system_to_base_index(face_dof_index, face);
997 const unsigned int base_face_to_cell_index =
998 this->base_element(face_base_index.first.first)
999 .face_to_cell_index(face_base_index.second, face, combined_orientation);
1006 const std::pair<std::pair<unsigned int, unsigned int>,
unsigned int> target =
1007 std::make_pair(face_base_index.first, base_face_to_cell_index);
1008 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
1009 if (this->system_to_base_index(i) == target)
1024template <
int dim,
int spacedim>
1031 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1032 out |= base_element(base_no).requires_update_flags(flags);
1038template <
int dim,
int spacedim>
1039std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1055 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1056 data_ptr = std::make_unique<InternalData>(this->n_base_elements());
1057 auto &data =
dynamic_cast<InternalData &
>(*data_ptr);
1058 data.update_each = requires_update_flags(flags);
1072 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1075 &base_fe_output_object = data.get_fe_output_object(base_no);
1078 base_element(base_no),
1079 flags | base_element(base_no).requires_update_flags(flags));
1087 auto base_fe_data = base_element(base_no).get_data(flags,
1090 base_fe_output_object);
1092 data.set_fe_data(base_no, std::move(base_fe_data));
1101template <
int dim,
int spacedim>
1102std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1118 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1119 data_ptr = std::make_unique<InternalData>(this->n_base_elements());
1120 auto &data =
dynamic_cast<InternalData &
>(*data_ptr);
1121 data.update_each = requires_update_flags(flags);
1135 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1138 &base_fe_output_object = data.get_fe_output_object(base_no);
1141 base_element(base_no),
1142 flags | base_element(base_no).requires_update_flags(flags));
1150 auto base_fe_data = base_element(base_no).get_face_data(
1151 flags, mapping, quadrature, base_fe_output_object);
1153 data.set_fe_data(base_no, std::move(base_fe_data));
1164template <
int dim,
int spacedim>
1165std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1181 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1182 data_ptr = std::make_unique<InternalData>(this->n_base_elements());
1183 auto &data =
dynamic_cast<InternalData &
>(*data_ptr);
1185 data.update_each = requires_update_flags(flags);
1199 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1202 &base_fe_output_object = data.get_fe_output_object(base_no);
1205 base_element(base_no),
1206 flags | base_element(base_no).requires_update_flags(flags));
1214 auto base_fe_data = base_element(base_no).get_subface_data(
1215 flags, mapping, quadrature, base_fe_output_object);
1217 data.set_fe_data(base_no, std::move(base_fe_data));
1225template <
int dim,
int spacedim>
1240 compute_fill(mapping,
1242 invalid_face_number,
1243 invalid_face_number,
1254template <
int dim,
int spacedim>
1258 const unsigned int face_no,
1269 compute_fill(mapping,
1272 invalid_face_number,
1283template <
int dim,
int spacedim>
1287 const unsigned int face_no,
1288 const unsigned int sub_no,
1299 compute_fill(mapping,
1313template <
int dim,
int spacedim>
1314template <
class Q_or_QC>
1319 const unsigned int face_no,
1320 const unsigned int sub_no,
1321 const Q_or_QC &quadrature,
1334 Assert(
dynamic_cast<const InternalData *
>(&fe_internal) !=
nullptr,
1336 const InternalData &fe_data =
static_cast<const InternalData &
>(fe_internal);
1353 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1357 fe_data.get_fe_data(base_no);
1360 &base_data = fe_data.get_fe_output_object(base_no);
1366 const Quadrature<dim - 1> *sub_face_quadrature =
nullptr;
1370 if (face_no == invalid_face_number)
1375 n_q_points = cell_quadrature->
size();
1377 else if (sub_no == invalid_face_number)
1386 (*face_quadrature)[face_quadrature->size() == 1 ? 0 : face_no]
1391 sub_face_quadrature =
1392 dynamic_cast<const Quadrature<dim - 1
> *>(&quadrature);
1395 n_q_points = sub_face_quadrature->size();
1407 if (face_no == invalid_face_number)
1416 else if (sub_no == invalid_face_number)
1429 *sub_face_quadrature,
1447 primitive_offset_tables[base_no],
1458 nonprimitive_offset_tables[base_no],
1466template <
int dim,
int spacedim>
1474 for (
unsigned int base = 0; base < this->n_base_elements(); ++base)
1475 if (base_element(base).constraints_are_implemented() ==
false)
1481 const unsigned int face_no = 0;
1483 this->interface_constraints.TableBase<2, double>::reinit(
1484 this->interface_constraints_size());
1494 for (
unsigned int n = 0; n < this->interface_constraints.n(); ++n)
1495 for (
unsigned int m = 0; m < this->interface_constraints.m(); ++m)
1504 const std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>
1505 n_index = this->face_system_to_base_table[face_no][n];
1509 std::pair<std::pair<unsigned int, unsigned int>,
unsigned int> m_index;
1526 if (m < this->n_dofs_per_vertex())
1527 m_index = this->system_to_base_table[m];
1531 const unsigned int index_in_line =
1532 (m - this->n_dofs_per_vertex()) % this->n_dofs_per_line();
1533 const unsigned int sub_line =
1534 (m - this->n_dofs_per_vertex()) / this->n_dofs_per_line();
1541 const unsigned int tmp1 =
1542 2 * this->n_dofs_per_vertex() + index_in_line;
1544 this->face_system_to_base_table[face_no][tmp1].first;
1556 this->face_system_to_base_table[face_no][tmp1].
second >=
1558 base_element(m_index.first.first).n_dofs_per_vertex(),
1560 const unsigned int tmp2 =
1561 this->face_system_to_base_table[face_no][tmp1].second -
1562 2 * base_element(m_index.first.first).n_dofs_per_vertex();
1563 Assert(tmp2 < base_element(m_index.first.first)
1567 base_element(m_index.first.first).n_dofs_per_vertex() +
1568 base_element(m_index.first.first).n_dofs_per_line() *
1582 if (m < 5 * this->n_dofs_per_vertex())
1583 m_index = this->system_to_base_table[m];
1586 if (m < 5 * this->n_dofs_per_vertex() +
1587 12 * this->n_dofs_per_line())
1590 const unsigned int index_in_line =
1591 (m - 5 * this->n_dofs_per_vertex()) %
1592 this->n_dofs_per_line();
1593 const unsigned int sub_line =
1594 (m - 5 * this->n_dofs_per_vertex()) /
1595 this->n_dofs_per_line();
1598 const unsigned int tmp1 =
1599 4 * this->n_dofs_per_vertex() + index_in_line;
1601 this->face_system_to_base_table[face_no][tmp1].first;
1604 this->face_system_to_base_table[face_no][tmp1].
second >=
1605 4 * base_element(m_index.first.first)
1606 .n_dofs_per_vertex(),
1608 const unsigned int tmp2 =
1609 this->face_system_to_base_table[face_no][tmp1].second -
1611 base_element(m_index.first.first).n_dofs_per_vertex();
1612 Assert(tmp2 < base_element(m_index.first.first)
1616 5 * base_element(m_index.first.first)
1617 .n_dofs_per_vertex() +
1618 base_element(m_index.first.first).n_dofs_per_line() *
1626 const unsigned int index_in_quad =
1627 (m - 5 * this->n_dofs_per_vertex() -
1628 12 * this->n_dofs_per_line()) %
1629 this->n_dofs_per_quad(face_no);
1630 Assert(index_in_quad < this->n_dofs_per_quad(face_no),
1632 const unsigned int sub_quad =
1633 ((m - 5 * this->n_dofs_per_vertex() -
1634 12 * this->n_dofs_per_line()) /
1635 this->n_dofs_per_quad(face_no));
1638 const unsigned int tmp1 = 4 * this->n_dofs_per_vertex() +
1639 4 * this->n_dofs_per_line() +
1642 this->face_system_to_base_table[face_no].size(),
1645 this->face_system_to_base_table[face_no][tmp1].first;
1648 this->face_system_to_base_table[face_no][tmp1].
second >=
1649 4 * base_element(m_index.first.first)
1650 .n_dofs_per_vertex() +
1651 4 * base_element(m_index.first.first)
1654 const unsigned int tmp2 =
1655 this->face_system_to_base_table[face_no][tmp1].second -
1656 4 * base_element(m_index.first.first)
1657 .n_dofs_per_vertex() -
1658 4 * base_element(m_index.first.first).n_dofs_per_line();
1659 Assert(tmp2 < base_element(m_index.first.first)
1660 .n_dofs_per_quad(face_no),
1663 5 * base_element(m_index.first.first)
1664 .n_dofs_per_vertex() +
1666 base_element(m_index.first.first).n_dofs_per_line() +
1667 base_element(m_index.first.first)
1668 .n_dofs_per_quad(face_no) *
1683 if (n_index.first == m_index.first)
1684 this->interface_constraints(m, n) =
1685 (base_element(n_index.first.first)
1686 .constraints()(m_index.second, n_index.second));
1692template <
int dim,
int spacedim>
1696 const std::vector<unsigned int> &multiplicities)
1698 Assert(fes.size() == multiplicities.size(),
1701 ExcMessage(
"Need to pass at least one finite element."));
1702 Assert(count_nonzeros(multiplicities) > 0,
1703 ExcMessage(
"You only passed FiniteElements with multiplicity 0."));
1706 (void)reference_cell;
1707 Assert(std::all_of(fes.begin(),
1710 return fe->reference_cell() == reference_cell;
1712 ExcMessage(
"You cannot combine finite elements defined on "
1713 "different reference cells into a combined element "
1714 "such as an FESystem or FE_Enriched object."));
1719 this->base_to_block_indices.reinit(0, 0);
1721 for (
unsigned int i = 0; i < fes.size(); ++i)
1722 if (multiplicities[i] > 0)
1723 this->base_to_block_indices.push_back(multiplicities[i]);
1728 unsigned int ind = 0;
1729 for (
unsigned int i = 0; i < fes.size(); ++i)
1730 if (multiplicities[i] > 0)
1733 base_elements[ind] = {fes[i]->clone(), multiplicities[i]};
1747 this->system_to_component_table.resize(this->n_dofs_per_cell());
1750 this->system_to_component_table,
1751 this->component_to_base_table,
1754 this->face_system_to_component_table.resize(this->n_unique_faces());
1756 for (
unsigned int face_no = 0; face_no < this->n_unique_faces(); ++face_no)
1758 this->face_system_to_component_table[face_no].resize(
1759 this->n_dofs_per_face(face_no));
1762 this->face_system_to_base_table[face_no],
1763 this->face_system_to_component_table[face_no],
1784 for (
unsigned int base_el = 0; base_el < this->n_base_elements(); ++base_el)
1785 if (!base_element(base_el).has_support_points() &&
1786 base_element(base_el).n_dofs_per_cell() != 0)
1795 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
1797 const unsigned int base = this->system_to_base_table[i].first.first,
1798 base_index = this->system_to_base_table[i].second;
1803 base_element(base).unit_support_points[base_index];
1808 primitive_offset_tables.resize(this->n_base_elements());
1810 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1811 if (base_element(base_no).is_primitive())
1812 primitive_offset_tables[base_no] =
1817 nonprimitive_offset_tables.resize(this->n_base_elements());
1819 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1820 if (!base_element(base_no).is_primitive())
1821 nonprimitive_offset_tables[base_no] =
1828 for (
unsigned int face_no = 0; face_no < this->n_unique_faces();
1841 bool flag_has_no_support_points =
false;
1843 for (
unsigned int base_el = 0; base_el < this->n_base_elements();
1845 if (!base_element(base_el).has_support_points() &&
1846 (base_element(base_el).n_dofs_per_face(face_no) > 0))
1848 this->unit_face_support_points[face_no].resize(0);
1849 flag_has_no_support_points =
true;
1854 if (flag_has_no_support_points)
1859 this->unit_face_support_points[face_no].resize(
1860 this->n_dofs_per_face(face_no));
1862 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
1864 const unsigned int base_i =
1865 this->face_system_to_base_table[face_no][i].first.first;
1866 const unsigned int index_in_base =
1867 this->face_system_to_base_table[face_no][i].second;
1871 base_element(base_i).unit_face_support_points[face_no].size(),
1874 this->unit_face_support_points[face_no][i] =
1875 base_element(base_i)
1876 .unit_face_support_points[face_no][index_in_base];
1889 generalized_support_points_index_table.resize(this->n_base_elements());
1891 for (
unsigned int base = 0; base < this->n_base_elements(); ++base)
1902 if (!base_element(base).has_generalized_support_points())
1905 for (
const auto &point :
1906 base_element(base).get_generalized_support_points())
1910 std::find(std::begin(this->generalized_support_points),
1911 std::end(this->generalized_support_points),
1914 if (p == std::end(this->generalized_support_points))
1917 const auto n = this->generalized_support_points.size();
1918 generalized_support_points_index_table[base].push_back(n);
1919 this->generalized_support_points.push_back(point);
1924 const auto n = p - std::begin(this->generalized_support_points);
1925 generalized_support_points_index_table[base].push_back(n);
1932 for (
unsigned int i = 0; i < base_elements.size(); ++i)
1934 if (!base_element(i).has_generalized_support_points())
1937 const auto &points =
1938 base_elements[i].first->get_generalized_support_points();
1939 for (
unsigned int j = 0; j < points.size(); ++j)
1941 const auto n = generalized_support_points_index_table[i][j];
1942 Assert(this->generalized_support_points[n] == points[j],
1952 for (
unsigned int face_no = 0; face_no < this->n_unique_faces();
1957 Assert(this->adjust_quad_dof_index_for_face_orientation_table[face_no]
1959 this->reference_cell().n_face_orientations(face_no) *
1960 this->n_dofs_per_quad(face_no),
1965 unsigned int index = 0;
1966 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
1969 this->base_element(b)
1970 .adjust_quad_dof_index_for_face_orientation_table[face_no];
1971 for (
unsigned int c = 0; c < this->element_multiplicity(b); ++c)
1973 for (
unsigned int i = 0; i < temp.size(0); ++i)
1974 for (
unsigned int j = 0;
1978 this->adjust_quad_dof_index_for_face_orientation_table
1979 [face_no](index + i, j) = temp(i, j);
1980 index += temp.size(0);
1987 Assert(this->adjust_line_dof_index_for_line_orientation_table.size() ==
1988 this->n_dofs_per_line(),
1990 unsigned int index = 0;
1991 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
1993 const std::vector<int> &temp2 =
1994 this->base_element(b)
1995 .adjust_line_dof_index_for_line_orientation_table;
1996 for (
unsigned int c = 0; c < this->element_multiplicity(b); ++c)
2001 this->adjust_line_dof_index_for_line_orientation_table.begin() +
2003 index += temp2.size();
2015template <
int dim,
int spacedim>
2019 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2020 if (base_element(b).hp_constraints_are_implemented() ==
false)
2028template <
int dim,
int spacedim>
2033 const unsigned int face_no)
const
2035 Assert(interpolation_matrix.
n() == this->n_dofs_per_face(face_no),
2037 this->n_dofs_per_face(face_no)));
2052 if (
const auto *fe_other_system =
2056 interpolation_matrix = 0;
2060 unsigned int base_index = 0, base_index_other = 0;
2061 unsigned int multiplicity = 0, multiplicity_other = 0;
2069 fe_other_system->base_element(
2076 base_to_base_interpolation.reinit(base_other.n_dofs_per_face(face_no),
2079 base_to_base_interpolation,
2085 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
2086 if (this->face_system_to_base_index(i, face_no).first ==
2087 std::make_pair(base_index, multiplicity))
2088 for (
unsigned int j = 0;
2089 j < fe_other_system->n_dofs_per_face(face_no);
2091 if (fe_other_system->face_system_to_base_index(j, face_no)
2093 std::make_pair(base_index_other, multiplicity_other))
2094 interpolation_matrix(j, i) = base_to_base_interpolation(
2095 fe_other_system->face_system_to_base_index(j, face_no)
2097 this->face_system_to_base_index(i, face_no).second);
2103 if (multiplicity == this->element_multiplicity(base_index))
2108 ++multiplicity_other;
2109 if (multiplicity_other ==
2110 fe_other_system->element_multiplicity(base_index_other))
2112 multiplicity_other = 0;
2118 if (base_index == this->n_base_elements())
2120 Assert(base_index_other == fe_other_system->n_base_elements(),
2127 Assert(base_index_other != fe_other_system->n_base_elements(),
2138 spacedim>::ExcInterpolationNotImplemented()));
2144template <
int dim,
int spacedim>
2148 const unsigned int subface,
2150 const unsigned int face_no)
const
2153 (x_source_fe.
get_name().find(
"FESystem<") == 0) ||
2157 Assert(interpolation_matrix.
n() == this->n_dofs_per_face(face_no),
2159 this->n_dofs_per_face(face_no)));
2176 if (fe_other_system !=
nullptr)
2179 interpolation_matrix = 0;
2183 unsigned int base_index = 0, base_index_other = 0;
2184 unsigned int multiplicity = 0, multiplicity_other = 0;
2199 base_to_base_interpolation.reinit(base_other.n_dofs_per_face(face_no),
2203 base_to_base_interpolation,
2209 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
2210 if (this->face_system_to_base_index(i, face_no).first ==
2211 std::make_pair(base_index, multiplicity))
2212 for (
unsigned int j = 0;
2217 std::make_pair(base_index_other, multiplicity_other))
2218 interpolation_matrix(j, i) = base_to_base_interpolation(
2221 this->face_system_to_base_index(i, face_no).second);
2227 if (multiplicity == this->element_multiplicity(base_index))
2232 ++multiplicity_other;
2233 if (multiplicity_other ==
2236 multiplicity_other = 0;
2242 if (base_index == this->n_base_elements())
2259 fe_other_system !=
nullptr,
2261 spacedim>::ExcInterpolationNotImplemented()));
2267template <
int dim,
int spacedim>
2268template <
int structdim>
2269std::vector<std::pair<unsigned int, unsigned int>>
2272 const unsigned int face_no)
const
2291 unsigned int base_index = 0, base_index_other = 0;
2292 unsigned int multiplicity = 0, multiplicity_other = 0;
2296 unsigned int dof_offset = 0, dof_offset_other = 0;
2298 std::vector<std::pair<unsigned int, unsigned int>> identities;
2312 std::vector<std::pair<unsigned int, unsigned int>> base_identities;
2329 for (
const auto &base_identity : base_identities)
2330 identities.emplace_back(base_identity.
first + dof_offset,
2331 base_identity.
second + dof_offset_other);
2334 dof_offset += base.template n_dofs_per_object<structdim>();
2336 base_other.template n_dofs_per_object<structdim>();
2342 if (multiplicity == this->element_multiplicity(base_index))
2347 ++multiplicity_other;
2348 if (multiplicity_other ==
2351 multiplicity_other = 0;
2357 if (base_index == this->n_base_elements())
2375 return std::vector<std::pair<unsigned int, unsigned int>>();
2381template <
int dim,
int spacedim>
2382std::vector<std::pair<unsigned int, unsigned int>>
2386 return hp_object_dof_identities<0>(fe_other);
2389template <
int dim,
int spacedim>
2390std::vector<std::pair<unsigned int, unsigned int>>
2394 return hp_object_dof_identities<1>(fe_other);
2399template <
int dim,
int spacedim>
2400std::vector<std::pair<unsigned int, unsigned int>>
2403 const unsigned int face_no)
const
2405 return hp_object_dof_identities<2>(fe_other, face_no);
2410template <
int dim,
int spacedim>
2414 const unsigned int codim)
const
2425 Assert(this->n_components() == fe_sys_other->n_components(),
2427 Assert(this->n_base_elements() == fe_sys_other->n_base_elements(),
2434 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2436 Assert(this->base_element(b).n_components() ==
2437 fe_sys_other->base_element(b).n_components(),
2439 Assert(this->element_multiplicity(b) ==
2440 fe_sys_other->element_multiplicity(b),
2446 (this->base_element(b).compare_for_domination(
2447 fe_sys_other->base_element(b), codim));
2448 domination = domination & base_domination;
2460template <
int dim,
int spacedim>
2465 return *base_elements[
index].first;
2470template <
int dim,
int spacedim>
2473 const unsigned int shape_index,
2474 const unsigned int face_index)
const
2476 return (base_element(this->system_to_base_index(shape_index).
first.first)
2477 .has_support_on_face(this->system_to_base_index(shape_index).second,
2483template <
int dim,
int spacedim>
2489 (this->unit_support_points.empty()),
2498 return (base_element(this->system_to_base_index(index).
first.first)
2499 .unit_support_point(this->system_to_base_index(index).second));
2504template <
int dim,
int spacedim>
2507 const unsigned int index,
2508 const unsigned int face_no)
const
2512 (this->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2513 .size() == this->n_dofs_per_face(face_no)) ||
2514 (this->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2516 (typename
FiniteElement<dim, spacedim>::ExcFEHasNoSupportPoints()));
2519 if (this->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2522 ->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2528 base_element(this->face_system_to_base_index(index, face_no).
first.first)
2529 .unit_face_support_point(
2530 this->face_system_to_base_index(index, face_no).second, face_no));
2535template <
int dim,
int spacedim>
2536std::pair<Table<2, bool>, std::vector<unsigned int>>
2542 Table<2, bool> constant_modes(this->n_components(), this->n_dofs_per_cell());
2543 std::vector<unsigned int> components;
2544 for (
unsigned int i = 0; i < base_elements.size(); ++i)
2546 const std::pair<Table<2, bool>, std::vector<unsigned int>> base_table =
2547 base_elements[i].first->get_constant_modes();
2549 const unsigned int element_multiplicity = this->element_multiplicity(i);
2554 const unsigned int comp = components.size();
2555 if (constant_modes.n_rows() <
2556 comp + base_table.first.n_rows() * element_multiplicity)
2558 Table<2, bool> new_constant_modes(comp + base_table.first.n_rows() *
2559 element_multiplicity,
2560 constant_modes.n_cols());
2561 for (
unsigned int r = 0; r < comp; ++r)
2562 for (
unsigned int c = 0; c < this->n_dofs_per_cell(); ++c)
2563 new_constant_modes(r, c) = constant_modes(r, c);
2565 constant_modes = std::move(new_constant_modes);
2570 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
2572 std::pair<std::pair<unsigned int, unsigned int>,
unsigned int> ind =
2573 this->system_to_base_index(k);
2574 if (ind.first.first == i)
2575 for (
unsigned int c = 0; c < base_table.first.n_rows(); ++c)
2576 constant_modes(comp +
2577 ind.first.second * base_table.first.n_rows() + c,
2578 k) = base_table.first(c, ind.second);
2580 for (
unsigned int r = 0; r < element_multiplicity; ++r)
2581 for (
const unsigned int c : base_table.
second)
2582 components.push_back(
2583 comp + r * this->base_elements[i].
first->n_components() + c);
2586 return std::pair<Table<2, bool>, std::vector<unsigned int>>(constant_modes,
2592template <
int dim,
int spacedim>
2596 std::vector<double> &dof_values)
const
2598 Assert(this->has_generalized_support_points(),
2599 ExcMessage(
"The FESystem does not have generalized support points"));
2602 this->get_generalized_support_points().size());
2605 std::vector<double> base_dof_values;
2606 std::vector<Vector<double>> base_point_values;
2611 unsigned int current_vector_component = 0;
2612 for (
unsigned int base = 0; base < base_elements.size(); ++base)
2617 const auto &base_element = this->base_element(base);
2618 const unsigned int multiplicity = this->element_multiplicity(base);
2619 const unsigned int n_base_dofs = base_element.n_dofs_per_cell();
2620 const unsigned int n_base_components = base_element.n_components();
2625 if (n_base_dofs == 0)
2627 current_vector_component += multiplicity * n_base_components;
2631 if (base_element.has_generalized_support_points())
2633 const unsigned int n_base_points =
2634 base_element.get_generalized_support_points().size();
2636 base_dof_values.resize(n_base_dofs);
2637 base_point_values.resize(n_base_points);
2639 for (
unsigned int m = 0; m < multiplicity;
2640 ++m, current_vector_component += n_base_components)
2644 for (
unsigned int j = 0; j < base_point_values.size(); ++j)
2646 base_point_values[j].reinit(n_base_components,
false);
2649 generalized_support_points_index_table[base][j];
2653 const auto *
const begin =
2654 std::begin(point_values[n]) + current_vector_component;
2655 const auto *
const end =
begin + n_base_components;
2656 std::copy(begin, end, std::begin(base_point_values[j]));
2660 .convert_generalized_support_point_values_to_dof_values(
2661 base_point_values, base_dof_values);
2670 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
2671 if (this->system_to_base_index(i).first ==
2672 std::make_pair(base, m))
2674 base_dof_values[this->system_to_base_index(i).second];
2686 for (
unsigned int m = 0; m < multiplicity; ++m)
2687 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
2688 if (this->system_to_base_index(i).first ==
2689 std::make_pair(base, m))
2690 dof_values[i] = std::numeric_limits<double>::signaling_NaN();
2692 current_vector_component += multiplicity * n_base_components;
2699template <
int dim,
int spacedim>
2707 sizeof(base_elements));
2708 for (
unsigned int i = 0; i < base_elements.size(); ++i)
2716#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)
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 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 unsigned int face_to_cell_index(const unsigned int face_dof_index, const unsigned int face, const unsigned char combined_orientation=ReferenceCell::default_combined_face_orientation()) 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
#define DEAL_II_NAMESPACE_CLOSE
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)
#define DEAL_II_ASSERT_UNREACHABLE()
#define DEAL_II_NOT_IMPLEMENTED()
@ neither_element_dominates
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell &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)
VectorType::value_type * end(VectorType &V)
VectorType::value_type * begin(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)
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)
static const unsigned int invalid_unsigned_int