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>
54template <
typename number>
85 template <
int dim,
int spacedim = dim>
92 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
93 get(
const unsigned int degree)
const = 0;
100 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
125 virtual std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
126 get(
const unsigned int degree)
const override;
132 virtual std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
151 template <
int dim,
int spacedim>
154 std::vector<unsigned int> & renumbering,
155 std::vector<std::vector<unsigned int>> &start_indices);
172 template <
int dim,
int spacedim>
175 std::vector<types::global_dof_index> &renumbering,
176 std::vector<types::global_dof_index> &block_data,
177 bool return_start_indices =
true);
192 template <
int dim,
typename number,
int spacedim>
209 template <
int dim,
typename number,
int spacedim>
226 template <
int dim,
typename number,
int spacedim>
235 template <
int dim,
typename number,
int spacedim>
309 template <
int dim,
int spacedim>
351 template <
int dim,
typename number,
int spacedim>
356 const bool isotropic_only =
false,
357 const double threshold = 1.e-12);
380 template <
int dim,
typename number,
int spacedim>
385 const unsigned int face_coarse,
386 const unsigned int face_fine,
387 const double threshold = 1.e-12);
420 template <
int dim,
typename number,
int spacedim>
425 const bool isotropic_only =
false);
512 template <
int dim,
int spacedim>
527 template <
int dim,
int spacedim>
577 template <
int dim,
int spacedim>
584 const unsigned int face,
604 template <
int dim,
int spacedim,
typename number>
609 std::vector<number> & dof_values);
647 template <
int dim,
int spacedim,
class InVector,
class OutVector>
670 template <
int dim,
int spacedim,
class InVector,
class OutVector>
692 template <
int dim,
class InVector,
class OutVector,
int spacedim>
697 OutVector & u1_interpolated);
711 template <
int dim,
class InVector,
class OutVector,
int spacedim>
719 OutVector & u1_interpolated);
730 template <
int dim,
class InVector,
class OutVector,
int spacedim>
735 OutVector & z1_difference);
749 template <
int dim,
class InVector,
class OutVector,
int spacedim>
757 OutVector & z1_difference);
769 template <
int dim,
class InVector,
class OutVector,
int spacedim>
836 template <
int dim,
class InVector,
class OutVector,
int spacedim>
855 template <
int dim,
class InVector,
class OutVector,
int spacedim>
880 std::vector<unsigned int>
893 std::vector<unsigned int> &h2l);
905 std::vector<unsigned int> & h2l);
922 std::vector<unsigned int>
932 std::vector<unsigned int> & l2h);
1016 namespace Compositing
1034 template <
int dim,
int spacedim>
1038 const std::vector<unsigned int> & multiplicities,
1039 const bool do_tensor_product =
true);
1046 template <
int dim,
int spacedim>
1049 const std::initializer_list<
1056 template <
int dim,
int spacedim>
1059 const unsigned int N1,
1061 const unsigned int N2 = 0,
1063 const unsigned int N3 = 0,
1065 const unsigned int N4 = 0,
1067 const unsigned int N5 = 0);
1081 template <
int dim,
int spacedim>
1085 const std::vector<unsigned int> & multiplicities);
1092 template <
int dim,
int spacedim>
1095 const std::initializer_list<
1113 template <
int dim,
int spacedim>
1117 const unsigned int N1,
1119 const unsigned int N2 = 0,
1121 const unsigned int N3 = 0,
1123 const unsigned int N4 = 0,
1125 const unsigned int N5 = 0);
1144 template <
int dim,
int spacedim>
1145 std::vector<ComponentMask>
1148 const std::vector<unsigned int> & multiplicities,
1149 const bool do_tensor_product =
true);
1156 template <
int dim,
int spacedim>
1157 std::vector<ComponentMask>
1159 const std::initializer_list<
1181 template <
int dim,
int spacedim>
1182 std::vector<ComponentMask>
1185 const unsigned int N1,
1187 const unsigned int N2 = 0,
1189 const unsigned int N3 = 0,
1191 const unsigned int N4 = 0,
1193 const unsigned int N5 = 0,
1194 const bool do_tensor_product =
true);
1212 template <
int dim,
int spacedim>
1215 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1216 unsigned int>> &system_to_base_table,
1217 std::vector<std::pair<unsigned int, unsigned int>>
1218 & system_to_component_table,
1219 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1220 unsigned int>> &component_to_base_table,
1222 const bool do_tensor_product =
true);
1239 template <
int dim,
int spacedim>
1242 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1243 unsigned int>> &face_system_to_base_table,
1244 std::vector<std::pair<unsigned int, unsigned int>>
1245 & face_system_to_component_table,
1247 const bool do_tensor_product =
true,
1248 const unsigned int face_no = 0 );
1286 template <
int dim,
int spacedim = dim>
1287 std::unique_ptr<FiniteElement<dim, spacedim>>
1332 template <
int dim,
int spacedim>
1348 <<
"Can't re-generate a finite element from the string '"
1365 <<
"The dimension " << arg1
1366 <<
" in the finite element string must match "
1367 <<
"the space dimension " << arg2 <<
".");
1397 "You are using continuous elements on a grid with "
1398 "hanging nodes but without providing hanging node "
1399 "constraints. Use the respective function with "
1400 "additional AffineConstraints argument(s), instead.");
1417 <<
"This is a " << arg1 <<
"x" << arg2 <<
" matrix, "
1418 <<
"but should be a " << arg3 <<
"x" << arg4 <<
" matrix.");
1427 <<
"Least squares fit leaves a gap of " << arg1);
1437 << arg1 <<
" must be greater than " << arg2);
1446 std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
1449 return std::make_unique<FE>(degree);
1452 namespace Compositing
1454 template <
int dim,
int spacedim>
1457 const std::initializer_list<
1461 std::vector<const FiniteElement<dim, spacedim> *> fes;
1462 std::vector<unsigned int> multiplicities;
1465 [&fes, &multiplicities](
1466 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1467 unsigned int> &fe_system) {
1468 fes.push_back(fe_system.first.get());
1469 multiplicities.push_back(fe_system.second);
1472 for (
const auto &p : fe_systems)
1480 template <
int dim,
int spacedim>
1483 const std::initializer_list<
1487 std::vector<const FiniteElement<dim, spacedim> *> fes;
1488 std::vector<unsigned int> multiplicities;
1491 [&fes, &multiplicities](
1492 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1493 unsigned int> &fe_system) {
1494 fes.push_back(fe_system.first.get());
1495 multiplicities.push_back(fe_system.second);
1498 for (
const auto &p : fe_systems)
1506 template <
int dim,
int spacedim>
1507 std::vector<ComponentMask>
1509 const std::initializer_list<
1513 std::vector<const FiniteElement<dim, spacedim> *> fes;
1514 std::vector<unsigned int> multiplicities;
1517 [&fes, &multiplicities](
1518 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1519 unsigned int> &fe_system) {
1520 fes.push_back(fe_system.first.get());
1521 multiplicities.push_back(fe_system.second);
1524 for (
const auto &p : fe_systems)
#define DEAL_II_DEPRECATED
#define DEAL_II_NAMESPACE_OPEN
#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)
@ matrix
Contents is actually a matrix.
constexpr ReturnType< rank, T >::value_type & extract(T &t, const ArrayType &indices)