16 #ifndef dealii_fe_tools_H 17 #define dealii_fe_tools_H 21 #include <deal.II/base/config.h> 23 #include <deal.II/base/exceptions.h> 24 #include <deal.II/base/geometry_info.h> 25 #include <deal.II/base/std_cxx14/memory.h> 26 #include <deal.II/base/subscriptor.h> 28 #include <deal.II/base/tensor.h> 30 #include <deal.II/distributed/tria.h> 32 #include <deal.II/fe/component_mask.h> 34 #include <deal.II/lac/la_parallel_vector.h> 40 DEAL_II_NAMESPACE_OPEN
42 template <
typename number>
46 template <
int dim,
int spacedim>
48 template <
int dim,
int spacedim>
52 template <
typename number>
88 template <
int dim,
int spacedim = dim>
95 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
96 get(
const unsigned int degree)
const = 0;
103 virtual std::unique_ptr<FiniteElement<dim, spacedim>>
130 virtual std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
131 get(
const unsigned int degree)
const override;
137 virtual std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
156 template <
int dim,
int spacedim>
159 std::vector<unsigned int> & renumbering,
160 std::vector<std::vector<unsigned int>> &start_indices);
177 template <
int dim,
int spacedim>
180 std::vector<types::global_dof_index> &renumbering,
181 std::vector<types::global_dof_index> &block_data,
182 bool return_start_indices =
true);
197 template <
int dim,
typename number,
int spacedim>
214 template <
int dim,
typename number,
int spacedim>
231 template <
int dim,
typename number,
int spacedim>
240 template <
int dim,
typename number,
int spacedim>
314 template <
int dim,
int spacedim>
356 template <
int dim,
typename number,
int spacedim>
361 const bool isotropic_only =
false,
362 const double threshold = 1.e-12);
385 template <
int dim,
typename number,
int spacedim>
390 const unsigned int face_coarse,
391 const unsigned int face_fine,
392 const double threshold = 1.e-12);
425 template <
int dim,
typename number,
int spacedim>
430 const bool isotropic_only =
false);
517 template <
int dim,
int spacedim>
532 template <
int dim,
int spacedim>
582 template <
int dim,
int spacedim>
589 const unsigned int face,
609 template <
int dim,
int spacedim,
typename number>
614 std::vector<number> & dof_values);
654 template <
int,
int>
class DoFHandlerType1,
655 template <
int,
int>
class DoFHandlerType2,
659 interpolate(
const DoFHandlerType1<dim, spacedim> &dof1,
661 const DoFHandlerType2<dim, spacedim> &dof2,
682 template <
int,
int>
class DoFHandlerType1,
683 template <
int,
int>
class DoFHandlerType2,
688 const DoFHandlerType1<dim, spacedim> & dof1,
690 const DoFHandlerType2<dim, spacedim> & dof2,
710 template <
int,
int>
class DoFHandlerType,
718 OutVector & u1_interpolated);
732 template <
int dim,
class InVector,
class OutVector,
int spacedim>
740 OutVector & u1_interpolated);
751 template <
int dim,
class InVector,
class OutVector,
int spacedim>
756 OutVector & z1_difference);
770 template <
int dim,
class InVector,
class OutVector,
int spacedim>
778 OutVector & z1_difference);
790 template <
int dim,
class InVector,
class OutVector,
int spacedim>
857 template <
int dim,
class InVector,
class OutVector,
int spacedim>
876 template <
int dim,
class InVector,
class OutVector,
int spacedim>
914 std::vector<unsigned int> &h2l);
919 std::vector<unsigned int> & h2l);
926 std::vector<unsigned int>
937 std::vector<unsigned int> & l2h);
944 std::vector<unsigned int>
1021 namespace Compositing
1039 template <
int dim,
int spacedim>
1043 const std::vector<unsigned int> & multiplicities,
1044 const bool do_tensor_product =
true);
1051 template <
int dim,
int spacedim>
1054 const std::initializer_list<
1061 template <
int dim,
int spacedim>
1064 const unsigned int N1,
1066 const unsigned int N2 = 0,
1068 const unsigned int N3 = 0,
1070 const unsigned int N4 = 0,
1072 const unsigned int N5 = 0);
1086 template <
int dim,
int spacedim>
1090 const std::vector<unsigned int> & multiplicities);
1097 template <
int dim,
int spacedim>
1100 const std::initializer_list<
1118 template <
int dim,
int spacedim>
1122 const unsigned int N1,
1124 const unsigned int N2 = 0,
1126 const unsigned int N3 = 0,
1128 const unsigned int N4 = 0,
1130 const unsigned int N5 = 0);
1149 template <
int dim,
int spacedim>
1150 std::vector<ComponentMask>
1153 const std::vector<unsigned int> & multiplicities,
1154 const bool do_tensor_product =
true);
1161 template <
int dim,
int spacedim>
1162 std::vector<ComponentMask>
1164 const std::initializer_list<
1186 template <
int dim,
int spacedim>
1187 std::vector<ComponentMask>
1190 const unsigned int N1,
1192 const unsigned int N2 = 0,
1194 const unsigned int N3 = 0,
1196 const unsigned int N4 = 0,
1198 const unsigned int N5 = 0,
1199 const bool do_tensor_product =
true);
1217 template <
int dim,
int spacedim>
1220 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1221 unsigned int>> &system_to_base_table,
1222 std::vector<std::pair<unsigned int, unsigned int>>
1223 & system_to_component_table,
1224 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1225 unsigned int>> &component_to_base_table,
1227 const bool do_tensor_product =
true);
1244 template <
int dim,
int spacedim>
1247 std::vector<std::pair<std::pair<unsigned int, unsigned int>,
1248 unsigned int>> &face_system_to_base_table,
1249 std::vector<std::pair<unsigned int, unsigned int>>
1250 & face_system_to_component_table,
1252 const bool do_tensor_product =
true);
1290 template <
int dim,
int spacedim = dim>
1291 std::unique_ptr<FiniteElement<dim, spacedim>>
1345 template <
int dim,
int spacedim>
1361 <<
"Can't re-generate a finite element from the string '" 1378 <<
"The dimension " << arg1
1379 <<
" in the finite element string must match " 1380 <<
"the space dimension " << arg2 <<
".");
1410 "You are using continuous elements on a grid with " 1411 "hanging nodes but without providing hanging node " 1412 "constraints. Use the respective function with " 1413 "additional AffineConstraints argument(s), instead.");
1430 <<
"This is a " << arg1 <<
"x" << arg2 <<
" matrix, " 1431 <<
"but should be a " << arg3 <<
"x" << arg4 <<
" matrix.");
1440 <<
"Least squares fit leaves a gap of " << arg1);
1450 << arg1 <<
" must be greater than " << arg2);
1459 std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
1462 return std_cxx14::make_unique<FE>(degree);
1465 namespace Compositing
1467 template <
int dim,
int spacedim>
1470 const std::initializer_list<
1474 std::vector<const FiniteElement<dim, spacedim> *> fes;
1475 std::vector<unsigned int> multiplicities;
1478 [&fes, &multiplicities](
1479 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1480 unsigned int> &fe_system) {
1481 fes.push_back(fe_system.first.get());
1482 multiplicities.push_back(fe_system.second);
1485 for (
const auto &p : fe_systems)
1493 template <
int dim,
int spacedim>
1496 const std::initializer_list<
1500 std::vector<const FiniteElement<dim, spacedim> *> fes;
1501 std::vector<unsigned int> multiplicities;
1504 [&fes, &multiplicities](
1505 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1506 unsigned int> &fe_system) {
1507 fes.push_back(fe_system.first.get());
1508 multiplicities.push_back(fe_system.second);
1511 for (
const auto &p : fe_systems)
1519 template <
int dim,
int spacedim>
1520 std::vector<ComponentMask>
1522 const std::initializer_list<
1526 std::vector<const FiniteElement<dim, spacedim> *> fes;
1527 std::vector<unsigned int> multiplicities;
1530 [&fes, &multiplicities](
1531 const std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
1532 unsigned int> &fe_system) {
1533 fes.push_back(fe_system.first.get());
1534 multiplicities.push_back(fe_system.second);
1537 for (
const auto &p : fe_systems)
1549 DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcLeastSquaresError(double arg1)
#define DeclException2(Exception2, type1, type2, outsequence)
static ::ExceptionBase & ExcGridNotRefinedAtLeastOnce()
static ::ExceptionBase & ExcFENotPrimitive()
static ::ExceptionBase & ExcMatrixDimensionMismatch(int arg1, int arg2, int arg3, int arg4)
static ::ExceptionBase & ExcHangingNodesNotAllowed()
#define DeclException1(Exception1, type1, outsequence)
static ::ExceptionBase & ExcNotGreaterThan(int arg1, int arg2)
#define DeclExceptionMsg(Exception, defaulttext)
#define DeclException0(Exception0)
ReturnType< rank, T >::value_type & extract(T &t, const ArrayType &indices)
static ::ExceptionBase & ExcInvalidFEDimension(char arg1, int arg2)
static ::ExceptionBase & ExcInvalidFE()
#define DeclException4(Exception4, type1, type2, type3, type4, outsequence)
static ::ExceptionBase & ExcInvalidFEName(std::string arg1)
typename ActiveSelector::active_cell_iterator active_cell_iterator
static ::ExceptionBase & ExcTriangulationMismatch()