Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
fe_tools.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2000 - 2019 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_fe_tools_H
17 #define dealii_fe_tools_H
18 
19 
20 
21 #include <deal.II/base/config.h>
22 
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>
29 
30 #include <deal.II/distributed/tria.h>
31 
32 #include <deal.II/fe/component_mask.h>
33 
34 #include <deal.II/lac/la_parallel_vector.h>
35 
36 #include <string>
37 #include <vector>
38 
39 
40 DEAL_II_NAMESPACE_OPEN
41 
42 template <typename number>
43 class FullMatrix;
44 template <int dim>
45 class Quadrature;
46 template <int dim, int spacedim>
47 class FiniteElement;
48 template <int dim, int spacedim>
49 class DoFHandler;
50 template <int dim>
51 class FiniteElementData;
52 template <typename number>
53 class AffineConstraints;
54 
55 
56 
59 
60 
76 namespace FETools
77 {
88  template <int dim, int spacedim = dim>
89  class FEFactoryBase : public Subscriptor
90  {
91  public:
95  virtual std::unique_ptr<FiniteElement<dim, spacedim>>
96  get(const unsigned int degree) const = 0;
97 
103  virtual std::unique_ptr<FiniteElement<dim, spacedim>>
104  get(const Quadrature<1> &quad) const = 0;
105 
109  virtual ~FEFactoryBase() override = default;
110  };
111 
123  template <class FE>
124  class FEFactory : public FEFactoryBase<FE::dimension, FE::space_dimension>
125  {
126  public:
130  virtual std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
131  get(const unsigned int degree) const override;
132 
137  virtual std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
138  get(const Quadrature<1> &quad) const override;
139  };
140 
156  template <int dim, int spacedim>
157  void
159  std::vector<unsigned int> & renumbering,
160  std::vector<std::vector<unsigned int>> &start_indices);
161 
177  template <int dim, int spacedim>
178  void
180  std::vector<types::global_dof_index> &renumbering,
181  std::vector<types::global_dof_index> &block_data,
182  bool return_start_indices = true);
183 
197  template <int dim, typename number, int spacedim>
198  void
200  const FiniteElement<dim, spacedim> &fe2,
201  FullMatrix<number> &interpolation_matrix);
202 
214  template <int dim, typename number, int spacedim>
215  void
217  const FiniteElement<dim, spacedim> &fe2,
218  FullMatrix<number> &interpolation_matrix);
219 
231  template <int dim, typename number, int spacedim>
232  void
234  const FiniteElement<dim, spacedim> &fe2,
235  FullMatrix<number> &difference_matrix);
236 
240  template <int dim, typename number, int spacedim>
241  void
243  const FiniteElement<dim, spacedim> &fe2,
244  FullMatrix<number> & matrix);
245 
314  template <int dim, int spacedim>
317 
356  template <int dim, typename number, int spacedim>
357  void
359  const FiniteElement<dim, spacedim> & fe,
360  std::vector<std::vector<FullMatrix<number>>> &matrices,
361  const bool isotropic_only = false,
362  const double threshold = 1.e-12);
363 
385  template <int dim, typename number, int spacedim>
386  void
390  const unsigned int face_coarse,
391  const unsigned int face_fine,
392  const double threshold = 1.e-12);
393 
425  template <int dim, typename number, int spacedim>
426  void
428  const FiniteElement<dim, spacedim> & fe,
429  std::vector<std::vector<FullMatrix<number>>> &matrices,
430  const bool isotropic_only = false);
431 
517  template <int dim, int spacedim>
518  void
521  const Quadrature<dim> & lhs_quadrature,
522  const Quadrature<dim> & rhs_quadrature,
523  FullMatrix<double> & X);
524 
532  template <int dim, int spacedim>
533  void
536  const Quadrature<dim> & quadrature,
537  FullMatrix<double> & I_q);
538 
552  template <int dim>
553  void
555  const FullMatrix<double> & projection_matrix,
556  const std::vector<Tensor<1, dim>> &vector_of_tensors_at_qp,
557  std::vector<Tensor<1, dim>> & vector_of_tensors_at_nodes);
558 
559 
560 
564  template <int dim>
565  void
567  const FullMatrix<double> & projection_matrix,
568  const std::vector<SymmetricTensor<2, dim>> &vector_of_tensors_at_qp,
569  std::vector<SymmetricTensor<2, dim>> & vector_of_tensors_at_nodes);
570 
571 
572 
582  template <int dim, int spacedim>
583  void
586  const Quadrature<dim - 1> & lhs_quadrature,
587  const Quadrature<dim - 1> & rhs_quadrature,
589  const unsigned int face,
590  FullMatrix<double> & X);
591 
592 
593 
609  template <int dim, int spacedim, typename number>
610  void
612  const FiniteElement<dim, spacedim> &finite_element,
613  const std::vector<Vector<number>> & support_point_values,
614  std::vector<number> & dof_values);
615 
616 
617 
619 
652  template <int dim,
653  int spacedim,
654  template <int, int> class DoFHandlerType1,
655  template <int, int> class DoFHandlerType2,
656  class InVector,
657  class OutVector>
658  void
659  interpolate(const DoFHandlerType1<dim, spacedim> &dof1,
660  const InVector & u1,
661  const DoFHandlerType2<dim, spacedim> &dof2,
662  OutVector & u2);
663 
680  template <int dim,
681  int spacedim,
682  template <int, int> class DoFHandlerType1,
683  template <int, int> class DoFHandlerType2,
684  class InVector,
685  class OutVector>
686  void
687  interpolate(
688  const DoFHandlerType1<dim, spacedim> & dof1,
689  const InVector & u1,
690  const DoFHandlerType2<dim, spacedim> & dof2,
692  OutVector & u2);
693 
709  template <int dim,
710  template <int, int> class DoFHandlerType,
711  class InVector,
712  class OutVector,
713  int spacedim>
714  void
715  back_interpolate(const DoFHandlerType<dim, spacedim> &dof1,
716  const InVector & u1,
717  const FiniteElement<dim, spacedim> & fe2,
718  OutVector & u1_interpolated);
719 
732  template <int dim, class InVector, class OutVector, int spacedim>
733  void
735  const DoFHandler<dim, spacedim> & dof1,
737  const InVector & u1,
738  const DoFHandler<dim, spacedim> & dof2,
740  OutVector & u1_interpolated);
741 
751  template <int dim, class InVector, class OutVector, int spacedim>
752  void
754  const InVector & z1,
755  const FiniteElement<dim, spacedim> &fe2,
756  OutVector & z1_difference);
757 
770  template <int dim, class InVector, class OutVector, int spacedim>
771  void
773  const DoFHandler<dim, spacedim> & dof1,
775  const InVector & z1,
776  const DoFHandler<dim, spacedim> & dof2,
778  OutVector & z1_difference);
779 
780 
781 
790  template <int dim, class InVector, class OutVector, int spacedim>
791  void
793  const InVector & u1,
794  const DoFHandler<dim, spacedim> &dof2,
795  OutVector & u2);
796 
857  template <int dim, class InVector, class OutVector, int spacedim>
858  void
860  const InVector & z1,
861  const DoFHandler<dim, spacedim> &dof2,
862  OutVector & z2);
863 
876  template <int dim, class InVector, class OutVector, int spacedim>
877  void
878  extrapolate(
879  const DoFHandler<dim, spacedim> & dof1,
880  const InVector & z1,
881  const DoFHandler<dim, spacedim> & dof2,
883  OutVector & z2);
884 
886 
911  template <int dim>
912  void
913  hierarchic_to_lexicographic_numbering(unsigned int degree,
914  std::vector<unsigned int> &h2l);
915 
916  template <int dim>
917  void
919  std::vector<unsigned int> & h2l);
920 
925  template <int dim>
926  std::vector<unsigned int>
928 
934  template <int dim>
935  void
937  std::vector<unsigned int> & l2h);
938 
943  template <int dim>
944  std::vector<unsigned int>
946 
947 
1021  namespace Compositing
1022  {
1039  template <int dim, int spacedim>
1042  const std::vector<const FiniteElement<dim, spacedim> *> &fes,
1043  const std::vector<unsigned int> & multiplicities,
1044  const bool do_tensor_product = true);
1045 
1051  template <int dim, int spacedim>
1054  const std::initializer_list<
1055  std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>>
1056  &fe_systems);
1057 
1061  template <int dim, int spacedim>
1064  const unsigned int N1,
1065  const FiniteElement<dim, spacedim> *fe2 = nullptr,
1066  const unsigned int N2 = 0,
1067  const FiniteElement<dim, spacedim> *fe3 = nullptr,
1068  const unsigned int N3 = 0,
1069  const FiniteElement<dim, spacedim> *fe4 = nullptr,
1070  const unsigned int N4 = 0,
1071  const FiniteElement<dim, spacedim> *fe5 = nullptr,
1072  const unsigned int N5 = 0);
1073 
1086  template <int dim, int spacedim>
1087  std::vector<bool>
1089  const std::vector<const FiniteElement<dim, spacedim> *> &fes,
1090  const std::vector<unsigned int> & multiplicities);
1091 
1097  template <int dim, int spacedim>
1098  std::vector<bool>
1100  const std::initializer_list<
1101  std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>>
1102  &fe_systems);
1103 
1118  template <int dim, int spacedim>
1119  std::vector<bool>
1121  const FiniteElement<dim, spacedim> *fe1,
1122  const unsigned int N1,
1123  const FiniteElement<dim, spacedim> *fe2 = nullptr,
1124  const unsigned int N2 = 0,
1125  const FiniteElement<dim, spacedim> *fe3 = nullptr,
1126  const unsigned int N3 = 0,
1127  const FiniteElement<dim, spacedim> *fe4 = nullptr,
1128  const unsigned int N4 = 0,
1129  const FiniteElement<dim, spacedim> *fe5 = nullptr,
1130  const unsigned int N5 = 0);
1131 
1132 
1149  template <int dim, int spacedim>
1150  std::vector<ComponentMask>
1152  const std::vector<const FiniteElement<dim, spacedim> *> &fes,
1153  const std::vector<unsigned int> & multiplicities,
1154  const bool do_tensor_product = true);
1155 
1161  template <int dim, int spacedim>
1162  std::vector<ComponentMask>
1164  const std::initializer_list<
1165  std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>>
1166  &fe_systems);
1167 
1186  template <int dim, int spacedim>
1187  std::vector<ComponentMask>
1189  const FiniteElement<dim, spacedim> *fe1,
1190  const unsigned int N1,
1191  const FiniteElement<dim, spacedim> *fe2 = nullptr,
1192  const unsigned int N2 = 0,
1193  const FiniteElement<dim, spacedim> *fe3 = nullptr,
1194  const unsigned int N3 = 0,
1195  const FiniteElement<dim, spacedim> *fe4 = nullptr,
1196  const unsigned int N4 = 0,
1197  const FiniteElement<dim, spacedim> *fe5 = nullptr,
1198  const unsigned int N5 = 0,
1199  const bool do_tensor_product = true);
1200 
1217  template <int dim, int spacedim>
1218  void
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,
1226  const FiniteElement<dim, spacedim> & finite_element,
1227  const bool do_tensor_product = true);
1228 
1244  template <int dim, int spacedim>
1245  void
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,
1251  const FiniteElement<dim, spacedim> &finite_element,
1252  const bool do_tensor_product = true);
1253 
1254  } // namespace Compositing
1255 
1256 
1290  template <int dim, int spacedim = dim>
1291  std::unique_ptr<FiniteElement<dim, spacedim>>
1292  get_fe_by_name(const std::string &name);
1293 
1294 
1298  template <int dim>
1299  DEAL_II_DEPRECATED FiniteElement<dim, dim> *
1300  get_fe_from_name(const std::string &name);
1301 
1302 
1345  template <int dim, int spacedim>
1346  void
1347  add_fe_name(const std::string & name,
1348  const FEFactoryBase<dim, spacedim> *factory);
1349 
1360  std::string,
1361  << "Can't re-generate a finite element from the string '"
1362  << arg1 << "'.");
1363 
1376  char,
1377  int,
1378  << "The dimension " << arg1
1379  << " in the finite element string must match "
1380  << "the space dimension " << arg2 << ".");
1381 
1388 
1402 
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.");
1426  int,
1427  int,
1428  int,
1429  int,
1430  << "This is a " << arg1 << "x" << arg2 << " matrix, "
1431  << "but should be a " << arg3 << "x" << arg4 << " matrix.");
1432 
1439  double,
1440  << "Least squares fit leaves a gap of " << arg1);
1441 
1448  int,
1449  int,
1450  << arg1 << " must be greater than " << arg2);
1451 } // namespace FETools
1452 
1453 
1454 #ifndef DOXYGEN
1455 
1456 namespace FETools
1457 {
1458  template <class FE>
1459  std::unique_ptr<FiniteElement<FE::dimension, FE::space_dimension>>
1460  FEFactory<FE>::get(const unsigned int degree) const
1461  {
1462  return std_cxx14::make_unique<FE>(degree);
1463  }
1464 
1465  namespace Compositing
1466  {
1467  template <int dim, int spacedim>
1468  std::vector<bool>
1470  const std::initializer_list<
1471  std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>>
1472  &fe_systems)
1473  {
1474  std::vector<const FiniteElement<dim, spacedim> *> fes;
1475  std::vector<unsigned int> multiplicities;
1476 
1477  const auto extract =
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);
1483  };
1484 
1485  for (const auto &p : fe_systems)
1486  extract(p);
1487 
1488  return compute_restriction_is_additive_flags(fes, multiplicities);
1489  }
1490 
1491 
1492 
1493  template <int dim, int spacedim>
1496  const std::initializer_list<
1497  std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>>
1498  &fe_systems)
1499  {
1500  std::vector<const FiniteElement<dim, spacedim> *> fes;
1501  std::vector<unsigned int> multiplicities;
1502 
1503  const auto extract =
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);
1509  };
1510 
1511  for (const auto &p : fe_systems)
1512  extract(p);
1513 
1514  return multiply_dof_numbers(fes, multiplicities, true);
1515  }
1516 
1517 
1518 
1519  template <int dim, int spacedim>
1520  std::vector<ComponentMask>
1522  const std::initializer_list<
1523  std::pair<std::unique_ptr<FiniteElement<dim, spacedim>>, unsigned int>>
1524  &fe_systems)
1525  {
1526  std::vector<const FiniteElement<dim, spacedim> *> fes;
1527  std::vector<unsigned int> multiplicities;
1528 
1529  const auto extract =
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);
1535  };
1536 
1537  for (const auto &p : fe_systems)
1538  extract(p);
1539 
1540  return compute_nonzero_components(fes, multiplicities, true);
1541  }
1542  } // namespace Compositing
1543 } // namespace FETools
1544 
1545 #endif
1546 
1549 DEAL_II_NAMESPACE_CLOSE
1550 
1551 #endif /* dealii_fe_tools_H */
Definition: tria.h:71
void project_dg(const DoFHandler< dim, spacedim > &dof1, const InVector &u1, const DoFHandler< dim, spacedim > &dof2, OutVector &u2)
static ::ExceptionBase & ExcLeastSquaresError(double arg1)
void compute_interpolation_to_quadrature_points_matrix(const FiniteElement< dim, spacedim > &fe, const Quadrature< dim > &quadrature, FullMatrix< double > &I_q)
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:541
static ::ExceptionBase & ExcGridNotRefinedAtLeastOnce()
FiniteElementData< dim > multiply_dof_numbers(const std::vector< const FiniteElement< dim, spacedim > *> &fes, const std::vector< unsigned int > &multiplicities, const bool do_tensor_product=true)
std::unique_ptr< FiniteElement< dim, spacedim > > get_fe_by_name(const std::string &name)
void compute_embedding_matrices(const FiniteElement< dim, spacedim > &fe, std::vector< std::vector< FullMatrix< number >>> &matrices, const bool isotropic_only=false, const double threshold=1.e-12)
void compute_block_renumbering(const FiniteElement< dim, spacedim > &fe, std::vector< types::global_dof_index > &renumbering, std::vector< types::global_dof_index > &block_data, bool return_start_indices=true)
void compute_face_embedding_matrices(const FiniteElement< dim, spacedim > &fe, FullMatrix< number >(&matrices)[GeometryInfo< dim >::max_children_per_face], const unsigned int face_coarse, const unsigned int face_fine, const double threshold=1.e-12)
void interpolation_difference(const DoFHandler< dim, spacedim > &dof1, const InVector &z1, const FiniteElement< dim, spacedim > &fe2, OutVector &z1_difference)
void hierarchic_to_lexicographic_numbering(unsigned int degree, std::vector< unsigned int > &h2l)
std::vector< bool > compute_restriction_is_additive_flags(const std::vector< const FiniteElement< dim, spacedim > *> &fes, const std::vector< unsigned int > &multiplicities)
FullMatrix< double > compute_node_matrix(const FiniteElement< dim, spacedim > &fe)
void convert_generalized_support_point_values_to_dof_values(const FiniteElement< dim, spacedim > &finite_element, const std::vector< Vector< number >> &support_point_values, std::vector< number > &dof_values)
void extrapolate(const DoFHandler< dim, spacedim > &dof1, const InVector &z1, const DoFHandler< dim, spacedim > &dof2, OutVector &z2)
static ::ExceptionBase & ExcFENotPrimitive()
void get_projection_matrix(const FiniteElement< dim, spacedim > &fe1, const FiniteElement< dim, spacedim > &fe2, FullMatrix< number > &matrix)
virtual std::unique_ptr< FiniteElement< FE::dimension, FE::space_dimension > > get(const unsigned int degree) const override
static ::ExceptionBase & ExcMatrixDimensionMismatch(int arg1, int arg2, int arg3, int arg4)
void compute_projection_from_face_quadrature_points_matrix(const FiniteElement< dim, spacedim > &fe, const Quadrature< dim - 1 > &lhs_quadrature, const Quadrature< dim - 1 > &rhs_quadrature, const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, const unsigned int face, FullMatrix< double > &X)
void compute_projection_matrices(const FiniteElement< dim, spacedim > &fe, std::vector< std::vector< FullMatrix< number >>> &matrices, const bool isotropic_only=false)
static ::ExceptionBase & ExcHangingNodesNotAllowed()
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:518
void get_interpolation_matrix(const FiniteElement< dim, spacedim > &fe1, const FiniteElement< dim, spacedim > &fe2, FullMatrix< number > &interpolation_matrix)
void build_cell_tables(std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int >> &system_to_base_table, std::vector< std::pair< unsigned int, unsigned int >> &system_to_component_table, std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int >> &component_to_base_table, const FiniteElement< dim, spacedim > &finite_element, const bool do_tensor_product=true)
static ::ExceptionBase & ExcNotGreaterThan(int arg1, int arg2)
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:496
void compute_projection_from_quadrature_points_matrix(const FiniteElement< dim, spacedim > &fe, const Quadrature< dim > &lhs_quadrature, const Quadrature< dim > &rhs_quadrature, FullMatrix< double > &X)
#define DeclException0(Exception0)
Definition: exceptions.h:473
void get_back_interpolation_matrix(const FiniteElement< dim, spacedim > &fe1, const FiniteElement< dim, spacedim > &fe2, FullMatrix< number > &interpolation_matrix)
ReturnType< rank, T >::value_type & extract(T &t, const ArrayType &indices)
FiniteElement< dim, dim > * get_fe_from_name(const std::string &name)
static ::ExceptionBase & ExcInvalidFEDimension(char arg1, int arg2)
void lexicographic_to_hierarchic_numbering(const FiniteElementData< dim > &fe_data, std::vector< unsigned int > &l2h)
static ::ExceptionBase & ExcInvalidFE()
void compute_projection_from_quadrature_points(const FullMatrix< double > &projection_matrix, const std::vector< Tensor< 1, dim >> &vector_of_tensors_at_qp, std::vector< Tensor< 1, dim >> &vector_of_tensors_at_nodes)
void add_fe_name(const std::string &name, const FEFactoryBase< dim, spacedim > *factory)
std::vector< ComponentMask > compute_nonzero_components(const std::vector< const FiniteElement< dim, spacedim > *> &fes, const std::vector< unsigned int > &multiplicities, const bool do_tensor_product=true)
void get_interpolation_difference_matrix(const FiniteElement< dim, spacedim > &fe1, const FiniteElement< dim, spacedim > &fe2, FullMatrix< number > &difference_matrix)
#define DeclException4(Exception4, type1, type2, type3, type4, outsequence)
Definition: exceptions.h:587
void compute_component_wise(const FiniteElement< dim, spacedim > &fe, std::vector< unsigned int > &renumbering, std::vector< std::vector< unsigned int >> &start_indices)
virtual ~FEFactoryBase() override=default
static ::ExceptionBase & ExcInvalidFEName(std::string arg1)
void build_face_tables(std::vector< std::pair< std::pair< unsigned int, unsigned int >, unsigned int >> &face_system_to_base_table, std::vector< std::pair< unsigned int, unsigned int >> &face_system_to_component_table, const FiniteElement< dim, spacedim > &finite_element, const bool do_tensor_product=true)
typename ActiveSelector::active_cell_iterator active_cell_iterator
Definition: dof_handler.h:324
static ::ExceptionBase & ExcTriangulationMismatch()
void back_interpolate(const DoFHandlerType< dim, spacedim > &dof1, const InVector &u1, const FiniteElement< dim, spacedim > &fe2, OutVector &u1_interpolated)
void interpolate(const DoFHandlerType1< dim, spacedim > &dof1, const InVector &u1, const DoFHandlerType2< dim, spacedim > &dof2, OutVector &u2)