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>
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,
621 template <
int dim,
int spacedim = dim>
640 template <
int dim,
int spacedim,
typename number>
645 std::vector<number> &dof_values);
686 template <
int dim,
int spacedim,
class InVector,
class OutVector>
712 template <
int dim,
int spacedim,
class InVector,
class OutVector>
734 template <
int dim,
class InVector,
class OutVector,
int spacedim>
739 OutVector &u1_interpolated);
753 template <
int dim,
class InVector,
class OutVector,
int spacedim>
761 OutVector &u1_interpolated);
772 template <
int dim,
class InVector,
class OutVector,
int spacedim>
777 OutVector &z1_difference);
791 template <
int dim,
class InVector,
class OutVector,
int spacedim>
799 OutVector &z1_difference);
811 template <
int dim,
class InVector,
class OutVector,
int spacedim>
878 template <
int dim,
class InVector,
class OutVector,
int spacedim>
897 template <
int dim,
class InVector,
class OutVector,
int spacedim>
922 std::vector<unsigned int>
932 std::vector<unsigned int>
1010 namespace Compositing
1028 template <
int dim,
int spacedim>
1032 const std::vector<unsigned int> &multiplicities,
1033 const bool do_tensor_product =
true);
1040 template <
int dim,
int spacedim>
1043 const std::initializer_list<
1053 template <
int dim,
int spacedim>
1056 const unsigned int N1,
1058 const unsigned int N2 = 0,
1060 const unsigned int N3 = 0,
1062 const unsigned int N4 = 0,
1064 const unsigned int N5 = 0);
1078 template <
int dim,
int spacedim>
1082 const std::vector<unsigned int> &multiplicities);
1089 template <
int dim,
int spacedim>
1092 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<
1184 template <
int dim,
int spacedim>
1188 const unsigned int N1,
1190 const unsigned int N2 = 0,
1192 const unsigned int N3 = 0,
1194 const unsigned int N4 = 0,
1196 const unsigned int N5 = 0,
1197 const bool do_tensor_product =
true);
1215 template <
int dim,
int spacedim>
1218 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1219 unsigned int>> &system_to_base_table,
1220 std::vector<std::pair<unsigned int, unsigned int>>
1221 &system_to_component_table,
1222 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1223 unsigned int>> &component_to_base_table,
1225 const bool do_tensor_product =
true);
1242 template <
int dim,
int spacedim>
1245 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1246 unsigned int>> &face_system_to_base_table,
1247 std::vector<std::pair<unsigned int, unsigned int>>
1248 &face_system_to_component_table,
1250 const bool do_tensor_product =
true,
1251 const unsigned int face_no = 0 );
1289 template <
int dim,
int spacedim = dim>
1290 std::unique_ptr<FiniteElement<dim, spacedim>>
1335 template <
int dim,
int spacedim>
1351 <<
"Can't re-generate a finite element from the string '"
1368 <<
"The dimension " << arg1
1369 <<
" in the finite element string must match "
1370 <<
"the space dimension " << arg2 <<
'.');
1400 "You are using continuous elements on a grid with "
1401 "hanging nodes but without providing hanging node "
1402 "constraints. Use the respective function with "
1403 "additional AffineConstraints argument(s), instead.");
1420 <<
"This is a " << arg1 <<
'x' << arg2 <<
" matrix, "
1421 <<
"but should be a " << arg3 <<
'x' << arg4 <<
" matrix.");
1430 <<
"Least squares fit leaves a gap of " << arg1);
1440 << arg1 <<
" must be greater than " << arg2);
1449 std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
1452 return std::make_unique<FE>(degree);
1455 namespace Compositing
1457 template <
int dim,
int spacedim>
1460 const std::initializer_list<
1464 std::vector<const FiniteElement<dim, spacedim> *> fes;
1465 std::vector<unsigned int> multiplicities;
1468 [&fes, &multiplicities](
1469 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1470 unsigned int> &fe_system) {
1471 fes.push_back(fe_system.first.get());
1472 multiplicities.push_back(fe_system.second);
1475 for (
const auto &p : fe_systems)
1483 template <
int dim,
int spacedim>
1486 const std::initializer_list<
1490 std::vector<const FiniteElement<dim, spacedim> *> fes;
1491 std::vector<unsigned int> multiplicities;
1494 [&fes, &multiplicities](
1495 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1496 unsigned int> &fe_system) {
1497 fes.push_back(fe_system.first.get());
1498 multiplicities.push_back(fe_system.second);
1501 for (
const auto &p : fe_systems)
1509 template <
int dim,
int spacedim>
1510 std::vector<ComponentMask>
1512 const std::initializer_list<
1516 std::vector<const FiniteElement<dim, spacedim> *> fes;
1517 std::vector<unsigned int> multiplicities;
1520 [&fes, &multiplicities](
1521 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1522 unsigned int> &fe_system) {
1523 fes.push_back(fe_system.first.get());
1524 multiplicities.push_back(fe_system.second);
1527 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)