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 [[maybe_unused]]
const unsigned int base_no,
192 const unsigned int n_q_points,
202 for (
const auto &offset : offsets)
205 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
206 for (
unsigned int q = 0; q < n_q_points; ++q)
211 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
212 for (
unsigned int q = 0; q < n_q_points; ++q)
217 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
218 for (
unsigned int q = 0; q < n_q_points; ++q)
223 for (
unsigned int s = 0; s < offset.n_nonzero_components; ++s)
224 for (
unsigned int q = 0; q < n_q_points; ++q)
234template <
int dim,
int spacedim>
236 const unsigned int n_base_elements)
237 : base_fe_datas(n_base_elements)
238 , base_fe_output_objects(n_base_elements)
243template <
int dim,
int spacedim>
252template <
int dim,
int spacedim>
255 const unsigned int base_no)
const
258 return *base_fe_datas[base_no];
263template <
int dim,
int spacedim>
266 const unsigned int base_no,
270 base_fe_datas[base_no] = std::move(ptr);
275template <
int dim,
int spacedim>
278 const unsigned int base_no)
const
281 return base_fe_output_objects[base_no];
289template <
int dim,
int spacedim>
293template <
int dim,
int spacedim>
295 const unsigned int n_elements)
303 FETools::Compositing::compute_nonzero_components<dim, spacedim>(
306 , base_elements((n_elements > 0))
308 const std::vector<const FiniteElement<dim, spacedim> *> fes = {&fe};
309 const std::vector<unsigned int> multiplicities = {n_elements};
310 initialize(fes, multiplicities);
315template <
int dim,
int spacedim>
317 const unsigned int n1,
319 const unsigned int n2)
327 FETools::Compositing::compute_nonzero_components<dim, spacedim>({&fe1,
330 , base_elements(
static_cast<int>(n1 > 0) +
static_cast<int>(n2 > 0))
332 const std::vector<const FiniteElement<dim, spacedim> *> fes = {&fe1, &fe2};
333 const std::vector<unsigned int> multiplicities = {n1, n2};
334 initialize(fes, multiplicities);
339template <
int dim,
int spacedim>
341 const unsigned int n1,
343 const unsigned int n2,
345 const unsigned int n3)
354 FETools::Compositing::compute_nonzero_components<dim, spacedim>(
357 , base_elements(
static_cast<int>(n1 > 0) +
static_cast<int>(n2 > 0) +
358 static_cast<int>(n3 > 0))
360 const std::vector<const FiniteElement<dim, spacedim> *> fes = {&fe1,
363 const std::vector<unsigned int> multiplicities = {n1, n2, n3};
364 initialize(fes, multiplicities);
369template <
int dim,
int spacedim>
371 const unsigned int n1,
373 const unsigned int n2,
375 const unsigned int n3,
377 const unsigned int n4)
380 {&fe1, &fe2, &fe3, &fe4},
384 {&fe1, &fe2, &fe3, &fe4},
386 FETools::Compositing::compute_nonzero_components<dim, spacedim>(
387 {&fe1, &fe2, &fe3, &fe4},
389 , base_elements(
static_cast<int>(n1 > 0) +
static_cast<int>(n2 > 0) +
390 static_cast<int>(n3 > 0) +
static_cast<int>(n4 > 0))
392 const std::vector<const FiniteElement<dim, spacedim> *> fes = {&fe1,
396 const std::vector<unsigned int> multiplicities = {n1, n2, n3, n4};
397 initialize(fes, multiplicities);
402template <
int dim,
int spacedim>
404 const unsigned int n1,
406 const unsigned int n2,
408 const unsigned int n3,
410 const unsigned int n4,
412 const unsigned int n5)
415 {&fe1, &fe2, &fe3, &fe4, &fe5},
416 {n1, n2, n3, n4, n5}),
419 {&fe1, &fe2, &fe3, &fe4, &fe5},
420 {n1, n2, n3, n4, n5}),
421 FETools::Compositing::compute_nonzero_components<dim, spacedim>(
422 {&fe1, &fe2, &fe3, &fe4, &fe5},
423 {n1, n2, n3, n4, n5}))
424 , base_elements(
static_cast<int>(n1 > 0) +
static_cast<int>(n2 > 0) +
425 static_cast<int>(n3 > 0) +
static_cast<int>(n4 > 0) +
426 static_cast<int>(n5 > 0))
428 const std::vector<const FiniteElement<dim, spacedim> *> fes = {
429 &fe1, &fe2, &fe3, &fe4, &fe5};
430 const std::vector<unsigned int> multiplicities = {n1, n2, n3, n4, n5};
431 initialize(fes, multiplicities);
436template <
int dim,
int spacedim>
439 const std::vector<unsigned int> &multiplicities)
446 , base_elements(count_nonzeros(multiplicities))
448 initialize(fes, multiplicities);
453template <
int dim,
int spacedim>
464 std::ostringstream namebuf;
467 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
469 namebuf << base_element(i).get_name();
470 if (this->element_multiplicity(i) != 1)
471 namebuf <<
'^' << this->element_multiplicity(i);
472 if (i != this->n_base_elements() - 1)
477 return namebuf.str();
482template <
int dim,
int spacedim>
483std::unique_ptr<FiniteElement<dim, spacedim>>
486 std::vector<const FiniteElement<dim, spacedim> *> fes;
487 std::vector<unsigned int> multiplicities;
489 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
491 fes.push_back(&base_element(i));
492 multiplicities.push_back(this->element_multiplicity(i));
494 return std::make_unique<FESystem<dim, spacedim>>(fes, multiplicities);
499template <
int dim,
int spacedim>
502 const unsigned int first_component,
503 const unsigned int n_selected_components)
const
505 Assert(first_component + n_selected_components <= this->n_components(),
506 ExcMessage(
"Invalid arguments (not a part of this FiniteElement)."));
508 const unsigned int base_index =
509 this->component_to_base_table[first_component].first.first;
510 const unsigned int component_in_base =
511 this->component_to_base_table[first_component].first.second;
512 const unsigned int base_components =
513 this->base_element(base_index).n_components();
517 if (n_selected_components <= base_components)
518 return this->base_element(base_index)
519 .get_sub_fe(component_in_base, n_selected_components);
521 Assert(n_selected_components == this->n_components(),
522 ExcMessage(
"You can not select a part of a FiniteElement."));
528template <
int dim,
int spacedim>
534 Assert(this->is_primitive(i),
538 return (base_element(this->system_to_base_table[i].
first.first)
539 .shape_value(this->system_to_base_table[i].second, p));
544template <
int dim,
int spacedim>
547 const unsigned int i,
549 const unsigned int component)
const
556 if (this->nonzero_components[i][component] ==
false)
564 const unsigned int base = this->component_to_base_index(component).first;
565 const unsigned int component_in_base =
566 this->component_to_base_index(component).second;
574 return (base_element(base).shape_value_component(
575 this->system_to_base_table[i].
second, p, component_in_base));
580template <
int dim,
int spacedim>
586 Assert(this->is_primitive(i),
590 return (base_element(this->system_to_base_table[i].
first.first)
591 .shape_grad(this->system_to_base_table[i].second, p));
596template <
int dim,
int spacedim>
599 const unsigned int i,
601 const unsigned int component)
const
607 if (this->nonzero_components[i][component] ==
false)
612 const unsigned int base = this->component_to_base_index(component).first;
613 const unsigned int component_in_base =
614 this->component_to_base_index(component).second;
619 return (base_element(base).shape_grad_component(
620 this->system_to_base_table[i].
second, p, component_in_base));
625template <
int dim,
int spacedim>
631 Assert(this->is_primitive(i),
635 return (base_element(this->system_to_base_table[i].
first.first)
636 .shape_grad_grad(this->system_to_base_table[i].second, p));
641template <
int dim,
int spacedim>
644 const unsigned int i,
646 const unsigned int component)
const
652 if (this->nonzero_components[i][component] ==
false)
657 const unsigned int base = this->component_to_base_index(component).first;
658 const unsigned int component_in_base =
659 this->component_to_base_index(component).second;
664 return (base_element(base).shape_grad_grad_component(
665 this->system_to_base_table[i].
second, p, component_in_base));
670template <
int dim,
int spacedim>
676 Assert(this->is_primitive(i),
680 return (base_element(this->system_to_base_table[i].
first.first)
681 .shape_3rd_derivative(this->system_to_base_table[i].second, p));
686template <
int dim,
int spacedim>
689 const unsigned int i,
691 const unsigned int component)
const
697 if (this->nonzero_components[i][component] ==
false)
702 const unsigned int base = this->component_to_base_index(component).first;
703 const unsigned int component_in_base =
704 this->component_to_base_index(component).second;
709 return (base_element(base).shape_3rd_derivative_component(
710 this->system_to_base_table[i].
second, p, component_in_base));
715template <
int dim,
int spacedim>
721 Assert(this->is_primitive(i),
725 return (base_element(this->system_to_base_table[i].
first.first)
726 .shape_4th_derivative(this->system_to_base_table[i].second, p));
731template <
int dim,
int spacedim>
734 const unsigned int i,
736 const unsigned int component)
const
742 if (this->nonzero_components[i][component] ==
false)
747 const unsigned int base = this->component_to_base_index(component).first;
748 const unsigned int component_in_base =
749 this->component_to_base_index(component).second;
754 return (base_element(base).shape_4th_derivative_component(
755 this->system_to_base_table[i].
second, p, component_in_base));
760template <
int dim,
int spacedim>
770 Assert((interpolation_matrix.
m() == this->n_dofs_per_cell()) ||
773 this->n_dofs_per_cell()));
775 (this->n_dofs_per_cell() == 0),
785 (x_source_fe.
get_name().find(
"FESystem<") == 0) ||
799 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
803 spacedim>::ExcInterpolationNotImplemented()));
812 std::vector<FullMatrix<double>> base_matrices(this->n_base_elements());
813 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
815 base_matrices[i].reinit(base_element(i).n_dofs_per_cell(),
817 base_element(i).get_interpolation_matrix(source_fe.
base_element(i),
824 interpolation_matrix = 0;
825 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
827 if (this->system_to_base_table[i].
first ==
829 interpolation_matrix(i, j) =
830 (base_matrices[this->system_to_base_table[i].first.first](
831 this->system_to_base_table[i].second,
837template <
int dim,
int spacedim>
840 const unsigned int child,
847 "Restriction matrices are only available for refined cells!"));
853 if (this->restriction[refinement_case - 1][child].n() == 0)
855 std::lock_guard<std::mutex> lock(restriction_matrix_mutex);
858 if (this->restriction[refinement_case - 1][child].n() ==
859 this->n_dofs_per_cell())
860 return this->restriction[refinement_case - 1][child];
863 std::vector<const FullMatrix<double> *> base_matrices(
864 this->n_base_elements());
866 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
869 &base_element(i).get_restriction_matrix(child, refinement_case);
871 Assert(base_matrices[i]->n() == base_element(i).n_dofs_per_cell(),
876 this->n_dofs_per_cell());
886 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
887 for (
unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
894 if (this->system_to_base_table[i].
first !=
895 this->system_to_base_table[j].
first)
899 const unsigned int base = this->system_to_base_table[i].first.first;
901 const unsigned int base_index_i =
902 this->system_to_base_table[i].second,
904 this->system_to_base_table[j].second;
909 (*base_matrices[base])(base_index_i, base_index_j);
913 this->restriction[refinement_case - 1][child]) = std::move(restriction);
916 return this->restriction[refinement_case - 1][child];
921template <
int dim,
int spacedim>
924 const unsigned int child,
931 "Restriction matrices are only available for refined cells!"));
936 if (this->prolongation[refinement_case - 1][child].n() == 0)
938 std::lock_guard<std::mutex> lock(prolongation_matrix_mutex);
940 if (this->prolongation[refinement_case - 1][child].n() ==
941 this->n_dofs_per_cell())
942 return this->prolongation[refinement_case - 1][child];
944 std::vector<const FullMatrix<double> *> base_matrices(
945 this->n_base_elements());
946 for (
unsigned int i = 0; i < this->n_base_elements(); ++i)
949 &base_element(i).get_prolongation_matrix(child, refinement_case);
951 Assert(base_matrices[i]->n() == base_element(i).n_dofs_per_cell(),
956 this->n_dofs_per_cell());
958 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
959 for (
unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
961 if (this->system_to_base_table[i].
first !=
962 this->system_to_base_table[j].
first)
964 const unsigned int base = this->system_to_base_table[i].first.first;
966 const unsigned int base_index_i =
967 this->system_to_base_table[i].second,
969 this->system_to_base_table[j].second;
971 (*base_matrices[base])(base_index_i, base_index_j);
975 this->prolongation[refinement_case - 1][child]) = std::move(prolongate);
978 return this->prolongation[refinement_case - 1][child];
982template <
int dim,
int spacedim>
985 const unsigned int face_dof_index,
986 const unsigned int face,
992 const std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>
993 face_base_index = this->face_system_to_base_index(face_dof_index, face);
995 const unsigned int base_face_to_cell_index =
996 this->base_element(face_base_index.first.first)
997 .face_to_cell_index(face_base_index.second, face, combined_orientation);
1004 const std::pair<std::pair<unsigned int, unsigned int>,
unsigned int> target =
1005 std::make_pair(face_base_index.first, base_face_to_cell_index);
1006 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
1007 if (this->system_to_base_index(i) == target)
1022template <
int dim,
int spacedim>
1029 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1030 out |= base_element(base_no).requires_update_flags(flags);
1036template <
int dim,
int spacedim>
1037std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1053 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1054 data_ptr = std::make_unique<InternalData>(this->n_base_elements());
1055 auto &
data =
dynamic_cast<InternalData &
>(*data_ptr);
1056 data.update_each = requires_update_flags(flags);
1070 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1073 &base_fe_output_object =
data.get_fe_output_object(base_no);
1076 base_element(base_no),
1077 flags | base_element(base_no).requires_update_flags(flags));
1085 auto base_fe_data = base_element(base_no).get_data(flags,
1088 base_fe_output_object);
1090 data.set_fe_data(base_no, std::move(base_fe_data));
1099template <
int dim,
int spacedim>
1100std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1116 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1117 data_ptr = std::make_unique<InternalData>(this->n_base_elements());
1118 auto &
data =
dynamic_cast<InternalData &
>(*data_ptr);
1119 data.update_each = requires_update_flags(flags);
1133 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1136 &base_fe_output_object =
data.get_fe_output_object(base_no);
1139 base_element(base_no),
1140 flags | base_element(base_no).requires_update_flags(flags));
1148 auto base_fe_data = base_element(base_no).get_face_data(
1149 flags, mapping, quadrature, base_fe_output_object);
1151 data.set_fe_data(base_no, std::move(base_fe_data));
1162template <
int dim,
int spacedim>
1163std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1179 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>
1180 data_ptr = std::make_unique<InternalData>(this->n_base_elements());
1181 auto &
data =
dynamic_cast<InternalData &
>(*data_ptr);
1183 data.update_each = requires_update_flags(flags);
1197 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1200 &base_fe_output_object =
data.get_fe_output_object(base_no);
1203 base_element(base_no),
1204 flags | base_element(base_no).requires_update_flags(flags));
1212 auto base_fe_data = base_element(base_no).get_subface_data(
1213 flags, mapping, quadrature, base_fe_output_object);
1215 data.set_fe_data(base_no, std::move(base_fe_data));
1223template <
int dim,
int spacedim>
1238 compute_fill(mapping,
1240 invalid_face_number,
1241 invalid_face_number,
1252template <
int dim,
int spacedim>
1256 const unsigned int face_no,
1267 compute_fill(mapping,
1270 invalid_face_number,
1281template <
int dim,
int spacedim>
1285 const unsigned int face_no,
1286 const unsigned int sub_no,
1297 compute_fill(mapping,
1311template <
int dim,
int spacedim>
1312template <
class Q_or_QC>
1317 const unsigned int face_no,
1318 const unsigned int sub_no,
1319 const Q_or_QC &quadrature,
1332 Assert(
dynamic_cast<const InternalData *
>(&fe_internal) !=
nullptr,
1334 const InternalData &fe_data =
static_cast<const InternalData &
>(fe_internal);
1351 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1355 fe_data.get_fe_data(base_no);
1358 &base_data = fe_data.get_fe_output_object(base_no);
1364 const Quadrature<dim - 1> *sub_face_quadrature =
nullptr;
1368 if (face_no == invalid_face_number)
1373 n_q_points = cell_quadrature->
size();
1375 else if (sub_no == invalid_face_number)
1384 (*face_quadrature)[face_quadrature->size() == 1 ? 0 : face_no]
1389 sub_face_quadrature =
1390 dynamic_cast<const Quadrature<dim - 1
> *>(&quadrature);
1393 n_q_points = sub_face_quadrature->size();
1405 if (face_no == invalid_face_number)
1414 else if (sub_no == invalid_face_number)
1427 *sub_face_quadrature,
1445 primitive_offset_tables[base_no],
1456 nonprimitive_offset_tables[base_no],
1464template <
int dim,
int spacedim>
1472 for (
unsigned int base = 0; base < this->n_base_elements(); ++base)
1473 if (base_element(base).constraints_are_implemented() ==
false)
1479 const unsigned int face_no = 0;
1481 this->interface_constraints.TableBase<2, double>::reinit(
1482 this->interface_constraints_size());
1492 for (
unsigned int n = 0; n < this->interface_constraints.n(); ++n)
1493 for (
unsigned int m = 0; m < this->interface_constraints.m(); ++m)
1502 const std::pair<std::pair<unsigned int, unsigned int>,
unsigned int>
1503 n_index = this->face_system_to_base_table[face_no][n];
1507 std::pair<std::pair<unsigned int, unsigned int>,
unsigned int> m_index;
1524 if (m < this->n_dofs_per_vertex())
1525 m_index = this->system_to_base_table[m];
1529 const unsigned int index_in_line =
1530 (m - this->n_dofs_per_vertex()) % this->n_dofs_per_line();
1531 const unsigned int sub_line =
1532 (m - this->n_dofs_per_vertex()) / this->n_dofs_per_line();
1539 const unsigned int tmp1 =
1540 2 * this->n_dofs_per_vertex() + index_in_line;
1542 this->face_system_to_base_table[face_no][tmp1].first;
1554 this->face_system_to_base_table[face_no][tmp1].
second >=
1556 base_element(m_index.first.first).n_dofs_per_vertex(),
1558 const unsigned int tmp2 =
1559 this->face_system_to_base_table[face_no][tmp1].second -
1560 2 * base_element(m_index.first.first).n_dofs_per_vertex();
1561 Assert(tmp2 < base_element(m_index.first.first)
1565 base_element(m_index.first.first).n_dofs_per_vertex() +
1566 base_element(m_index.first.first).n_dofs_per_line() *
1576 ReferenceCells::get_hypercube<dim>(),
1584 if (m < 5 * this->n_dofs_per_vertex())
1585 m_index = this->system_to_base_table[m];
1588 if (m < 5 * this->n_dofs_per_vertex() +
1589 12 * this->n_dofs_per_line())
1592 const unsigned int index_in_line =
1593 (m - 5 * this->n_dofs_per_vertex()) %
1594 this->n_dofs_per_line();
1595 const unsigned int sub_line =
1596 (m - 5 * this->n_dofs_per_vertex()) /
1597 this->n_dofs_per_line();
1600 const unsigned int tmp1 =
1601 4 * this->n_dofs_per_vertex() + index_in_line;
1603 this->face_system_to_base_table[face_no][tmp1].first;
1606 this->face_system_to_base_table[face_no][tmp1].
second >=
1607 4 * base_element(m_index.first.first)
1608 .n_dofs_per_vertex(),
1610 const unsigned int tmp2 =
1611 this->face_system_to_base_table[face_no][tmp1].second -
1613 base_element(m_index.first.first).n_dofs_per_vertex();
1614 Assert(tmp2 < base_element(m_index.first.first)
1618 5 * base_element(m_index.first.first)
1619 .n_dofs_per_vertex() +
1620 base_element(m_index.first.first).n_dofs_per_line() *
1628 const unsigned int index_in_quad =
1629 (m - 5 * this->n_dofs_per_vertex() -
1630 12 * this->n_dofs_per_line()) %
1631 this->n_dofs_per_quad(face_no);
1632 Assert(index_in_quad < this->n_dofs_per_quad(face_no),
1634 const unsigned int sub_quad =
1635 ((m - 5 * this->n_dofs_per_vertex() -
1636 12 * this->n_dofs_per_line()) /
1637 this->n_dofs_per_quad(face_no));
1640 const unsigned int tmp1 = 4 * this->n_dofs_per_vertex() +
1641 4 * this->n_dofs_per_line() +
1644 this->face_system_to_base_table[face_no].
size(),
1647 this->face_system_to_base_table[face_no][tmp1].first;
1650 this->face_system_to_base_table[face_no][tmp1].
second >=
1651 4 * base_element(m_index.first.first)
1652 .n_dofs_per_vertex() +
1653 4 * base_element(m_index.first.first)
1656 const unsigned int tmp2 =
1657 this->face_system_to_base_table[face_no][tmp1].second -
1658 4 * base_element(m_index.first.first)
1659 .n_dofs_per_vertex() -
1660 4 * base_element(m_index.first.first).n_dofs_per_line();
1661 Assert(tmp2 < base_element(m_index.first.first)
1662 .n_dofs_per_quad(face_no),
1665 5 * base_element(m_index.first.first)
1666 .n_dofs_per_vertex() +
1668 base_element(m_index.first.first).n_dofs_per_line() +
1669 base_element(m_index.first.first)
1670 .n_dofs_per_quad(face_no) *
1685 if (n_index.first == m_index.first)
1686 this->interface_constraints(m, n) =
1687 (base_element(n_index.first.first)
1688 .constraints()(m_index.second, n_index.second));
1694template <
int dim,
int spacedim>
1698 const std::vector<unsigned int> &multiplicities)
1700 Assert(fes.size() == multiplicities.size(),
1703 ExcMessage(
"Need to pass at least one finite element."));
1704 Assert(count_nonzeros(multiplicities) > 0,
1705 ExcMessage(
"You only passed FiniteElements with multiplicity 0."));
1708 fes.front()->reference_cell();
1710 Assert(std::all_of(fes.begin(),
1713 return fe->reference_cell() == reference_cell;
1715 ExcMessage(
"You cannot combine finite elements defined on "
1716 "different reference cells into a combined element "
1717 "such as an FESystem or FE_Enriched object."));
1722 this->base_to_block_indices.reinit(0, 0);
1724 for (
unsigned int i = 0; i < fes.size(); ++i)
1725 if (multiplicities[i] > 0)
1726 this->base_to_block_indices.push_back(multiplicities[i]);
1731 unsigned int ind = 0;
1732 for (
unsigned int i = 0; i < fes.size(); ++i)
1733 if (multiplicities[i] > 0)
1736 base_elements[ind] = {fes[i]->clone(), multiplicities[i]};
1750 this->system_to_component_table.resize(this->n_dofs_per_cell());
1753 this->system_to_component_table,
1754 this->component_to_base_table,
1757 this->face_system_to_component_table.resize(this->n_unique_faces());
1759 for (
unsigned int face_no = 0; face_no < this->n_unique_faces(); ++face_no)
1761 this->face_system_to_component_table[face_no].resize(
1762 this->n_dofs_per_face(face_no));
1765 this->face_system_to_base_table[face_no],
1766 this->face_system_to_component_table[face_no],
1787 for (
unsigned int base_el = 0; base_el < this->n_base_elements(); ++base_el)
1788 if (!base_element(base_el).has_support_points() &&
1789 base_element(base_el).n_dofs_per_cell() != 0)
1798 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
1800 const unsigned int base = this->system_to_base_table[i].first.first,
1801 base_index = this->system_to_base_table[i].second;
1806 [[maybe_unused]]
const unsigned int n_base_elements =
1807 this->n_base_elements();
1812 base_element(base).unit_support_points[base_index];
1817 primitive_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 primitive_offset_tables[base_no] =
1826 nonprimitive_offset_tables.resize(this->n_base_elements());
1828 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1829 if (!base_element(base_no).is_primitive())
1830 nonprimitive_offset_tables[base_no] =
1837 for (
unsigned int face_no = 0; face_no < this->n_unique_faces();
1850 bool flag_has_no_support_points =
false;
1852 for (
unsigned int base_el = 0; base_el < this->n_base_elements();
1854 if (!base_element(base_el).has_support_points() &&
1855 (base_element(base_el).n_dofs_per_face(face_no) > 0))
1857 this->unit_face_support_points[face_no].resize(0);
1858 flag_has_no_support_points =
true;
1863 if (flag_has_no_support_points)
1868 this->unit_face_support_points[face_no].resize(
1869 this->n_dofs_per_face(face_no));
1871 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
1873 const unsigned int base_i =
1874 this->face_system_to_base_table[face_no][i].first.first;
1875 const unsigned int index_in_base =
1876 this->face_system_to_base_table[face_no][i].second;
1880 base_element(base_i).unit_face_support_points[face_no].
size(),
1883 this->unit_face_support_points[face_no][i] =
1884 base_element(base_i)
1885 .unit_face_support_points[face_no][index_in_base];
1898 generalized_support_points_index_table.resize(this->n_base_elements());
1900 for (
unsigned int base = 0; base < this->n_base_elements(); ++base)
1911 if (!base_element(base).has_generalized_support_points())
1914 for (
const auto &point :
1915 base_element(base).get_generalized_support_points())
1919 std::find(std::begin(this->generalized_support_points),
1920 std::end(this->generalized_support_points),
1923 if (p == std::end(this->generalized_support_points))
1926 const auto n = this->generalized_support_points.size();
1927 generalized_support_points_index_table[base].push_back(n);
1928 this->generalized_support_points.push_back(point);
1933 const auto n = p - std::begin(this->generalized_support_points);
1934 generalized_support_points_index_table[base].push_back(n);
1942 for (
unsigned int i = 0; i < base_elements.size(); ++i)
1944 if (!base_element(i).has_generalized_support_points())
1947 const auto &points =
1948 base_elements[i].first->get_generalized_support_points();
1949 for (
unsigned int j = 0; j < points.size(); ++j)
1951 const auto n = generalized_support_points_index_table[i][j];
1952 Assert(this->generalized_support_points[n] == points[j],
1962 for (
unsigned int face_no = 0; face_no < this->n_unique_faces();
1970 [[maybe_unused]]
const unsigned int n_elements =
1971 this->adjust_quad_dof_index_for_face_orientation_table[face_no]
1973 [[maybe_unused]]
const unsigned int n_face_orientations =
1975 [[maybe_unused]]
const unsigned int n_dofs_per_quad =
1976 this->n_dofs_per_quad(face_no);
1977 Assert(n_elements == n_face_orientations * n_dofs_per_quad,
1982 unsigned int index = 0;
1983 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
1986 this->base_element(b)
1987 .adjust_quad_dof_index_for_face_orientation_table[face_no];
1988 for (
unsigned int c = 0; c < this->element_multiplicity(b); ++c)
1990 for (
unsigned int i = 0; i < temp.size(0); ++i)
1991 for (
unsigned int j = 0;
1995 this->adjust_quad_dof_index_for_face_orientation_table
1996 [face_no](index + i, j) = temp(i, j);
1997 index += temp.size(0);
2007 [[maybe_unused]]
const unsigned int table_size =
2008 this->adjust_line_dof_index_for_line_orientation_table.size();
2009 [[maybe_unused]]
const unsigned int n_dofs_per_line =
2010 this->n_dofs_per_line();
2012 unsigned int index = 0;
2013 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2015 const std::vector<int> &temp2 =
2016 this->base_element(b)
2017 .adjust_line_dof_index_for_line_orientation_table;
2018 for (
unsigned int c = 0; c < this->element_multiplicity(b); ++c)
2023 this->adjust_line_dof_index_for_line_orientation_table.begin() +
2025 index += temp2.size();
2041 const bool have_nonempty = [&]() ->
bool {
2042 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2044 if (!this->base_element(b).get_local_dof_sparsity_pattern().empty() &&
2045 (this->element_multiplicity(b) > 0))
2053 this->local_dof_sparsity_pattern.reinit(this->n_dofs_per_cell(),
2054 this->n_dofs_per_cell());
2057 this->local_dof_sparsity_pattern.fill(
true);
2061 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
2062 for (
unsigned int j = 0; j < this->n_dofs_per_cell(); ++j)
2064 const auto vi = this->system_to_base_index(i);
2065 const auto vj = this->system_to_base_index(j);
2067 const auto base_index_i = vi.first.first;
2068 const auto base_index_j = vj.first.first;
2069 if (base_index_i == base_index_j)
2071 const auto shape_index_i = vi.second;
2072 const auto shape_index_j = vj.second;
2074 const auto &pattern = this->base_element(base_index_i)
2075 .get_local_dof_sparsity_pattern();
2077 if (!pattern.empty())
2078 this->local_dof_sparsity_pattern(i, j) =
2079 pattern(shape_index_i, shape_index_j);
2087 init_tasks.join_all();
2092template <
int dim,
int spacedim>
2096 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2097 if (base_element(b).hp_constraints_are_implemented() ==
false)
2105template <
int dim,
int spacedim>
2110 const unsigned int face_no)
const
2112 Assert(interpolation_matrix.
n() == this->n_dofs_per_face(face_no),
2114 this->n_dofs_per_face(face_no)));
2129 if (
const auto *fe_other_system =
2133 interpolation_matrix = 0;
2137 unsigned int base_index = 0, base_index_other = 0;
2138 unsigned int multiplicity = 0, multiplicity_other = 0;
2146 fe_other_system->base_element(
2153 base_to_base_interpolation.reinit(base_other.n_dofs_per_face(face_no),
2156 base_to_base_interpolation,
2162 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
2163 if (this->face_system_to_base_index(i, face_no).first ==
2164 std::make_pair(base_index, multiplicity))
2165 for (
unsigned int j = 0;
2166 j < fe_other_system->n_dofs_per_face(face_no);
2168 if (fe_other_system->face_system_to_base_index(j, face_no)
2170 std::make_pair(base_index_other, multiplicity_other))
2171 interpolation_matrix(j, i) = base_to_base_interpolation(
2172 fe_other_system->face_system_to_base_index(j, face_no)
2174 this->face_system_to_base_index(i, face_no).second);
2180 if (multiplicity == this->element_multiplicity(base_index))
2185 ++multiplicity_other;
2186 if (multiplicity_other ==
2187 fe_other_system->element_multiplicity(base_index_other))
2189 multiplicity_other = 0;
2195 if (base_index == this->n_base_elements())
2197 Assert(base_index_other == fe_other_system->n_base_elements(),
2204 Assert(base_index_other != fe_other_system->n_base_elements(),
2215 spacedim>::ExcInterpolationNotImplemented()));
2221template <
int dim,
int spacedim>
2225 const unsigned int subface,
2227 const unsigned int face_no)
const
2230 (x_source_fe.
get_name().find(
"FESystem<") == 0) ||
2234 Assert(interpolation_matrix.
n() == this->n_dofs_per_face(face_no),
2236 this->n_dofs_per_face(face_no)));
2253 if (fe_other_system !=
nullptr)
2256 interpolation_matrix = 0;
2260 unsigned int base_index = 0, base_index_other = 0;
2261 unsigned int multiplicity = 0, multiplicity_other = 0;
2276 base_to_base_interpolation.reinit(base_other.n_dofs_per_face(face_no),
2280 base_to_base_interpolation,
2286 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
2287 if (this->face_system_to_base_index(i, face_no).first ==
2288 std::make_pair(base_index, multiplicity))
2289 for (
unsigned int j = 0;
2294 std::make_pair(base_index_other, multiplicity_other))
2295 interpolation_matrix(j, i) = base_to_base_interpolation(
2298 this->face_system_to_base_index(i, face_no).second);
2304 if (multiplicity == this->element_multiplicity(base_index))
2309 ++multiplicity_other;
2310 if (multiplicity_other ==
2313 multiplicity_other = 0;
2319 if (base_index == this->n_base_elements())
2336 fe_other_system !=
nullptr,
2338 spacedim>::ExcInterpolationNotImplemented()));
2344template <
int dim,
int spacedim>
2345template <
int structdim>
2346std::vector<std::pair<unsigned int, unsigned int>>
2349 const unsigned int face_no)
const
2368 unsigned int base_index = 0, base_index_other = 0;
2369 unsigned int multiplicity = 0, multiplicity_other = 0;
2373 unsigned int dof_offset = 0, dof_offset_other = 0;
2375 std::vector<std::pair<unsigned int, unsigned int>> identities;
2389 std::vector<std::pair<unsigned int, unsigned int>> base_identities;
2406 for (
const auto &base_identity : base_identities)
2407 identities.emplace_back(base_identity.
first + dof_offset,
2408 base_identity.
second + dof_offset_other);
2411 dof_offset += base.template n_dofs_per_object<structdim>();
2413 base_other.template n_dofs_per_object<structdim>();
2419 if (multiplicity == this->element_multiplicity(base_index))
2424 ++multiplicity_other;
2425 if (multiplicity_other ==
2428 multiplicity_other = 0;
2434 if (base_index == this->n_base_elements())
2452 return std::vector<std::pair<unsigned int, unsigned int>>();
2458template <
int dim,
int spacedim>
2459std::vector<std::pair<unsigned int, unsigned int>>
2463 return hp_object_dof_identities<0>(fe_other);
2466template <
int dim,
int spacedim>
2467std::vector<std::pair<unsigned int, unsigned int>>
2471 return hp_object_dof_identities<1>(fe_other);
2476template <
int dim,
int spacedim>
2477std::vector<std::pair<unsigned int, unsigned int>>
2480 const unsigned int face_no)
const
2482 return hp_object_dof_identities<2>(fe_other, face_no);
2487template <
int dim,
int spacedim>
2491 const unsigned int codim)
const
2500 Assert(this->n_components() == fe_sys_other->n_components(),
2501 ExcMessage(
"You can only compare two elements for domination "
2502 "that have the same number of vector components. The "
2503 "current element has " +
2504 std::to_string(this->n_components()) +
2505 " vector components, and you are comparing it "
2506 "against an element with " +
2507 std::to_string(fe_sys_other->n_components()) +
2508 " vector components."));
2516 if ((this->n_base_elements() == fe_sys_other->n_base_elements()) &&
2520 for (unsigned int b = 0; b < this->n_base_elements(); ++b)
2521 if (this->element_multiplicity(b) !=
2522 fe_sys_other->element_multiplicity(b))
2527 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2529 Assert(this->base_element(b).n_components() ==
2530 fe_sys_other->base_element(b).n_components(),
2535 (this->base_element(b).compare_for_domination(
2536 fe_sys_other->base_element(b), codim));
2538 domination = domination & base_domination;
2545 for (
unsigned int c = 0; c < this->n_components(); ++c)
2547 const unsigned int base_element_index_in_fe_sys_this =
2548 this->component_to_base_index(c).first;
2549 const unsigned int base_element_index_in_fe_sys_other =
2550 fe_sys_other->component_to_base_index(c).first;
2552 Assert(this->base_element(base_element_index_in_fe_sys_this)
2555 ->base_element(base_element_index_in_fe_sys_other)
2562 (this->base_element(base_element_index_in_fe_sys_this)
2563 .compare_for_domination(
2564 fe_sys_other->base_element(
2565 base_element_index_in_fe_sys_other),
2568 domination = domination & base_domination;
2581template <
int dim,
int spacedim>
2586 return *base_elements[
index].first;
2591template <
int dim,
int spacedim>
2594 const unsigned int shape_index,
2595 const unsigned int face_index)
const
2597 return (base_element(this->system_to_base_index(shape_index).
first.first)
2598 .has_support_on_face(this->system_to_base_index(shape_index).second,
2604template <
int dim,
int spacedim>
2610 (this->unit_support_points.empty()),
2619 return (base_element(this->system_to_base_index(index).
first.first)
2620 .unit_support_point(this->system_to_base_index(index).second));
2625template <
int dim,
int spacedim>
2628 const unsigned int index,
2629 const unsigned int face_no)
const
2633 (this->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2634 .
size() == this->n_dofs_per_face(face_no)) ||
2635 (this->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2637 (typename
FiniteElement<dim, spacedim>::ExcFEHasNoSupportPoints()));
2640 if (this->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2643 ->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2649 base_element(this->face_system_to_base_index(index, face_no).
first.first)
2650 .unit_face_support_point(
2651 this->face_system_to_base_index(index, face_no).second, face_no));
2656template <
int dim,
int spacedim>
2657std::pair<Table<2, bool>, std::vector<unsigned int>>
2663 Table<2, bool> constant_modes(this->n_components(), this->n_dofs_per_cell());
2664 std::vector<unsigned int> components;
2665 for (
unsigned int i = 0; i < base_elements.size(); ++i)
2667 const std::pair<Table<2, bool>, std::vector<unsigned int>> base_table =
2668 base_elements[i].first->get_constant_modes();
2670 const unsigned int element_multiplicity = this->element_multiplicity(i);
2675 const unsigned int comp = components.size();
2676 if (constant_modes.n_rows() <
2677 comp + base_table.first.n_rows() * element_multiplicity)
2679 Table<2, bool> new_constant_modes(comp + base_table.first.n_rows() *
2680 element_multiplicity,
2681 constant_modes.n_cols());
2682 for (
unsigned int r = 0; r < comp; ++r)
2683 for (
unsigned int c = 0; c < this->n_dofs_per_cell(); ++c)
2684 new_constant_modes(r, c) = constant_modes(r, c);
2686 constant_modes = std::move(new_constant_modes);
2691 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
2693 std::pair<std::pair<unsigned int, unsigned int>,
unsigned int> ind =
2694 this->system_to_base_index(k);
2695 if (ind.first.first == i)
2696 for (
unsigned int c = 0; c < base_table.first.n_rows(); ++c)
2697 constant_modes(comp +
2698 ind.first.second * base_table.first.n_rows() + c,
2699 k) = base_table.first(c, ind.second);
2701 for (
unsigned int r = 0; r < element_multiplicity; ++r)
2702 for (
const unsigned int c : base_table.
second)
2703 components.push_back(
2704 comp + r * this->base_elements[i].
first->n_components() + c);
2707 return std::pair<Table<2, bool>, std::vector<unsigned int>>(constant_modes,
2713template <
int dim,
int spacedim>
2717 std::vector<double> &dof_values)
const
2719 Assert(this->has_generalized_support_points(),
2720 ExcMessage(
"The FESystem does not have generalized support points"));
2723 this->get_generalized_support_points().size());
2726 std::vector<double> base_dof_values;
2727 std::vector<Vector<double>> base_point_values;
2732 unsigned int current_vector_component = 0;
2733 for (
unsigned int base = 0; base < base_elements.size(); ++base)
2738 const auto &base_element = this->base_element(base);
2739 const unsigned int multiplicity = this->element_multiplicity(base);
2740 const unsigned int n_base_dofs = base_element.n_dofs_per_cell();
2741 const unsigned int n_base_components = base_element.n_components();
2746 if (n_base_dofs == 0)
2748 current_vector_component += multiplicity * n_base_components;
2752 if (base_element.has_generalized_support_points())
2754 const unsigned int n_base_points =
2755 base_element.get_generalized_support_points().size();
2757 base_dof_values.resize(n_base_dofs);
2758 base_point_values.resize(n_base_points);
2760 for (
unsigned int m = 0; m < multiplicity;
2761 ++m, current_vector_component += n_base_components)
2765 for (
unsigned int j = 0; j < base_point_values.size(); ++j)
2767 base_point_values[j].reinit(n_base_components,
false);
2770 generalized_support_points_index_table[base][j];
2774 const auto *
const begin =
2775 std::begin(point_values[n]) + current_vector_component;
2776 const auto *
const end =
begin + n_base_components;
2777 std::copy(begin, end, std::begin(base_point_values[j]));
2781 .convert_generalized_support_point_values_to_dof_values(
2782 base_point_values, base_dof_values);
2791 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
2792 if (this->system_to_base_index(i).first ==
2793 std::make_pair(base, m))
2795 base_dof_values[this->system_to_base_index(i).second];
2807 for (
unsigned int m = 0; m < multiplicity; ++m)
2808 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
2809 if (this->system_to_base_index(i).first ==
2810 std::make_pair(base, m))
2811 dof_values[i] = std::numeric_limits<double>::signaling_NaN();
2813 current_vector_component += multiplicity * n_base_components;
2820template <
int dim,
int spacedim>
2828 sizeof(base_elements));
2829 for (
unsigned int i = 0; i < base_elements.size(); ++i)
2837#include "fe/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 unsigned int face_to_cell_index(const unsigned int face_dof_index, const unsigned int face, const types::geometric_orientation combined_orientation=numbers::default_geometric_orientation) const override
virtual FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim=0) const override final
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const hp::QCollection< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const override
void compute_fill(const Mapping< dim, spacedim > &mapping, const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Q_or_QC &quadrature, const CellSimilarity::Similarity cell_similarity, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_data, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const
virtual Tensor< 3, dim > shape_3rd_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const override
virtual void get_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix) const override
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const override
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_face_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const hp::QCollection< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual bool hp_constraints_are_implemented() const override
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
void build_interface_constraints()
virtual Tensor< 4, dim > shape_4th_derivative_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual Point< dim - 1 > unit_face_support_point(const unsigned int index, const unsigned int face_no=0) const override
void initialize(const std::vector< const FiniteElement< dim, spacedim > * > &fes, const std::vector< unsigned int > &multiplicities)
virtual void convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double > > &support_point_values, std::vector< double > &dof_values) const override
std::vector< std::pair< unsigned int, unsigned int > > hp_object_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const
virtual void fill_fe_subface_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Quadrature< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual double shape_value(const unsigned int i, const Point< dim > &p) const override
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix, const unsigned int face_no=0) const override
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix, const unsigned int face_no=0) const override
virtual std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
virtual std::size_t memory_consumption() const override
virtual Tensor< 4, dim > shape_4th_derivative(const unsigned int i, const Point< dim > &p) const override
virtual std::unique_ptr< typename FiniteElement< dim, spacedim >::InternalDataBase > get_subface_data(const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const Quadrature< dim - 1 > &quadrature, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
unsigned int n_dofs_per_cell() const
unsigned int n_dofs_per_face(unsigned int face_no=0, unsigned int child=0) const
unsigned int n_components() const
virtual std::string get_name() const =0
virtual void fill_fe_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const hp::QCollection< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const
bool is_primitive() const
virtual void fill_fe_subface_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Quadrature< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const =0
virtual void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &source, const unsigned int subface, FullMatrix< double > &matrix, const unsigned int face_no=0) const
std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int > > system_to_base_table
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > system_to_base_index(const unsigned int index) const
std::pair< std::pair< unsigned int, unsigned int >, unsigned int > face_system_to_base_index(const unsigned int index, const unsigned int face_no=0) const
unsigned int element_multiplicity(const unsigned int index) const
unsigned int n_nonzero_components(const unsigned int i) const
unsigned int n_base_elements() const
virtual void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source, FullMatrix< double > &matrix, const unsigned int face_no=0) const
virtual std::size_t memory_consumption() const
virtual std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const
Abstract base class for mapping classes.
unsigned int size() const
unsigned int n_face_orientations(const unsigned int face_no) const
unsigned int max_n_quadrature_points() const
#define DEAL_II_NAMESPACE_OPEN
constexpr bool running_in_debug_mode()
#define DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_ASSERT_UNREACHABLE()
#define DEAL_II_NOT_IMPLEMENTED()
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
@ update_hessians
Second derivatives of shape functions.
@ update_values
Shape function values.
@ update_3rd_derivatives
Third derivatives of shape functions.
@ update_gradients
Shape function gradients.
@ update_default
No update.
Task< RT > new_task(const std::function< RT()> &function)
std::vector< index_type > data
@ neither_element_dominates
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell &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)
constexpr unsigned int invalid_unsigned_int
unsigned char geometric_orientation