16 #ifndef dealii_fe_tools_H
17 #define dealii_fe_tools_H
44 template <
typename number>
48 template <
int dim,
int spacedim>
50 template <
int dim,
int spacedim>
54 template <
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>
387 const unsigned int face_coarse,
388 const unsigned int face_fine,
389 const double threshold = 1.e-12);
422 template <
int dim,
typename number,
int spacedim>
427 const bool isotropic_only =
false);
514 template <
int dim,
int spacedim>
529 template <
int dim,
int spacedim>
579 template <
int dim,
int spacedim>
586 const unsigned int face,
606 template <
int dim,
int spacedim,
typename number>
611 std::vector<number> & dof_values);
649 template <
int dim,
int spacedim,
class InVector,
class OutVector>
672 template <
int dim,
int spacedim,
class InVector,
class OutVector>
694 template <
int dim,
class InVector,
class OutVector,
int spacedim>
699 OutVector & u1_interpolated);
713 template <
int dim,
class InVector,
class OutVector,
int spacedim>
721 OutVector & u1_interpolated);
732 template <
int dim,
class InVector,
class OutVector,
int spacedim>
737 OutVector & z1_difference);
751 template <
int dim,
class InVector,
class OutVector,
int spacedim>
759 OutVector & z1_difference);
771 template <
int dim,
class InVector,
class OutVector,
int spacedim>
838 template <
int dim,
class InVector,
class OutVector,
int spacedim>
857 template <
int dim,
class InVector,
class OutVector,
int spacedim>
882 std::vector<unsigned int>
892 std::vector<unsigned int>
970 namespace Compositing
988 template <
int dim,
int spacedim>
992 const std::vector<unsigned int> & multiplicities,
993 const bool do_tensor_product =
true);
1000 template <
int dim,
int spacedim>
1003 const std::initializer_list<
1010 template <
int dim,
int spacedim>
1013 const unsigned int N1,
1015 const unsigned int N2 = 0,
1017 const unsigned int N3 = 0,
1019 const unsigned int N4 = 0,
1021 const unsigned int N5 = 0);
1035 template <
int dim,
int spacedim>
1039 const std::vector<unsigned int> & multiplicities);
1046 template <
int dim,
int spacedim>
1049 const std::initializer_list<
1067 template <
int dim,
int spacedim>
1071 const unsigned int N1,
1073 const unsigned int N2 = 0,
1075 const unsigned int N3 = 0,
1077 const unsigned int N4 = 0,
1079 const unsigned int N5 = 0);
1098 template <
int dim,
int spacedim>
1099 std::vector<ComponentMask>
1102 const std::vector<unsigned int> & multiplicities,
1103 const bool do_tensor_product =
true);
1110 template <
int dim,
int spacedim>
1111 std::vector<ComponentMask>
1113 const std::initializer_list<
1135 template <
int dim,
int spacedim>
1136 std::vector<ComponentMask>
1139 const unsigned int N1,
1141 const unsigned int N2 = 0,
1143 const unsigned int N3 = 0,
1145 const unsigned int N4 = 0,
1147 const unsigned int N5 = 0,
1148 const bool do_tensor_product =
true);
1166 template <
int dim,
int spacedim>
1169 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1170 unsigned int>> &system_to_base_table,
1171 std::vector<std::pair<unsigned int, unsigned int>>
1172 & system_to_component_table,
1173 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1174 unsigned int>> &component_to_base_table,
1176 const bool do_tensor_product =
true);
1193 template <
int dim,
int spacedim>
1196 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1197 unsigned int>> &face_system_to_base_table,
1198 std::vector<std::pair<unsigned int, unsigned int>>
1199 & face_system_to_component_table,
1201 const bool do_tensor_product =
true,
1202 const unsigned int face_no = 0 );
1240 template <
int dim,
int spacedim = dim>
1241 std::unique_ptr<FiniteElement<dim, spacedim>>
1286 template <
int dim,
int spacedim>
1302 <<
"Can't re-generate a finite element from the string '"
1319 <<
"The dimension " << arg1
1320 <<
" in the finite element string must match "
1321 <<
"the space dimension " << arg2 <<
'.');
1351 "You are using continuous elements on a grid with "
1352 "hanging nodes but without providing hanging node "
1353 "constraints. Use the respective function with "
1354 "additional AffineConstraints argument(s), instead.");
1371 <<
"This is a " << arg1 <<
'x' << arg2 <<
" matrix, "
1372 <<
"but should be a " << arg3 <<
'x' << arg4 <<
" matrix.");
1381 <<
"Least squares fit leaves a gap of " << arg1);
1391 << arg1 <<
" must be greater than " << arg2);
1400 std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
1403 return std::make_unique<FE>(degree);
1406 namespace Compositing
1408 template <
int dim,
int spacedim>
1411 const std::initializer_list<
1415 std::vector<const FiniteElement<dim, spacedim> *> fes;
1416 std::vector<unsigned int> multiplicities;
1419 [&fes, &multiplicities](
1420 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1421 unsigned int> &fe_system) {
1422 fes.push_back(fe_system.first.get());
1423 multiplicities.push_back(fe_system.second);
1426 for (
const auto &p : fe_systems)
1434 template <
int dim,
int spacedim>
1437 const std::initializer_list<
1441 std::vector<const FiniteElement<dim, spacedim> *> fes;
1442 std::vector<unsigned int> multiplicities;
1445 [&fes, &multiplicities](
1446 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1447 unsigned int> &fe_system) {
1448 fes.push_back(fe_system.first.get());
1449 multiplicities.push_back(fe_system.second);
1452 for (
const auto &p : fe_systems)
1460 template <
int dim,
int spacedim>
1461 std::vector<ComponentMask>
1463 const std::initializer_list<
1467 std::vector<const FiniteElement<dim, spacedim> *> fes;
1468 std::vector<unsigned int> multiplicities;
1471 [&fes, &multiplicities](
1472 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1473 unsigned int> &fe_system) {
1474 fes.push_back(fe_system.first.get());
1475 multiplicities.push_back(fe_system.second);
1478 for (
const auto &p : fe_systems)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcTriangulationMismatch()
static ::ExceptionBase & ExcNotGreaterThan(int arg1, int arg2)
static ::ExceptionBase & ExcGridNotRefinedAtLeastOnce()
#define DeclException0(Exception0)
static ::ExceptionBase & ExcInvalidFEDimension(char arg1, int arg2)
static ::ExceptionBase & ExcInvalidFE()
static ::ExceptionBase & ExcMatrixDimensionMismatch(int arg1, int arg2, int arg3, int arg4)
static ::ExceptionBase & ExcInvalidFEName(std::string arg1)
#define DeclException4(Exception4, type1, type2, type3, type4, outsequence)
static ::ExceptionBase & ExcLeastSquaresError(double arg1)
#define DeclException2(Exception2, type1, type2, outsequence)
static ::ExceptionBase & ExcHangingNodesNotAllowed()
#define DeclExceptionMsg(Exception, defaulttext)
static ::ExceptionBase & ExcFENotPrimitive()
#define DeclException1(Exception1, type1, outsequence)
@ matrix
Contents is actually a matrix.
constexpr ReturnType< rank, T >::value_type & extract(T &t, const ArrayType &indices)