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,
987 const unsigned char combined_orientation)
const
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 base_element(base).unit_support_points[base_index];
1811 primitive_offset_tables.resize(this->n_base_elements());
1813 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1814 if (base_element(base_no).is_primitive())
1815 primitive_offset_tables[base_no] =
1820 nonprimitive_offset_tables.resize(this->n_base_elements());
1822 for (
unsigned int base_no = 0; base_no < this->n_base_elements(); ++base_no)
1823 if (!base_element(base_no).is_primitive())
1824 nonprimitive_offset_tables[base_no] =
1831 for (
unsigned int face_no = 0; face_no < this->n_unique_faces();
1844 bool flag_has_no_support_points =
false;
1846 for (
unsigned int base_el = 0; base_el < this->n_base_elements();
1848 if (!base_element(base_el).has_support_points() &&
1849 (base_element(base_el).n_dofs_per_face(face_no) > 0))
1851 this->unit_face_support_points[face_no].resize(0);
1852 flag_has_no_support_points =
true;
1857 if (flag_has_no_support_points)
1862 this->unit_face_support_points[face_no].resize(
1863 this->n_dofs_per_face(face_no));
1865 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
1867 const unsigned int base_i =
1868 this->face_system_to_base_table[face_no][i].first.first;
1869 const unsigned int index_in_base =
1870 this->face_system_to_base_table[face_no][i].second;
1874 base_element(base_i).unit_face_support_points[face_no].
size(),
1877 this->unit_face_support_points[face_no][i] =
1878 base_element(base_i)
1879 .unit_face_support_points[face_no][index_in_base];
1892 generalized_support_points_index_table.resize(this->n_base_elements());
1894 for (
unsigned int base = 0; base < this->n_base_elements(); ++base)
1905 if (!base_element(base).has_generalized_support_points())
1908 for (
const auto &point :
1909 base_element(base).get_generalized_support_points())
1913 std::find(std::begin(this->generalized_support_points),
1914 std::end(this->generalized_support_points),
1917 if (p == std::end(this->generalized_support_points))
1920 const auto n = this->generalized_support_points.size();
1921 generalized_support_points_index_table[base].push_back(n);
1922 this->generalized_support_points.push_back(point);
1927 const auto n = p - std::begin(this->generalized_support_points);
1928 generalized_support_points_index_table[base].push_back(n);
1935 for (
unsigned int i = 0; i < base_elements.size(); ++i)
1937 if (!base_element(i).has_generalized_support_points())
1940 const auto &points =
1941 base_elements[i].first->get_generalized_support_points();
1942 for (
unsigned int j = 0; j < points.size(); ++j)
1944 const auto n = generalized_support_points_index_table[i][j];
1945 Assert(this->generalized_support_points[n] == points[j],
1955 for (
unsigned int face_no = 0; face_no < this->n_unique_faces();
1960 Assert(this->adjust_quad_dof_index_for_face_orientation_table[face_no]
1962 this->reference_cell().n_face_orientations(face_no) *
1963 this->n_dofs_per_quad(face_no),
1968 unsigned int index = 0;
1969 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
1972 this->base_element(b)
1973 .adjust_quad_dof_index_for_face_orientation_table[face_no];
1974 for (
unsigned int c = 0; c < this->element_multiplicity(b); ++c)
1976 for (
unsigned int i = 0; i < temp.size(0); ++i)
1977 for (
unsigned int j = 0;
1981 this->adjust_quad_dof_index_for_face_orientation_table
1982 [face_no](index + i, j) = temp(i, j);
1983 index += temp.size(0);
1990 Assert(this->adjust_line_dof_index_for_line_orientation_table.size() ==
1991 this->n_dofs_per_line(),
1993 unsigned int index = 0;
1994 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
1996 const std::vector<int> &temp2 =
1997 this->base_element(b)
1998 .adjust_line_dof_index_for_line_orientation_table;
1999 for (
unsigned int c = 0; c < this->element_multiplicity(b); ++c)
2004 this->adjust_line_dof_index_for_line_orientation_table.begin() +
2006 index += temp2.size();
2018template <
int dim,
int spacedim>
2022 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2023 if (base_element(b).hp_constraints_are_implemented() ==
false)
2031template <
int dim,
int spacedim>
2036 const unsigned int face_no)
const
2038 Assert(interpolation_matrix.
n() == this->n_dofs_per_face(face_no),
2040 this->n_dofs_per_face(face_no)));
2055 if (
const auto *fe_other_system =
2059 interpolation_matrix = 0;
2063 unsigned int base_index = 0, base_index_other = 0;
2064 unsigned int multiplicity = 0, multiplicity_other = 0;
2072 fe_other_system->base_element(
2079 base_to_base_interpolation.reinit(base_other.n_dofs_per_face(face_no),
2082 base_to_base_interpolation,
2088 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
2089 if (this->face_system_to_base_index(i, face_no).first ==
2090 std::make_pair(base_index, multiplicity))
2091 for (
unsigned int j = 0;
2092 j < fe_other_system->n_dofs_per_face(face_no);
2094 if (fe_other_system->face_system_to_base_index(j, face_no)
2096 std::make_pair(base_index_other, multiplicity_other))
2097 interpolation_matrix(j, i) = base_to_base_interpolation(
2098 fe_other_system->face_system_to_base_index(j, face_no)
2100 this->face_system_to_base_index(i, face_no).second);
2106 if (multiplicity == this->element_multiplicity(base_index))
2111 ++multiplicity_other;
2112 if (multiplicity_other ==
2113 fe_other_system->element_multiplicity(base_index_other))
2115 multiplicity_other = 0;
2121 if (base_index == this->n_base_elements())
2123 Assert(base_index_other == fe_other_system->n_base_elements(),
2130 Assert(base_index_other != fe_other_system->n_base_elements(),
2141 spacedim>::ExcInterpolationNotImplemented()));
2147template <
int dim,
int spacedim>
2151 const unsigned int subface,
2153 const unsigned int face_no)
const
2156 (x_source_fe.
get_name().find(
"FESystem<") == 0) ||
2160 Assert(interpolation_matrix.
n() == this->n_dofs_per_face(face_no),
2162 this->n_dofs_per_face(face_no)));
2179 if (fe_other_system !=
nullptr)
2182 interpolation_matrix = 0;
2186 unsigned int base_index = 0, base_index_other = 0;
2187 unsigned int multiplicity = 0, multiplicity_other = 0;
2202 base_to_base_interpolation.reinit(base_other.n_dofs_per_face(face_no),
2206 base_to_base_interpolation,
2212 for (
unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
2213 if (this->face_system_to_base_index(i, face_no).first ==
2214 std::make_pair(base_index, multiplicity))
2215 for (
unsigned int j = 0;
2220 std::make_pair(base_index_other, multiplicity_other))
2221 interpolation_matrix(j, i) = base_to_base_interpolation(
2224 this->face_system_to_base_index(i, face_no).second);
2230 if (multiplicity == this->element_multiplicity(base_index))
2235 ++multiplicity_other;
2236 if (multiplicity_other ==
2239 multiplicity_other = 0;
2245 if (base_index == this->n_base_elements())
2262 fe_other_system !=
nullptr,
2264 spacedim>::ExcInterpolationNotImplemented()));
2270template <
int dim,
int spacedim>
2271template <
int structdim>
2272std::vector<std::pair<unsigned int, unsigned int>>
2275 const unsigned int face_no)
const
2294 unsigned int base_index = 0, base_index_other = 0;
2295 unsigned int multiplicity = 0, multiplicity_other = 0;
2299 unsigned int dof_offset = 0, dof_offset_other = 0;
2301 std::vector<std::pair<unsigned int, unsigned int>> identities;
2315 std::vector<std::pair<unsigned int, unsigned int>> base_identities;
2332 for (
const auto &base_identity : base_identities)
2333 identities.emplace_back(base_identity.
first + dof_offset,
2334 base_identity.
second + dof_offset_other);
2337 dof_offset += base.template n_dofs_per_object<structdim>();
2339 base_other.template n_dofs_per_object<structdim>();
2345 if (multiplicity == this->element_multiplicity(base_index))
2350 ++multiplicity_other;
2351 if (multiplicity_other ==
2354 multiplicity_other = 0;
2360 if (base_index == this->n_base_elements())
2378 return std::vector<std::pair<unsigned int, unsigned int>>();
2384template <
int dim,
int spacedim>
2385std::vector<std::pair<unsigned int, unsigned int>>
2389 return hp_object_dof_identities<0>(fe_other);
2392template <
int dim,
int spacedim>
2393std::vector<std::pair<unsigned int, unsigned int>>
2397 return hp_object_dof_identities<1>(fe_other);
2402template <
int dim,
int spacedim>
2403std::vector<std::pair<unsigned int, unsigned int>>
2406 const unsigned int face_no)
const
2408 return hp_object_dof_identities<2>(fe_other, face_no);
2413template <
int dim,
int spacedim>
2417 const unsigned int codim)
const
2426 Assert(this->n_components() == fe_sys_other->n_components(),
2427 ExcMessage(
"You can only compare two elements for domination "
2428 "that have the same number of vector components. The "
2429 "current element has " +
2430 std::to_string(this->n_components()) +
2431 " vector components, and you are comparing it "
2432 "against an element with " +
2433 std::to_string(fe_sys_other->n_components()) +
2434 " vector components."));
2442 if ((this->n_base_elements() == fe_sys_other->n_base_elements()) &&
2446 for (unsigned int b = 0; b < this->n_base_elements(); ++b)
2447 if (this->element_multiplicity(b) !=
2448 fe_sys_other->element_multiplicity(b))
2453 for (
unsigned int b = 0;
b < this->n_base_elements(); ++
b)
2455 Assert(this->base_element(b).n_components() ==
2456 fe_sys_other->base_element(b).n_components(),
2461 (this->base_element(b).compare_for_domination(
2462 fe_sys_other->base_element(b), codim));
2464 domination = domination & base_domination;
2471 for (
unsigned int c = 0; c < this->n_components(); ++c)
2473 const unsigned int base_element_index_in_fe_sys_this =
2474 this->component_to_base_index(c).first;
2475 const unsigned int base_element_index_in_fe_sys_other =
2476 fe_sys_other->component_to_base_index(c).first;
2478 Assert(this->base_element(base_element_index_in_fe_sys_this)
2481 ->base_element(base_element_index_in_fe_sys_other)
2488 (this->base_element(base_element_index_in_fe_sys_this)
2489 .compare_for_domination(
2490 fe_sys_other->base_element(
2491 base_element_index_in_fe_sys_other),
2494 domination = domination & base_domination;
2507template <
int dim,
int spacedim>
2512 return *base_elements[
index].first;
2517template <
int dim,
int spacedim>
2520 const unsigned int shape_index,
2521 const unsigned int face_index)
const
2523 return (base_element(this->system_to_base_index(shape_index).
first.first)
2524 .has_support_on_face(this->system_to_base_index(shape_index).second,
2530template <
int dim,
int spacedim>
2536 (this->unit_support_points.empty()),
2545 return (base_element(this->system_to_base_index(index).
first.first)
2546 .unit_support_point(this->system_to_base_index(index).second));
2551template <
int dim,
int spacedim>
2554 const unsigned int index,
2555 const unsigned int face_no)
const
2559 (this->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2560 .
size() == this->n_dofs_per_face(face_no)) ||
2561 (this->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2563 (typename
FiniteElement<dim, spacedim>::ExcFEHasNoSupportPoints()));
2566 if (this->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2569 ->unit_face_support_points[this->n_unique_faces() == 1 ? 0 : face_no]
2575 base_element(this->face_system_to_base_index(index, face_no).
first.first)
2576 .unit_face_support_point(
2577 this->face_system_to_base_index(index, face_no).second, face_no));
2582template <
int dim,
int spacedim>
2583std::pair<Table<2, bool>, std::vector<unsigned int>>
2589 Table<2, bool> constant_modes(this->n_components(), this->n_dofs_per_cell());
2590 std::vector<unsigned int> components;
2591 for (
unsigned int i = 0; i < base_elements.size(); ++i)
2593 const std::pair<Table<2, bool>, std::vector<unsigned int>> base_table =
2594 base_elements[i].first->get_constant_modes();
2596 const unsigned int element_multiplicity = this->element_multiplicity(i);
2601 const unsigned int comp = components.size();
2602 if (constant_modes.n_rows() <
2603 comp + base_table.first.n_rows() * element_multiplicity)
2605 Table<2, bool> new_constant_modes(comp + base_table.first.n_rows() *
2606 element_multiplicity,
2607 constant_modes.n_cols());
2608 for (
unsigned int r = 0; r < comp; ++r)
2609 for (
unsigned int c = 0; c < this->n_dofs_per_cell(); ++c)
2610 new_constant_modes(r, c) = constant_modes(r, c);
2612 constant_modes = std::move(new_constant_modes);
2617 for (
unsigned int k = 0; k < this->n_dofs_per_cell(); ++k)
2619 std::pair<std::pair<unsigned int, unsigned int>,
unsigned int> ind =
2620 this->system_to_base_index(k);
2621 if (ind.first.first == i)
2622 for (
unsigned int c = 0; c < base_table.first.n_rows(); ++c)
2623 constant_modes(comp +
2624 ind.first.second * base_table.first.n_rows() + c,
2625 k) = base_table.first(c, ind.second);
2627 for (
unsigned int r = 0; r < element_multiplicity; ++r)
2628 for (
const unsigned int c : base_table.
second)
2629 components.push_back(
2630 comp + r * this->base_elements[i].
first->n_components() + c);
2633 return std::pair<Table<2, bool>, std::vector<unsigned int>>(constant_modes,
2639template <
int dim,
int spacedim>
2643 std::vector<double> &dof_values)
const
2645 Assert(this->has_generalized_support_points(),
2646 ExcMessage(
"The FESystem does not have generalized support points"));
2649 this->get_generalized_support_points().size());
2652 std::vector<double> base_dof_values;
2653 std::vector<Vector<double>> base_point_values;
2658 unsigned int current_vector_component = 0;
2659 for (
unsigned int base = 0; base < base_elements.size(); ++base)
2664 const auto &base_element = this->base_element(base);
2665 const unsigned int multiplicity = this->element_multiplicity(base);
2666 const unsigned int n_base_dofs = base_element.n_dofs_per_cell();
2667 const unsigned int n_base_components = base_element.n_components();
2672 if (n_base_dofs == 0)
2674 current_vector_component += multiplicity * n_base_components;
2678 if (base_element.has_generalized_support_points())
2680 const unsigned int n_base_points =
2681 base_element.get_generalized_support_points().size();
2683 base_dof_values.resize(n_base_dofs);
2684 base_point_values.resize(n_base_points);
2686 for (
unsigned int m = 0; m < multiplicity;
2687 ++m, current_vector_component += n_base_components)
2691 for (
unsigned int j = 0; j < base_point_values.size(); ++j)
2693 base_point_values[j].reinit(n_base_components,
false);
2696 generalized_support_points_index_table[base][j];
2700 const auto *
const begin =
2701 std::begin(point_values[n]) + current_vector_component;
2702 const auto *
const end =
begin + n_base_components;
2703 std::copy(begin, end, std::begin(base_point_values[j]));
2707 .convert_generalized_support_point_values_to_dof_values(
2708 base_point_values, base_dof_values);
2717 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
2718 if (this->system_to_base_index(i).first ==
2719 std::make_pair(base, m))
2721 base_dof_values[this->system_to_base_index(i).second];
2733 for (
unsigned int m = 0; m < multiplicity; ++m)
2734 for (
unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
2735 if (this->system_to_base_index(i).first ==
2736 std::make_pair(base, m))
2737 dof_values[i] = std::numeric_limits<double>::signaling_NaN();
2739 current_vector_component += multiplicity * n_base_components;
2746template <
int dim,
int spacedim>
2754 sizeof(base_elements));
2755 for (
unsigned int i = 0; i < base_elements.size(); ++i)
2763#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()
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)
static const unsigned int invalid_unsigned_int