13#ifndef dealii_fe_tools_h
14#define dealii_fe_tools_h
41template <
typename number>
45template <
int dim,
int spacedim>
47template <
int dim,
int spacedim>
52template <
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>
384 const unsigned int face_coarse,
385 const unsigned int face_fine,
386 const double threshold = 1.e-12);
419 template <
int dim,
typename number,
int spacedim>
424 const bool isotropic_only =
false);
511 template <
int dim,
int spacedim>
526 template <
int dim,
int spacedim>
576 template <
int dim,
int spacedim>
583 const unsigned int face,
618 template <
int dim,
int spacedim = dim>
637 template <
int dim,
int spacedim,
typename number>
642 std::vector<number> &dof_values);
683 template <
int dim,
int spacedim,
class InVector,
class OutVector>
709 template <
int dim,
int spacedim,
class InVector,
class OutVector>
731 template <
int dim,
class InVector,
class OutVector,
int spacedim>
736 OutVector &u1_interpolated);
750 template <
int dim,
class InVector,
class OutVector,
int spacedim>
758 OutVector &u1_interpolated);
769 template <
int dim,
class InVector,
class OutVector,
int spacedim>
774 OutVector &z1_difference);
788 template <
int dim,
class InVector,
class OutVector,
int spacedim>
796 OutVector &z1_difference);
808 template <
int dim,
class InVector,
class OutVector,
int spacedim>
871 template <
int dim,
class InVector,
class OutVector,
int spacedim>
890 template <
int dim,
class InVector,
class OutVector,
int spacedim>
915 std::vector<unsigned int>
925 std::vector<unsigned int>
950 std::pair<std::vector<unsigned int>, std::vector<unsigned int>>
952 const unsigned int &direction,
953 const bool &cell_hierarchical_numbering,
954 const bool &is_continuous);
964 "Use FETools::cell_to_face_patch_numbering() instead.")
966 std::vector<
unsigned int>,
968 const
unsigned int &direction,
970 cell_hierarchical_numbering,
971 const
bool &is_continuous);
984 template <
int dim,
int spacedim>
987 const
unsigned int face_dof_index,
988 const
unsigned int face_no,
989 const
types::geometric_orientation combined_orientation);
1066 namespace Compositing
1084 template <
int dim,
int spacedim>
1088 const std::vector<unsigned int> &multiplicities,
1089 const bool do_tensor_product =
true);
1096 template <
int dim,
int spacedim>
1099 const std::initializer_list<
1109 template <
int dim,
int spacedim>
1112 const unsigned int N1,
1114 const unsigned int N2 = 0,
1116 const unsigned int N3 = 0,
1118 const unsigned int N4 = 0,
1120 const unsigned int N5 = 0);
1134 template <
int dim,
int spacedim>
1138 const std::vector<unsigned int> &multiplicities);
1145 template <
int dim,
int spacedim>
1148 const std::initializer_list<
1169 template <
int dim,
int spacedim>
1173 const unsigned int N1,
1175 const unsigned int N2 = 0,
1177 const unsigned int N3 = 0,
1179 const unsigned int N4 = 0,
1181 const unsigned int N5 = 0);
1200 template <
int dim,
int spacedim>
1201 std::vector<ComponentMask>
1204 const std::vector<unsigned int> &multiplicities,
1205 const bool do_tensor_product =
true);
1212 template <
int dim,
int spacedim>
1213 std::vector<ComponentMask>
1215 const std::initializer_list<
1240 template <
int dim,
int spacedim>
1244 const unsigned int N1,
1246 const unsigned int N2 = 0,
1248 const unsigned int N3 = 0,
1250 const unsigned int N4 = 0,
1252 const unsigned int N5 = 0,
1253 const bool do_tensor_product =
true);
1271 template <
int dim,
int spacedim>
1274 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1275 unsigned int>> &system_to_base_table,
1276 std::vector<std::pair<unsigned int, unsigned int>>
1277 &system_to_component_table,
1278 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1279 unsigned int>> &component_to_base_table,
1281 const bool do_tensor_product =
true);
1298 template <
int dim,
int spacedim>
1301 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1302 unsigned int>> &face_system_to_base_table,
1303 std::vector<std::pair<unsigned int, unsigned int>>
1304 &face_system_to_component_table,
1306 const bool do_tensor_product =
true,
1307 const unsigned int face_no = 0 );
1345 template <
int dim,
int spacedim = dim>
1346 std::unique_ptr<FiniteElement<dim, spacedim>>
1391 template <
int dim,
int spacedim>
1407 <<
"Can't re-generate a finite element from the string '"
1424 <<
"The dimension " << arg1
1425 <<
" in the finite element string must match "
1426 <<
"the space dimension " << arg2 <<
'.');
1456 "You are using continuous elements on a grid with "
1457 "hanging nodes but without providing hanging node "
1458 "constraints. Use the respective function with "
1459 "additional AffineConstraints argument(s), instead.");
1476 <<
"This is a " << arg1 <<
'x' << arg2 <<
" matrix, "
1477 <<
"but should be a " << arg3 <<
'x' << arg4 <<
" matrix.");
1486 <<
"Least squares fit leaves a gap of " << arg1);
1496 << arg1 <<
" must be greater than " << arg2);
1505 std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
1508 return std::make_unique<FE>(degree);
1511 namespace Compositing
1513 template <
int dim,
int spacedim>
1516 const std::initializer_list<
1520 std::vector<const FiniteElement<dim, spacedim> *> fes;
1521 std::vector<unsigned int> multiplicities;
1524 [&fes, &multiplicities](
1525 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1526 unsigned int> &fe_system) {
1527 fes.push_back(fe_system.first.get());
1528 multiplicities.push_back(fe_system.second);
1531 for (
const auto &p : fe_systems)
1539 template <
int dim,
int spacedim>
1542 const std::initializer_list<
1546 std::vector<const FiniteElement<dim, spacedim> *> fes;
1547 std::vector<unsigned int> multiplicities;
1550 [&fes, &multiplicities](
1551 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1552 unsigned int> &fe_system) {
1553 fes.push_back(fe_system.first.get());
1554 multiplicities.push_back(fe_system.second);
1557 for (
const auto &p : fe_systems)
1565 template <
int dim,
int spacedim>
1566 std::vector<ComponentMask>
1568 const std::initializer_list<
1572 std::vector<const FiniteElement<dim, spacedim> *> fes;
1573 std::vector<unsigned int> multiplicities;
1576 [&fes, &multiplicities](
1577 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1578 unsigned int> &fe_system) {
1579 fes.push_back(fe_system.first.get());
1580 multiplicities.push_back(fe_system.second);
1583 for (
const auto &p : fe_systems)
#define DEAL_II_DEPRECATED
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_DEPRECATED_WITH_COMMENT(comment)
#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)