16#ifndef dealii_fe_tools_H
17#define dealii_fe_tools_H
44template <
typename number>
48template <
int dim,
int spacedim>
50template <
int dim,
int spacedim>
55template <
typename number>
88 template <
int dim,
int spacedim = dim>
95 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
96 get(
const unsigned int degree)
const = 0;
103 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
128 virtual std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
129 get(
const unsigned int degree)
const override;
135 virtual std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
154 template <
int dim,
int spacedim>
157 std::vector<unsigned int> & renumbering,
158 std::vector<std::vector<unsigned int>> &start_indices);
175 template <
int dim,
int spacedim>
178 std::vector<types::global_dof_index> &renumbering,
179 std::vector<types::global_dof_index> &block_data,
180 bool return_start_indices =
true);
195 template <
int dim,
typename number,
int spacedim>
212 template <
int dim,
typename number,
int spacedim>
229 template <
int dim,
typename number,
int spacedim>
238 template <
int dim,
typename number,
int spacedim>
312 template <
int dim,
int spacedim>
354 template <
int dim,
typename number,
int spacedim>
359 const bool isotropic_only =
false,
360 const double threshold = 1.e-12);
383 template <
int dim,
typename number,
int spacedim>
388 const unsigned int face_coarse,
389 const unsigned int face_fine,
390 const double threshold = 1.e-12);
423 template <
int dim,
typename number,
int spacedim>
428 const bool isotropic_only =
false);
515 template <
int dim,
int spacedim>
530 template <
int dim,
int spacedim>
580 template <
int dim,
int spacedim>
587 const unsigned int face,
607 template <
int dim,
int spacedim,
typename number>
612 std::vector<number> & dof_values);
650 template <
int dim,
int spacedim,
class InVector,
class OutVector>
673 template <
int dim,
int spacedim,
class InVector,
class OutVector>
695 template <
int dim,
class InVector,
class OutVector,
int spacedim>
700 OutVector & u1_interpolated);
714 template <
int dim,
class InVector,
class OutVector,
int spacedim>
722 OutVector & u1_interpolated);
733 template <
int dim,
class InVector,
class OutVector,
int spacedim>
738 OutVector & z1_difference);
752 template <
int dim,
class InVector,
class OutVector,
int spacedim>
760 OutVector & z1_difference);
772 template <
int dim,
class InVector,
class OutVector,
int spacedim>
839 template <
int dim,
class InVector,
class OutVector,
int spacedim>
858 template <
int dim,
class InVector,
class OutVector,
int spacedim>
883 std::vector<unsigned int>
893 std::vector<unsigned int>
971 namespace Compositing
989 template <
int dim,
int spacedim>
993 const std::vector<unsigned int> & multiplicities,
994 const bool do_tensor_product =
true);
1001 template <
int dim,
int spacedim>
1004 const std::initializer_list<
1011 template <
int dim,
int spacedim>
1014 const unsigned int N1,
1016 const unsigned int N2 = 0,
1018 const unsigned int N3 = 0,
1020 const unsigned int N4 = 0,
1022 const unsigned int N5 = 0);
1036 template <
int dim,
int spacedim>
1040 const std::vector<unsigned int> & multiplicities);
1047 template <
int dim,
int spacedim>
1050 const std::initializer_list<
1068 template <
int dim,
int spacedim>
1072 const unsigned int N1,
1074 const unsigned int N2 = 0,
1076 const unsigned int N3 = 0,
1078 const unsigned int N4 = 0,
1080 const unsigned int N5 = 0);
1099 template <
int dim,
int spacedim>
1100 std::vector<ComponentMask>
1103 const std::vector<unsigned int> & multiplicities,
1104 const bool do_tensor_product =
true);
1111 template <
int dim,
int spacedim>
1112 std::vector<ComponentMask>
1114 const std::initializer_list<
1136 template <
int dim,
int spacedim>
1137 std::vector<ComponentMask>
1140 const unsigned int N1,
1142 const unsigned int N2 = 0,
1144 const unsigned int N3 = 0,
1146 const unsigned int N4 = 0,
1148 const unsigned int N5 = 0,
1149 const bool do_tensor_product =
true);
1167 template <
int dim,
int spacedim>
1170 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1171 unsigned int>> &system_to_base_table,
1172 std::vector<std::pair<unsigned int, unsigned int>>
1173 & system_to_component_table,
1174 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1175 unsigned int>> &component_to_base_table,
1177 const bool do_tensor_product =
true);
1194 template <
int dim,
int spacedim>
1197 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1198 unsigned int>> &face_system_to_base_table,
1199 std::vector<std::pair<unsigned int, unsigned int>>
1200 & face_system_to_component_table,
1202 const bool do_tensor_product =
true,
1203 const unsigned int face_no = 0 );
1241 template <
int dim,
int spacedim = dim>
1242 std::unique_ptr<FiniteElement<dim, spacedim>>
1287 template <
int dim,
int spacedim>
1303 <<
"Can't re-generate a finite element from the string '"
1320 <<
"The dimension " << arg1
1321 <<
" in the finite element string must match "
1322 <<
"the space dimension " << arg2 <<
'.');
1352 "You are using continuous elements on a grid with "
1353 "hanging nodes but without providing hanging node "
1354 "constraints. Use the respective function with "
1355 "additional AffineConstraints argument(s), instead.");
1372 <<
"This is a " << arg1 <<
'x' << arg2 <<
" matrix, "
1373 <<
"but should be a " << arg3 <<
'x' << arg4 <<
" matrix.");
1382 <<
"Least squares fit leaves a gap of " << arg1);
1392 << arg1 <<
" must be greater than " << arg2);
1401 std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
1404 return std::make_unique<FE>(degree);
1407 namespace Compositing
1409 template <
int dim,
int spacedim>
1412 const std::initializer_list<
1416 std::vector<const FiniteElement<dim, spacedim> *> fes;
1417 std::vector<unsigned int> multiplicities;
1420 [&fes, &multiplicities](
1421 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1422 unsigned int> &fe_system) {
1423 fes.push_back(fe_system.first.get());
1424 multiplicities.push_back(fe_system.second);
1427 for (
const auto &p : fe_systems)
1435 template <
int dim,
int spacedim>
1438 const std::initializer_list<
1442 std::vector<const FiniteElement<dim, spacedim> *> fes;
1443 std::vector<unsigned int> multiplicities;
1446 [&fes, &multiplicities](
1447 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1448 unsigned int> &fe_system) {
1449 fes.push_back(fe_system.first.get());
1450 multiplicities.push_back(fe_system.second);
1453 for (
const auto &p : fe_systems)
1461 template <
int dim,
int spacedim>
1462 std::vector<ComponentMask>
1464 const std::initializer_list<
1468 std::vector<const FiniteElement<dim, spacedim> *> fes;
1469 std::vector<unsigned int> multiplicities;
1472 [&fes, &multiplicities](
1473 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1474 unsigned int> &fe_system) {
1475 fes.push_back(fe_system.first.get());
1476 multiplicities.push_back(fe_system.second);
1479 for (
const auto &p : fe_systems)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_CXX20_REQUIRES(condition)
#define DEAL_II_NAMESPACE_CLOSE
#define DeclException0(Exception0)
static ::ExceptionBase & ExcTriangulationMismatch()
static ::ExceptionBase & ExcInvalidFEName(std::string arg1)
#define DeclException4(Exception4, type1, type2, type3, type4, outsequence)
static ::ExceptionBase & ExcInvalidFEDimension(char arg1, int arg2)
static ::ExceptionBase & ExcLeastSquaresError(double arg1)
#define DeclException2(Exception2, type1, type2, outsequence)
static ::ExceptionBase & ExcFENotPrimitive()
static ::ExceptionBase & ExcHangingNodesNotAllowed()
#define DeclExceptionMsg(Exception, defaulttext)
static ::ExceptionBase & ExcInvalidFE()
static ::ExceptionBase & ExcGridNotRefinedAtLeastOnce()
static ::ExceptionBase & ExcMatrixDimensionMismatch(int arg1, int arg2, int arg3, int arg4)
#define DeclException1(Exception1, type1, outsequence)
static ::ExceptionBase & ExcNotGreaterThan(int arg1, int arg2)
typename ActiveSelector::active_cell_iterator active_cell_iterator
constexpr ReturnType< rank, T >::value_type & extract(T &t, const ArrayType &indices)