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>
386 const unsigned int face_coarse,
387 const unsigned int face_fine,
388 const double threshold = 1.e-12);
421 template <
int dim,
typename number,
int spacedim>
426 const bool isotropic_only =
false);
513 template <
int dim,
int spacedim>
528 template <
int dim,
int spacedim>
578 template <
int dim,
int spacedim>
585 const unsigned int face,
620 template <
int dim,
int spacedim = dim>
639 template <
int dim,
int spacedim,
typename number>
644 std::vector<number> &dof_values);
685 template <
int dim,
int spacedim,
class InVector,
class OutVector>
711 template <
int dim,
int spacedim,
class InVector,
class OutVector>
733 template <
int dim,
class InVector,
class OutVector,
int spacedim>
738 OutVector &u1_interpolated);
752 template <
int dim,
class InVector,
class OutVector,
int spacedim>
760 OutVector &u1_interpolated);
771 template <
int dim,
class InVector,
class OutVector,
int spacedim>
776 OutVector &z1_difference);
790 template <
int dim,
class InVector,
class OutVector,
int spacedim>
798 OutVector &z1_difference);
810 template <
int dim,
class InVector,
class OutVector,
int spacedim>
873 template <
int dim,
class InVector,
class OutVector,
int spacedim>
892 template <
int dim,
class InVector,
class OutVector,
int spacedim>
917 std::vector<unsigned int>
927 std::vector<unsigned int>
952 std::pair<std::vector<unsigned int>, std::vector<unsigned int>>
954 const unsigned int &direction,
955 const bool &cell_hierarchical_numbering,
956 const bool &is_continuous);
1051 template <
int dim,
int spacedim>
1055 const std::vector<unsigned int> &multiplicities,
1056 const bool do_tensor_product =
true);
1063 template <
int dim,
int spacedim>
1066 const std::initializer_list<
1076 template <
int dim,
int spacedim>
1079 const unsigned int N1,
1081 const unsigned int N2 = 0,
1083 const unsigned int N3 = 0,
1085 const unsigned int N4 = 0,
1087 const unsigned int N5 = 0);
1101 template <
int dim,
int spacedim>
1105 const std::vector<unsigned int> &multiplicities);
1112 template <
int dim,
int spacedim>
1115 const std::initializer_list<
1136 template <
int dim,
int spacedim>
1140 const unsigned int N1,
1142 const unsigned int N2 = 0,
1144 const unsigned int N3 = 0,
1146 const unsigned int N4 = 0,
1148 const unsigned int N5 = 0);
1167 template <
int dim,
int spacedim>
1168 std::vector<ComponentMask>
1171 const std::vector<unsigned int> &multiplicities,
1172 const bool do_tensor_product =
true);
1179 template <
int dim,
int spacedim>
1180 std::vector<ComponentMask>
1182 const std::initializer_list<
1207 template <
int dim,
int spacedim>
1211 const unsigned int N1,
1213 const unsigned int N2 = 0,
1215 const unsigned int N3 = 0,
1217 const unsigned int N4 = 0,
1219 const unsigned int N5 = 0,
1220 const bool do_tensor_product =
true);
1238 template <
int dim,
int spacedim>
1241 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1242 unsigned int>> &system_to_base_table,
1243 std::vector<std::pair<unsigned int, unsigned int>>
1244 &system_to_component_table,
1245 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1246 unsigned int>> &component_to_base_table,
1248 const bool do_tensor_product =
true);
1265 template <
int dim,
int spacedim>
1268 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1269 unsigned int>> &face_system_to_base_table,
1270 std::vector<std::pair<unsigned int, unsigned int>>
1271 &face_system_to_component_table,
1273 const bool do_tensor_product =
true,
1274 const unsigned int face_no = 0 );
1312 template <
int dim,
int spacedim = dim>
1313 std::unique_ptr<FiniteElement<dim, spacedim>>
1358 template <
int dim,
int spacedim>
1374 <<
"Can't re-generate a finite element from the string '"
1391 <<
"The dimension " << arg1
1392 <<
" in the finite element string must match "
1393 <<
"the space dimension " << arg2 <<
'.');
1423 "You are using continuous elements on a grid with "
1424 "hanging nodes but without providing hanging node "
1425 "constraints. Use the respective function with "
1426 "additional AffineConstraints argument(s), instead.");
1443 <<
"This is a " << arg1 <<
'x' << arg2 <<
" matrix, "
1444 <<
"but should be a " << arg3 <<
'x' << arg4 <<
" matrix.");
1453 <<
"Least squares fit leaves a gap of " << arg1);
1463 << arg1 <<
" must be greater than " << arg2);
1472 std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
1475 return std::make_unique<FE>(degree);
1480 template <
int dim,
int spacedim>
1483 const std::initializer_list<
1484 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
unsigned int>>
1487 std::vector<const FiniteElement<dim, spacedim> *> fes;
1488 std::vector<unsigned int> multiplicities;
1491 [&fes, &multiplicities](
1492 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1493 unsigned int> &fe_system) {
1494 fes.push_back(fe_system.first.get());
1495 multiplicities.push_back(fe_system.second);
1498 for (
const auto &p : fe_systems)
1506 template <
int dim,
int spacedim>
1507 FiniteElementData<dim>
1509 const std::initializer_list<
1510 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
unsigned int>>
1513 std::vector<const FiniteElement<dim, spacedim> *> fes;
1514 std::vector<unsigned int> multiplicities;
1517 [&fes, &multiplicities](
1518 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1519 unsigned int> &fe_system) {
1520 fes.push_back(fe_system.first.get());
1521 multiplicities.push_back(fe_system.second);
1524 for (
const auto &p : fe_systems)
1532 template <
int dim,
int spacedim>
1533 std::vector<ComponentMask>
1535 const std::initializer_list<
1536 std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
unsigned int>>
1539 std::vector<const FiniteElement<dim, spacedim> *> fes;
1540 std::vector<unsigned int> multiplicities;
1543 [&fes, &multiplicities](
1544 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1545 unsigned int> &fe_system) {
1546 fes.push_back(fe_system.first.get());
1547 multiplicities.push_back(fe_system.second);
1550 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)