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,
606 template <
int dim,
int spacedim,
typename number>
611 std::vector<number> &dof_values);
652 template <
int dim,
int spacedim,
class InVector,
class OutVector>
678 template <
int dim,
int spacedim,
class InVector,
class OutVector>
700 template <
int dim,
class InVector,
class OutVector,
int spacedim>
705 OutVector &u1_interpolated);
719 template <
int dim,
class InVector,
class OutVector,
int spacedim>
727 OutVector &u1_interpolated);
738 template <
int dim,
class InVector,
class OutVector,
int spacedim>
743 OutVector &z1_difference);
757 template <
int dim,
class InVector,
class OutVector,
int spacedim>
765 OutVector &z1_difference);
777 template <
int dim,
class InVector,
class OutVector,
int spacedim>
844 template <
int dim,
class InVector,
class OutVector,
int spacedim>
863 template <
int dim,
class InVector,
class OutVector,
int spacedim>
888 std::vector<unsigned int>
898 std::vector<unsigned int>
976 namespace Compositing
994 template <
int dim,
int spacedim>
998 const std::vector<unsigned int> &multiplicities,
999 const bool do_tensor_product =
true);
1006 template <
int dim,
int spacedim>
1009 const std::initializer_list<
1016 template <
int dim,
int spacedim>
1019 const unsigned int N1,
1021 const unsigned int N2 = 0,
1023 const unsigned int N3 = 0,
1025 const unsigned int N4 = 0,
1027 const unsigned int N5 = 0);
1041 template <
int dim,
int spacedim>
1045 const std::vector<unsigned int> &multiplicities);
1052 template <
int dim,
int spacedim>
1055 const std::initializer_list<
1073 template <
int dim,
int spacedim>
1077 const unsigned int N1,
1079 const unsigned int N2 = 0,
1081 const unsigned int N3 = 0,
1083 const unsigned int N4 = 0,
1085 const unsigned int N5 = 0);
1104 template <
int dim,
int spacedim>
1105 std::vector<ComponentMask>
1108 const std::vector<unsigned int> &multiplicities,
1109 const bool do_tensor_product =
true);
1116 template <
int dim,
int spacedim>
1117 std::vector<ComponentMask>
1119 const std::initializer_list<
1141 template <
int dim,
int spacedim>
1142 std::vector<ComponentMask>
1145 const unsigned int N1,
1147 const unsigned int N2 = 0,
1149 const unsigned int N3 = 0,
1151 const unsigned int N4 = 0,
1153 const unsigned int N5 = 0,
1154 const bool do_tensor_product =
true);
1172 template <
int dim,
int spacedim>
1175 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1176 unsigned int>> &system_to_base_table,
1177 std::vector<std::pair<unsigned int, unsigned int>>
1178 &system_to_component_table,
1179 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1180 unsigned int>> &component_to_base_table,
1182 const bool do_tensor_product =
true);
1199 template <
int dim,
int spacedim>
1202 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1203 unsigned int>> &face_system_to_base_table,
1204 std::vector<std::pair<unsigned int, unsigned int>>
1205 &face_system_to_component_table,
1207 const bool do_tensor_product =
true,
1208 const unsigned int face_no = 0 );
1246 template <
int dim,
int spacedim = dim>
1247 std::unique_ptr<FiniteElement<dim, spacedim>>
1292 template <
int dim,
int spacedim>
1308 <<
"Can't re-generate a finite element from the string '"
1325 <<
"The dimension " << arg1
1326 <<
" in the finite element string must match "
1327 <<
"the space dimension " << arg2 <<
'.');
1357 "You are using continuous elements on a grid with "
1358 "hanging nodes but without providing hanging node "
1359 "constraints. Use the respective function with "
1360 "additional AffineConstraints argument(s), instead.");
1377 <<
"This is a " << arg1 <<
'x' << arg2 <<
" matrix, "
1378 <<
"but should be a " << arg3 <<
'x' << arg4 <<
" matrix.");
1387 <<
"Least squares fit leaves a gap of " << arg1);
1397 << arg1 <<
" must be greater than " << arg2);
1406 std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
1409 return std::make_unique<FE>(degree);
1412 namespace Compositing
1414 template <
int dim,
int spacedim>
1417 const std::initializer_list<
1421 std::vector<const FiniteElement<dim, spacedim> *> fes;
1422 std::vector<unsigned int> multiplicities;
1425 [&fes, &multiplicities](
1426 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1427 unsigned int> &fe_system) {
1428 fes.push_back(fe_system.first.get());
1429 multiplicities.push_back(fe_system.second);
1432 for (
const auto &p : fe_systems)
1440 template <
int dim,
int spacedim>
1443 const std::initializer_list<
1447 std::vector<const FiniteElement<dim, spacedim> *> fes;
1448 std::vector<unsigned int> multiplicities;
1451 [&fes, &multiplicities](
1452 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1453 unsigned int> &fe_system) {
1454 fes.push_back(fe_system.first.get());
1455 multiplicities.push_back(fe_system.second);
1458 for (
const auto &p : fe_systems)
1466 template <
int dim,
int spacedim>
1467 std::vector<ComponentMask>
1469 const std::initializer_list<
1473 std::vector<const FiniteElement<dim, spacedim> *> fes;
1474 std::vector<unsigned int> multiplicities;
1477 [&fes, &multiplicities](
1478 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1479 unsigned int> &fe_system) {
1480 fes.push_back(fe_system.first.get());
1481 multiplicities.push_back(fe_system.second);
1484 for (
const auto &p : fe_systems)
#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)