15#ifndef dealii_fe_tools_H
16#define dealii_fe_tools_H
43template <
typename number>
47template <
int dim,
int spacedim>
49template <
int dim,
int spacedim>
54template <
typename number>
87 template <
int dim,
int spacedim = dim>
94 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
95 get(
const unsigned int degree)
const = 0;
102 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
127 virtual std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
128 get(
const unsigned int degree)
const override;
134 virtual std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
153 template <
int dim,
int spacedim>
156 std::vector<unsigned int> &renumbering,
157 std::vector<std::vector<unsigned int>> &start_indices);
174 template <
int dim,
int spacedim>
177 std::vector<types::global_dof_index> &renumbering,
178 std::vector<types::global_dof_index> &block_data,
179 bool return_start_indices =
true);
194 template <
int dim,
typename number,
int spacedim>
211 template <
int dim,
typename number,
int spacedim>
228 template <
int dim,
typename number,
int spacedim>
237 template <
int dim,
typename number,
int spacedim>
311 template <
int dim,
int spacedim>
353 template <
int dim,
typename number,
int spacedim>
358 const bool isotropic_only =
false,
359 const double threshold = 1.e-12);
382 template <
int dim,
typename number,
int spacedim>
386 const unsigned int face_coarse,
387 const unsigned int face_fine,
388 const double threshold = 1.e-12);
421 template <
int dim,
typename number,
int spacedim>
426 const bool isotropic_only =
false);
513 template <
int dim,
int spacedim>
528 template <
int dim,
int spacedim>
578 template <
int dim,
int spacedim>
585 const unsigned int face,
620 template <
int dim,
int spacedim = dim>
639 template <
int dim,
int spacedim,
typename number>
644 std::vector<number> &dof_values);
685 template <
int dim,
int spacedim,
class InVector,
class OutVector>
711 template <
int dim,
int spacedim,
class InVector,
class OutVector>
733 template <
int dim,
class InVector,
class OutVector,
int spacedim>
738 OutVector &u1_interpolated);
752 template <
int dim,
class InVector,
class OutVector,
int spacedim>
760 OutVector &u1_interpolated);
771 template <
int dim,
class InVector,
class OutVector,
int spacedim>
776 OutVector &z1_difference);
790 template <
int dim,
class InVector,
class OutVector,
int spacedim>
798 OutVector &z1_difference);
810 template <
int dim,
class InVector,
class OutVector,
int spacedim>
877 template <
int dim,
class InVector,
class OutVector,
int spacedim>
896 template <
int dim,
class InVector,
class OutVector,
int spacedim>
921 std::vector<unsigned int>
931 std::vector<unsigned int>
1009 namespace Compositing
1027 template <
int dim,
int spacedim>
1031 const std::vector<unsigned int> &multiplicities,
1032 const bool do_tensor_product =
true);
1039 template <
int dim,
int spacedim>
1042 const std::initializer_list<
1052 template <
int dim,
int spacedim>
1055 const unsigned int N1,
1057 const unsigned int N2 = 0,
1059 const unsigned int N3 = 0,
1061 const unsigned int N4 = 0,
1063 const unsigned int N5 = 0);
1077 template <
int dim,
int spacedim>
1081 const std::vector<unsigned int> &multiplicities);
1088 template <
int dim,
int spacedim>
1091 const std::initializer_list<
1112 template <
int dim,
int spacedim>
1116 const unsigned int N1,
1118 const unsigned int N2 = 0,
1120 const unsigned int N3 = 0,
1122 const unsigned int N4 = 0,
1124 const unsigned int N5 = 0);
1143 template <
int dim,
int spacedim>
1144 std::vector<ComponentMask>
1147 const std::vector<unsigned int> &multiplicities,
1148 const bool do_tensor_product =
true);
1155 template <
int dim,
int spacedim>
1156 std::vector<ComponentMask>
1158 const std::initializer_list<
1183 template <
int dim,
int spacedim>
1187 const unsigned int N1,
1189 const unsigned int N2 = 0,
1191 const unsigned int N3 = 0,
1193 const unsigned int N4 = 0,
1195 const unsigned int N5 = 0,
1196 const bool do_tensor_product =
true);
1214 template <
int dim,
int spacedim>
1217 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1218 unsigned int>> &system_to_base_table,
1219 std::vector<std::pair<unsigned int, unsigned int>>
1220 &system_to_component_table,
1221 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1222 unsigned int>> &component_to_base_table,
1224 const bool do_tensor_product =
true);
1241 template <
int dim,
int spacedim>
1244 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1245 unsigned int>> &face_system_to_base_table,
1246 std::vector<std::pair<unsigned int, unsigned int>>
1247 &face_system_to_component_table,
1249 const bool do_tensor_product =
true,
1250 const unsigned int face_no = 0 );
1009 namespace Compositing {
…}
1288 template <
int dim,
int spacedim = dim>
1289 std::unique_ptr<FiniteElement<dim, spacedim>>
1334 template <
int dim,
int spacedim>
1350 <<
"Can't re-generate a finite element from the string '"
1367 <<
"The dimension " << arg1
1368 <<
" in the finite element string must match "
1369 <<
"the space dimension " << arg2 <<
'.');
1399 "You are using continuous elements on a grid with "
1400 "hanging nodes but without providing hanging node "
1401 "constraints. Use the respective function with "
1402 "additional AffineConstraints argument(s), instead.");
1419 <<
"This is a " << arg1 <<
'x' << arg2 <<
" matrix, "
1420 <<
"but should be a " << arg3 <<
'x' << arg4 <<
" matrix.");
1429 <<
"Least squares fit leaves a gap of " << arg1);
1439 << arg1 <<
" must be greater than " << arg2);
1448 std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
1451 return std::make_unique<FE>(degree);
1454 namespace Compositing
1456 template <
int dim,
int spacedim>
1459 const std::initializer_list<
1463 std::vector<const FiniteElement<dim, spacedim> *> fes;
1464 std::vector<unsigned int> multiplicities;
1467 [&fes, &multiplicities](
1468 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1469 unsigned int> &fe_system) {
1470 fes.push_back(fe_system.first.get());
1471 multiplicities.push_back(fe_system.second);
1474 for (
const auto &p : fe_systems)
1482 template <
int dim,
int spacedim>
1485 const std::initializer_list<
1489 std::vector<const FiniteElement<dim, spacedim> *> fes;
1490 std::vector<unsigned int> multiplicities;
1493 [&fes, &multiplicities](
1494 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1495 unsigned int> &fe_system) {
1496 fes.push_back(fe_system.first.get());
1497 multiplicities.push_back(fe_system.second);
1500 for (
const auto &p : fe_systems)
1508 template <
int dim,
int spacedim>
1509 std::vector<ComponentMask>
1511 const std::initializer_list<
1515 std::vector<const FiniteElement<dim, spacedim> *> fes;
1516 std::vector<unsigned int> multiplicities;
1519 [&fes, &multiplicities](
1520 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1521 unsigned int> &fe_system) {
1522 fes.push_back(fe_system.first.get());
1523 multiplicities.push_back(fe_system.second);
1526 for (
const auto &p : fe_systems)
#define DEAL_II_DEPRECATED
#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)