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>
890 std::vector<unsigned int>
968 namespace Compositing
986 template <
int dim,
int spacedim>
990 const std::vector<unsigned int> & multiplicities,
991 const bool do_tensor_product =
true);
998 template <
int dim,
int spacedim>
1001 const std::initializer_list<
1008 template <
int dim,
int spacedim>
1011 const unsigned int N1,
1013 const unsigned int N2 = 0,
1015 const unsigned int N3 = 0,
1017 const unsigned int N4 = 0,
1019 const unsigned int N5 = 0);
1033 template <
int dim,
int spacedim>
1037 const std::vector<unsigned int> & multiplicities);
1044 template <
int dim,
int spacedim>
1047 const std::initializer_list<
1065 template <
int dim,
int spacedim>
1069 const unsigned int N1,
1071 const unsigned int N2 = 0,
1073 const unsigned int N3 = 0,
1075 const unsigned int N4 = 0,
1077 const unsigned int N5 = 0);
1096 template <
int dim,
int spacedim>
1097 std::vector<ComponentMask>
1100 const std::vector<unsigned int> & multiplicities,
1101 const bool do_tensor_product =
true);
1108 template <
int dim,
int spacedim>
1109 std::vector<ComponentMask>
1111 const std::initializer_list<
1133 template <
int dim,
int spacedim>
1134 std::vector<ComponentMask>
1137 const unsigned int N1,
1139 const unsigned int N2 = 0,
1141 const unsigned int N3 = 0,
1143 const unsigned int N4 = 0,
1145 const unsigned int N5 = 0,
1146 const bool do_tensor_product =
true);
1164 template <
int dim,
int spacedim>
1167 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1168 unsigned int>> &system_to_base_table,
1169 std::vector<std::pair<unsigned int, unsigned int>>
1170 & system_to_component_table,
1171 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1172 unsigned int>> &component_to_base_table,
1174 const bool do_tensor_product =
true);
1191 template <
int dim,
int spacedim>
1194 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1195 unsigned int>> &face_system_to_base_table,
1196 std::vector<std::pair<unsigned int, unsigned int>>
1197 & face_system_to_component_table,
1199 const bool do_tensor_product =
true,
1200 const unsigned int face_no = 0 );
1238 template <
int dim,
int spacedim = dim>
1239 std::unique_ptr<FiniteElement<dim, spacedim>>
1284 template <
int dim,
int spacedim>
1300 <<
"Can't re-generate a finite element from the string '"
1317 <<
"The dimension " << arg1
1318 <<
" in the finite element string must match "
1319 <<
"the space dimension " << arg2 <<
'.');
1349 "You are using continuous elements on a grid with "
1350 "hanging nodes but without providing hanging node "
1351 "constraints. Use the respective function with "
1352 "additional AffineConstraints argument(s), instead.");
1369 <<
"This is a " << arg1 <<
'x' << arg2 <<
" matrix, "
1370 <<
"but should be a " << arg3 <<
'x' << arg4 <<
" matrix.");
1379 <<
"Least squares fit leaves a gap of " << arg1);
1389 << arg1 <<
" must be greater than " << arg2);
1398 std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
1401 return std::make_unique<FE>(degree);
1404 namespace Compositing
1406 template <
int dim,
int spacedim>
1409 const std::initializer_list<
1413 std::vector<const FiniteElement<dim, spacedim> *> fes;
1414 std::vector<unsigned int> multiplicities;
1417 [&fes, &multiplicities](
1418 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1419 unsigned int> &fe_system) {
1420 fes.push_back(fe_system.first.get());
1421 multiplicities.push_back(fe_system.second);
1424 for (
const auto &p : fe_systems)
1432 template <
int dim,
int spacedim>
1435 const std::initializer_list<
1439 std::vector<const FiniteElement<dim, spacedim> *> fes;
1440 std::vector<unsigned int> multiplicities;
1443 [&fes, &multiplicities](
1444 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1445 unsigned int> &fe_system) {
1446 fes.push_back(fe_system.first.get());
1447 multiplicities.push_back(fe_system.second);
1450 for (
const auto &p : fe_systems)
1458 template <
int dim,
int spacedim>
1459 std::vector<ComponentMask>
1461 const std::initializer_list<
1465 std::vector<const FiniteElement<dim, spacedim> *> fes;
1466 std::vector<unsigned int> multiplicities;
1469 [&fes, &multiplicities](
1470 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1471 unsigned int> &fe_system) {
1472 fes.push_back(fe_system.first.get());
1473 multiplicities.push_back(fe_system.second);
1476 for (
const auto &p : fe_systems)
#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)
typename ActiveSelector::active_cell_iterator active_cell_iterator
constexpr ReturnType< rank, T >::value_type & extract(T &t, const ArrayType &indices)