]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove template argument `DoFHandlerType` for classes ...
authorMarc Fehling <mafehling.git@gmail.com>
Sat, 21 Nov 2020 06:08:56 +0000 (23:08 -0700)
committerMarc Fehling <mafehling.git@gmail.com>
Tue, 25 May 2021 19:53:20 +0000 (13:53 -0600)
... SolutionTransfer, FEFieldFunction, DataOut, DataOut_DoFData, DataOutFaces, DataOutRotation.

27 files changed:
doc/news/changes/incompatibilities/20201121Fehling [new file with mode: 0644]
examples/step-34/step-34.cc
examples/step-38/step-38.cc
examples/step-60/step-60.cc
include/deal.II/distributed/solution_transfer.h
include/deal.II/numerics/data_out.h
include/deal.II/numerics/data_out_dof_data.h
include/deal.II/numerics/data_out_dof_data.templates.h
include/deal.II/numerics/data_out_faces.h
include/deal.II/numerics/data_out_rotation.h
include/deal.II/numerics/fe_field_function.h
include/deal.II/numerics/fe_field_function.templates.h
include/deal.II/numerics/solution_transfer.h
source/distributed/solution_transfer.cc
source/distributed/solution_transfer.inst.in
source/grid/grid_out.cc
source/numerics/data_out.cc
source/numerics/data_out.inst.in
source/numerics/data_out_dof_data.inst.in
source/numerics/data_out_dof_data_codim.inst.in
source/numerics/data_out_faces.cc
source/numerics/data_out_faces.inst.in
source/numerics/data_out_rotation.cc
source/numerics/data_out_rotation.inst.in
source/numerics/fe_field_function.inst.in
source/numerics/solution_transfer.cc
source/numerics/solution_transfer.inst.in

diff --git a/doc/news/changes/incompatibilities/20201121Fehling b/doc/news/changes/incompatibilities/20201121Fehling
new file mode 100644 (file)
index 0000000..13ea014
--- /dev/null
@@ -0,0 +1,30 @@
+Deprecated: The template arguments of the following classes have been
+changed to avoid the legacy argument `DoFHandlerType`:
+<ul>
+  <li> `SolutionTransfer<dim, VectorType, DoFHandlerType> -> SolutionTransfer<dim, VectorType, spacedim>`
+  <li> `parallel::distributed::SolutionTransfer<dim, VectorType, DoFHandlerType> -> parallel::distributed::SolutionTransfer<dim, VectorType, spacedim>`
+  <li> `Functions::FEFieldFunction<dim, DoFHandlerType, VectorType> -> Functions::FEFieldFunction<dim, VectorType, spacedim>`
+  <li> `DataOut<dim, DoFHandlerType> -> DataOut<dim, spacedim>`
+  <li> `DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim> -> DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>`
+  <li> `DataOutFaces<dim, DoFHandlerType> -> DataOutFaces<dim, spacedim>`
+  <li> `DataOutRotation<dim, DoFHandlerType> -> DataOutRotation<dim, spacedim>`
+</ul>
+Please change your code accordingly.
+<br>
+If for some reason, you need a code that is compatible with deal.II
+9.3 and the subsequent release, a Legacy namespace has been introduced
+with aliases of these classes with their original interface. You can
+make the following substitutions to your code for each of the affected
+classes:
+<ul>
+  <li>X &rarr; Legacy::X
+</ul>
+To perform this substitution automatically, you may use a *search and
+replace* script like the following made for the *bash* shell:
+@code{.sh}
+classes=(SolutionTransfer parallel::distributed::SolutionTransfer Functions::FEFieldFunction DataOut DataOut_DoFData DataOutFaces DataOutRotation)
+for c in \${classes[@]}; do
+  find /path/to/your/code -type f -exec sed -i -E "/(\w\${c}|\${c}[^<]|Particles::\${c}|distributed::\${c}|^\s*(\/\/|\*))/! s/\${c}/Legacy::\${c}/g" {} \;
+done
+@endcode
+(Marc Fehling, 2020/11/21)
index 2c535c53e308ee6b5e68788edd4de5c86e381dc3..db6d4c55e265bca95a6e0a664433138a30d32c60 100644 (file)
@@ -999,19 +999,16 @@ namespace Step34
   template <int dim>
   void BEMProblem<dim>::output_results(const unsigned int cycle)
   {
-    DataOut<dim - 1, DoFHandler<dim - 1, dim>> dataout;
+    DataOut<dim - 1, dim> dataout;
 
     dataout.attach_dof_handler(dof_handler);
-    dataout.add_data_vector(
-      phi, "phi", DataOut<dim - 1, DoFHandler<dim - 1, dim>>::type_dof_data);
-    dataout.add_data_vector(
-      alpha,
-      "alpha",
-      DataOut<dim - 1, DoFHandler<dim - 1, dim>>::type_dof_data);
-    dataout.build_patches(
-      mapping,
-      mapping.get_degree(),
-      DataOut<dim - 1, DoFHandler<dim - 1, dim>>::curved_inner_cells);
+    dataout.add_data_vector(phi, "phi", DataOut<dim - 1, dim>::type_dof_data);
+    dataout.add_data_vector(alpha,
+                            "alpha",
+                            DataOut<dim - 1, dim>::type_dof_data);
+    dataout.build_patches(mapping,
+                          mapping.get_degree(),
+                          DataOut<dim - 1, dim>::curved_inner_cells);
 
     const std::string filename = std::to_string(dim) + "d_boundary_solution_" +
                                  std::to_string(cycle) + ".vtk";
index f86e1c392c41bdbb70984a5e0a0240363190160f..d00baa161ce32bba8911cdb575eb8915da27023f 100644 (file)
@@ -462,12 +462,11 @@ namespace Step38
   template <int spacedim>
   void LaplaceBeltramiProblem<spacedim>::output_results() const
   {
-    DataOut<dim, DoFHandler<dim, spacedim>> data_out;
+    DataOut<dim, spacedim> data_out;
     data_out.attach_dof_handler(dof_handler);
-    data_out.add_data_vector(
-      solution,
-      "solution",
-      DataOut<dim, DoFHandler<dim, spacedim>>::type_dof_data);
+    data_out.add_data_vector(solution,
+                             "solution",
+                             DataOut<dim, spacedim>::type_dof_data);
     data_out.build_patches(mapping, mapping.get_degree());
 
     const std::string filename =
index acfe56d454eb4366507cb19f463f868663e0256c..162f876f5cdca3a06ef502ce467e4092341f3d8a 100644 (file)
@@ -1008,7 +1008,7 @@ namespace Step60
     // embedded_mapping to the DataOut::build_patches function. The mapping will
     // take care of outputting the result on the actual deformed configuration.
 
-    DataOut<dim, DoFHandler<dim, spacedim>> embedded_out;
+    DataOut<dim, spacedim> embedded_out;
 
     std::ofstream embedded_out_file("embedded.vtu");
 
index 02706b2b2a2f4c6a4d285ea6860d5971a58b264c..3137c93fa67138e46e99cc7deecfbd776f727328 100644 (file)
@@ -218,17 +218,9 @@ namespace parallel
      *
      * @ingroup distributed
      */
-    template <int dim,
-              typename VectorType,
-              typename DoFHandlerType = DoFHandler<dim>>
+    template <int dim, typename VectorType, int spacedim = dim>
     class SolutionTransfer
     {
-#ifndef DEAL_II_MSVC
-      static_assert(dim == DoFHandlerType::dimension,
-                    "The dimension explicitly provided as a template "
-                    "argument, and the dimension of the DoFHandlerType "
-                    "template argument must match.");
-#endif
     public:
       /**
        * Constructor.
@@ -238,7 +230,7 @@ namespace parallel
        *   points to the Triangulation before the refinement in question
        *   happens.
        */
-      SolutionTransfer(const DoFHandlerType &dof);
+      SolutionTransfer(const DoFHandler<dim, spacedim> &dof);
 
       /**
        * Destructor.
@@ -320,8 +312,8 @@ namespace parallel
       /**
        * Pointer to the degree of freedom handler to work with.
        */
-      SmartPointer<const DoFHandlerType,
-                   SolutionTransfer<dim, VectorType, DoFHandlerType>>
+      SmartPointer<const DoFHandler<dim, spacedim>,
+                   SolutionTransfer<dim, VectorType, spacedim>>
         dof_handler;
 
       /**
@@ -343,10 +335,8 @@ namespace parallel
        */
       std::vector<char>
       pack_callback(
-        const typename Triangulation<dim, DoFHandlerType::space_dimension>::
-          cell_iterator &cell,
-        const typename Triangulation<dim, DoFHandlerType::space_dimension>::
-          CellStatus status);
+        const typename Triangulation<dim, spacedim>::cell_iterator &cell,
+        const typename Triangulation<dim, spacedim>::CellStatus     status);
 
       /**
        * A callback function used to unpack the data on the current mesh that
@@ -355,10 +345,8 @@ namespace parallel
        */
       void
       unpack_callback(
-        const typename Triangulation<dim, DoFHandlerType::space_dimension>::
-          cell_iterator &cell,
-        const typename Triangulation<dim, DoFHandlerType::space_dimension>::
-          CellStatus status,
+        const typename Triangulation<dim, spacedim>::cell_iterator &cell,
+        const typename Triangulation<dim, spacedim>::CellStatus     status,
         const boost::iterator_range<std::vector<char>::const_iterator>
           &                        data_range,
         std::vector<VectorType *> &all_out);
@@ -388,8 +376,9 @@ namespace Legacy
       template <int dim,
                 typename VectorType,
                 typename DoFHandlerType = DoFHandler<dim>>
-      using SolutionTransfer DEAL_II_DEPRECATED = dealii::parallel::
-        distributed::SolutionTransfer<dim, VectorType, DoFHandlerType>;
+      using SolutionTransfer DEAL_II_DEPRECATED =
+        dealii::parallel::distributed::
+          SolutionTransfer<dim, VectorType, DoFHandlerType::space_dimension>;
     } // namespace distributed
   }   // namespace parallel
 } // namespace Legacy
index 1541b24a925f578a4b40e6893c5ec4a1c426da3b..cdd7a1471767db995285dc60b71b0a54389d94b6 100644 (file)
@@ -143,26 +143,16 @@ namespace internal
  *
  * @ingroup output
  */
-template <int dim, typename DoFHandlerType = DoFHandler<dim>>
-class DataOut : public DataOut_DoFData<DoFHandlerType,
-                                       DoFHandlerType::dimension,
-                                       DoFHandlerType::space_dimension>
+template <int dim, int spacedim = dim>
+class DataOut : public DataOut_DoFData<dim, dim, spacedim, spacedim>
 {
 public:
-  static_assert(dim == DoFHandlerType::dimension,
-                "The dimension given explicitly as a template argument to "
-                "this class must match the dimension of the DoFHandler "
-                "template argument");
-  static constexpr unsigned int spacedim = DoFHandlerType::space_dimension;
-
   /**
    * Typedef to the iterator type of the dof handler class under
    * consideration.
    */
   using cell_iterator =
-    typename DataOut_DoFData<DoFHandlerType,
-                             DoFHandlerType::dimension,
-                             DoFHandlerType::space_dimension>::cell_iterator;
+    typename DataOut_DoFData<dim, dim, spacedim, spacedim>::cell_iterator;
 
   /**
    * The type of the function object returning the first cell as used in
@@ -317,20 +307,17 @@ public:
    * deformation of each vertex.
    */
   virtual void
-  build_patches(const Mapping<DoFHandlerType::dimension,
-                              DoFHandlerType::space_dimension> &mapping,
-                const unsigned int     n_subdivisions = 0,
-                const CurvedCellRegion curved_region  = curved_boundary);
+  build_patches(const Mapping<dim, spacedim> &mapping,
+                const unsigned int            n_subdivisions = 0,
+                const CurvedCellRegion        curved_region  = curved_boundary);
 
   /**
    * Same as above, but for hp::MappingCollection.
    */
   virtual void
-  build_patches(
-    const hp::MappingCollection<DoFHandlerType::dimension,
-                                DoFHandlerType::space_dimension> &mapping,
-    const unsigned int     n_subdivisions = 0,
-    const CurvedCellRegion curved_region  = curved_boundary);
+  build_patches(const hp::MappingCollection<dim, spacedim> &mapping,
+                const unsigned int                          n_subdivisions = 0,
+                const CurvedCellRegion curved_region = curved_boundary);
 
   /**
    * A function that allows selecting for which cells output should be
@@ -508,12 +495,11 @@ private:
    * reasons.
    */
   void
-  build_one_patch(const std::pair<cell_iterator, unsigned int> *cell_and_index,
-                  internal::DataOutImplementation::ParallelData<
-                    DoFHandlerType::dimension,
-                    DoFHandlerType::space_dimension> &scratch_data,
-                  const unsigned int                  n_subdivisions,
-                  const CurvedCellRegion              curved_cell_region);
+  build_one_patch(
+    const std::pair<cell_iterator, unsigned int> *cell_and_index,
+    internal::DataOutImplementation::ParallelData<dim, spacedim> &scratch_data,
+    const unsigned int     n_subdivisions,
+    const CurvedCellRegion curved_cell_region);
 };
 
 namespace Legacy
@@ -523,7 +509,8 @@ namespace Legacy
    * instead.
    */
   template <int dim, typename DoFHandlerType = DoFHandler<dim>>
-  using DataOut DEAL_II_DEPRECATED = dealii::DataOut<dim, DoFHandlerType>;
+  using DataOut DEAL_II_DEPRECATED =
+    dealii::DataOut<dim, DoFHandlerType::space_dimension>;
 } // namespace Legacy
 
 
index e0e192bd16d7a22c43225b69daf31ffad93697fd..264294e24dbc0dd16bb8dd3cefbdfd6c17751e3c 100644 (file)
@@ -591,19 +591,18 @@ namespace internal
  *
  * @ingroup output
  */
-template <typename DoFHandlerType,
+template <int dim,
           int patch_dim,
-          int patch_space_dim = patch_dim>
-class DataOut_DoFData : public DataOutInterface<patch_dim, patch_space_dim>
+          int spacedim       = dim,
+          int patch_spacedim = patch_dim>
+class DataOut_DoFData : public DataOutInterface<patch_dim, patch_spacedim>
 {
 public:
   /**
    * Typedef to the iterator type of the dof handler class under
    * consideration.
    */
-  using cell_iterator =
-    typename Triangulation<DoFHandlerType::dimension,
-                           DoFHandlerType::space_dimension>::cell_iterator;
+  using cell_iterator = typename Triangulation<dim, spacedim>::cell_iterator;
 
 public:
   /**
@@ -651,7 +650,7 @@ public:
    * object, then that contains all information needed to generate the output.
    */
   void
-  attach_dof_handler(const DoFHandlerType &);
+  attach_dof_handler(const DoFHandler<dim, spacedim> &);
 
   /**
    * Designate a triangulation to be used to extract geometry data and the
@@ -663,8 +662,7 @@ public:
    * at all, in which case it provides the geometry.
    */
   void
-  attach_triangulation(const Triangulation<DoFHandlerType::dimension,
-                                           DoFHandlerType::space_dimension> &);
+  attach_triangulation(const Triangulation<dim, spacedim> &);
 
   /**
    * Add a data vector together with its name.
@@ -788,9 +786,9 @@ public:
   template <class VectorType>
   void
   add_data_vector(
-    const DoFHandlerType &          dof_handler,
-    const VectorType &              data,
-    const std::vector<std::string> &names,
+    const DoFHandler<dim, spacedim> &dof_handler,
+    const VectorType &               data,
+    const std::vector<std::string> & names,
     const std::vector<DataComponentInterpretation::DataComponentInterpretation>
       &data_component_interpretation = std::vector<
         DataComponentInterpretation::DataComponentInterpretation>());
@@ -803,9 +801,9 @@ public:
   template <class VectorType>
   void
   add_data_vector(
-    const DoFHandlerType &dof_handler,
-    const VectorType &    data,
-    const std::string &   name,
+    const DoFHandler<dim, spacedim> &dof_handler,
+    const VectorType &               data,
+    const std::string &              name,
     const std::vector<DataComponentInterpretation::DataComponentInterpretation>
       &data_component_interpretation = std::vector<
         DataComponentInterpretation::DataComponentInterpretation>());
@@ -838,9 +836,8 @@ public:
    */
   template <class VectorType>
   void
-  add_data_vector(const VectorType &data,
-                  const DataPostprocessor<DoFHandlerType::space_dimension>
-                    &data_postprocessor);
+  add_data_vector(const VectorType &                 data,
+                  const DataPostprocessor<spacedim> &data_postprocessor);
 
   /**
    * Same function as above, but with a DoFHandler object that does not need
@@ -850,10 +847,9 @@ public:
    */
   template <class VectorType>
   void
-  add_data_vector(const DoFHandlerType &dof_handler,
-                  const VectorType &    data,
-                  const DataPostprocessor<DoFHandlerType::space_dimension>
-                    &data_postprocessor);
+  add_data_vector(const DoFHandler<dim, spacedim> &  dof_handler,
+                  const VectorType &                 data,
+                  const DataPostprocessor<spacedim> &data_postprocessor);
 
   /**
    * Add a multilevel data vector.
@@ -875,7 +871,7 @@ public:
   template <class VectorType>
   void
   add_mg_data_vector(
-    const DoFHandlerType &           dof_handler,
+    const DoFHandler<dim, spacedim> &dof_handler,
     const MGLevelObject<VectorType> &data,
     const std::vector<std::string> & names,
     const std::vector<DataComponentInterpretation::DataComponentInterpretation>
@@ -887,7 +883,7 @@ public:
    */
   template <class VectorType>
   void
-  add_mg_data_vector(const DoFHandlerType &           dof_handler,
+  add_mg_data_vector(const DoFHandler<dim, spacedim> &dof_handler,
                      const MGLevelObject<VectorType> &data,
                      const std::string &              name);
 
@@ -936,11 +932,23 @@ public:
    * This function will fail if either this or the other object did not yet
    * set up any patches.
    */
-  template <typename DoFHandlerType2>
+  template <int dim2, int spacedim2>
   void
   merge_patches(
-    const DataOut_DoFData<DoFHandlerType2, patch_dim, patch_space_dim> &source,
-    const Point<patch_space_dim> &shift = Point<patch_space_dim>());
+    const DataOut_DoFData<dim2, patch_dim, spacedim2, patch_spacedim> &source,
+    const Point<patch_spacedim> &shift = Point<patch_spacedim>());
+
+  /**
+   * @deprecated Use merge_patches() without the DoFHandlerType2 template
+   * instead.
+   */
+  template <typename DoFHandlerType2>
+  DEAL_II_DEPRECATED void
+  merge_patches(const DataOut_DoFData<DoFHandlerType2::dimension,
+                                      patch_dim,
+                                      DoFHandlerType2::space_dimension,
+                                      patch_spacedim> &source,
+                const Point<patch_spacedim> &shift = Point<patch_spacedim>());
 
   /**
    * Release the pointers to the data vectors and the DoF handler. You have to
@@ -962,34 +970,30 @@ protected:
   /**
    * Abbreviate the somewhat lengthy name for the Patch class.
    */
-  using Patch = dealii::DataOutBase::Patch<patch_dim, patch_space_dim>;
+  using Patch = dealii::DataOutBase::Patch<patch_dim, patch_spacedim>;
 
   /**
    * Pointer to the triangulation object.
    */
-  SmartPointer<const Triangulation<DoFHandlerType::dimension,
-                                   DoFHandlerType::space_dimension>>
-    triangulation;
+  SmartPointer<const Triangulation<dim, spacedim>> triangulation;
 
   /**
    * Pointer to the optional handler object.
    */
-  SmartPointer<const DoFHandlerType> dofs;
+  SmartPointer<const DoFHandler<dim, spacedim>> dofs;
 
   /**
    * List of data elements with vectors of values for each degree of freedom.
    */
-  std::vector<std::shared_ptr<internal::DataOutImplementation::DataEntryBase<
-    DoFHandlerType::dimension,
-    DoFHandlerType::space_dimension>>>
+  std::vector<std::shared_ptr<
+    internal::DataOutImplementation::DataEntryBase<dim, spacedim>>>
     dof_data;
 
   /**
    * List of data elements with vectors of values for each cell.
    */
-  std::vector<std::shared_ptr<internal::DataOutImplementation::DataEntryBase<
-    DoFHandlerType::dimension,
-    DoFHandlerType::space_dimension>>>
+  std::vector<std::shared_ptr<
+    internal::DataOutImplementation::DataEntryBase<dim, spacedim>>>
     cell_data;
 
   /**
@@ -1017,9 +1021,7 @@ protected:
    * Extracts the finite elements stored in the dof_data object, including a
    * dummy object of FE_DGQ<dim>(0) in case only the triangulation is used.
    */
-  std::vector<
-    std::shared_ptr<dealii::hp::FECollection<DoFHandlerType::dimension,
-                                             DoFHandlerType::space_dimension>>>
+  std::vector<std::shared_ptr<dealii::hp::FECollection<dim, spacedim>>>
   get_fes() const;
 
   /**
@@ -1035,7 +1037,7 @@ protected:
 
   // Make all template siblings friends. Needed for the merge_patches()
   // function.
-  template <class, int, int>
+  template <int, int, int, int>
   friend class DataOut_DoFData;
 
   /**
@@ -1050,10 +1052,10 @@ private:
   template <class VectorType>
   void
   add_data_vector_internal(
-    const DoFHandlerType *          dof_handler,
-    const VectorType &              data,
-    const std::vector<std::string> &names,
-    const DataVectorType            type,
+    const DoFHandler<dim, spacedim> *dof_handler,
+    const VectorType &               data,
+    const std::vector<std::string> & names,
+    const DataVectorType             type,
     const std::vector<DataComponentInterpretation::DataComponentInterpretation>
       &        data_component_interpretation,
     const bool deduce_output_names);
@@ -1062,10 +1064,10 @@ private:
 
 
 // -------------------- template and inline functions ------------------------
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 template <typename VectorType>
 void
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_data_vector(
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::add_data_vector(
   const VectorType &   vec,
   const std::string &  name,
   const DataVectorType type,
@@ -1081,10 +1083,10 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_data_vector(
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 template <typename VectorType>
 void
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_data_vector(
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::add_data_vector(
   const VectorType &              vec,
   const std::vector<std::string> &names,
   const DataVectorType            type,
@@ -1099,13 +1101,13 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_data_vector(
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 template <typename VectorType>
 void
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_data_vector(
-  const DoFHandlerType &dof_handler,
-  const VectorType &    data,
-  const std::string &   name,
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::add_data_vector(
+  const DoFHandler<dim, spacedim> &dof_handler,
+  const VectorType &               data,
+  const std::string &              name,
   const std::vector<DataComponentInterpretation::DataComponentInterpretation>
     &data_component_interpretation)
 {
@@ -1120,13 +1122,13 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_data_vector(
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 template <typename VectorType>
 void
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_data_vector(
-  const DoFHandlerType &          dof_handler,
-  const VectorType &              data,
-  const std::vector<std::string> &names,
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::add_data_vector(
+  const DoFHandler<dim, spacedim> &dof_handler,
+  const VectorType &               data,
+  const std::vector<std::string> & names,
   const std::vector<DataComponentInterpretation::DataComponentInterpretation>
     &data_component_interpretation)
 {
@@ -1140,12 +1142,12 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_data_vector(
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 template <typename VectorType>
 void
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_data_vector(
-  const VectorType &                                        vec,
-  const DataPostprocessor<DoFHandlerType::space_dimension> &data_postprocessor)
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::add_data_vector(
+  const VectorType &                 vec,
+  const DataPostprocessor<spacedim> &data_postprocessor)
 {
   Assert(dofs != nullptr,
          Exceptions::DataOutImplementation::ExcNoDoFHandlerSelected());
@@ -1154,12 +1156,12 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_data_vector(
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
-template <typename DoFHandlerType2>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
+template <int dim2, int spacedim2>
 void
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::merge_patches(
-  const DataOut_DoFData<DoFHandlerType2, patch_dim, patch_space_dim> &source,
-  const Point<patch_space_dim> &                                      shift)
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::merge_patches(
+  const DataOut_DoFData<dim2, patch_dim, spacedim2, patch_spacedim> &source,
+  const Point<patch_spacedim> &                                      shift)
 {
   const std::vector<Patch> &source_patches = source.get_patches();
   Assert((patches.size() != 0) && (source_patches.size() != 0),
@@ -1192,9 +1194,9 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::merge_patches(
   Assert(patches[0].data.n_cols() == source_patches[0].data.n_cols(),
          Exceptions::DataOutImplementation::ExcIncompatiblePatchLists());
   Assert((patches[0].data.n_rows() +
-          (patches[0].points_are_available ? 0 : patch_space_dim)) ==
+          (patches[0].points_are_available ? 0 : patch_spacedim)) ==
            (source_patches[0].data.n_rows() +
-            (source_patches[0].points_are_available ? 0 : patch_space_dim)),
+            (source_patches[0].points_are_available ? 0 : patch_spacedim)),
          Exceptions::DataOutImplementation::ExcIncompatiblePatchLists());
 
   // check equality of the vector data
@@ -1227,7 +1229,7 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::merge_patches(
   patches.insert(patches.end(), source_patches.begin(), source_patches.end());
 
   // perform shift, if so desired
-  if (shift != Point<patch_space_dim>())
+  if (shift != Point<patch_spacedim>())
     for (unsigned int i = old_n_patches; i < patches.size(); ++i)
       for (const unsigned int v : GeometryInfo<patch_dim>::vertex_indices())
         patches[i].vertices[v] += shift;
@@ -1243,6 +1245,24 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::merge_patches(
         patches[i].neighbors[n] += old_n_patches;
 }
 
+
+
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
+template <typename DoFHandlerType2>
+void
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::merge_patches(
+  const DataOut_DoFData<DoFHandlerType2::dimension,
+                        patch_dim,
+                        DoFHandlerType2::space_dimension,
+                        patch_spacedim> &source,
+  const Point<patch_spacedim> &          shift)
+{
+  this->merge_patches<DoFHandlerType2::dimension,
+                      DoFHandlerType2::space_dimension>(source, shift);
+}
+
+
+
 namespace Legacy
 {
   /**
@@ -1253,7 +1273,10 @@ namespace Legacy
             int patch_dim,
             int patch_space_dim = patch_dim>
   using DataOut_DoFData DEAL_II_DEPRECATED =
-    dealii::DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>;
+    dealii::DataOut_DoFData<DoFHandlerType::dimension,
+                            patch_dim,
+                            DoFHandlerType::space_dimension,
+                            patch_space_dim>;
 } // namespace Legacy
 
 
index cae34457c39d93f50d382ae9b080a67014b24ff8..ba4077e2e0778ee7cc4ed7df6f67afedc71fdb32 100644 (file)
@@ -702,9 +702,7 @@ namespace internal
         &data_component_interpretation)
       : dof_handler(
           dofs,
-          typeid(
-            dealii::DataOut_DoFData<DoFHandler<dim, spacedim>, dim, spacedim>)
-            .name())
+          typeid(dealii::DataOut_DoFData<dim, dim, spacedim, spacedim>).name())
       , names(names_in)
       , data_component_interpretation(data_component_interpretation)
       , postprocessor(nullptr, typeid(*this).name())
@@ -737,9 +735,7 @@ namespace internal
       const DataPostprocessor<spacedim> *data_postprocessor)
       : dof_handler(
           dofs,
-          typeid(
-            dealii::DataOut_DoFData<DoFHandler<dim, spacedim>, dim, spacedim>)
-            .name())
+          typeid(dealii::DataOut_DoFData<dim, dim, spacedim, spacedim>).name())
       , names(data_postprocessor->get_names())
       , data_component_interpretation(
           data_postprocessor->get_data_component_interpretation())
@@ -1490,29 +1486,29 @@ namespace internal
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::DataOut_DoFData()
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::DataOut_DoFData()
   : triangulation(nullptr, typeid(*this).name())
   , dofs(nullptr, typeid(*this).name())
 {}
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::~DataOut_DoFData()
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::~DataOut_DoFData()
 {
   // virtual functions called in constructors and destructors never use the
   // override in a derived class for clarity be explicit on which function is
   // called
-  DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::clear();
+  DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::clear();
 }
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 void
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::attach_dof_handler(
-  const DoFHandlerType &d)
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::attach_dof_handler(
+  const DoFHandler<dim, spacedim> &d)
 {
   Assert(dof_data.size() == 0,
          Exceptions::DataOutImplementation::ExcOldDataStillPresent());
@@ -1520,20 +1516,18 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::attach_dof_handler(
          Exceptions::DataOutImplementation::ExcOldDataStillPresent());
 
   triangulation =
-    SmartPointer<const Triangulation<DoFHandlerType::dimension,
-                                     DoFHandlerType::space_dimension>>(
-      &d.get_triangulation(), typeid(*this).name());
-  dofs = SmartPointer<const DoFHandlerType>(&d, typeid(*this).name());
+    SmartPointer<const Triangulation<dim, spacedim>>(&d.get_triangulation(),
+                                                     typeid(*this).name());
+  dofs =
+    SmartPointer<const DoFHandler<dim, spacedim>>(&d, typeid(*this).name());
 }
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 void
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
-  attach_triangulation(
-    const Triangulation<DoFHandlerType::dimension,
-                        DoFHandlerType::space_dimension> &tria)
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::attach_triangulation(
+  const Triangulation<dim, spacedim> &tria)
 {
   Assert(dof_data.size() == 0,
          Exceptions::DataOutImplementation::ExcOldDataStillPresent());
@@ -1541,20 +1535,19 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
          Exceptions::DataOutImplementation::ExcOldDataStillPresent());
 
   triangulation =
-    SmartPointer<const Triangulation<DoFHandlerType::dimension,
-                                     DoFHandlerType::space_dimension>>(
-      &tria, typeid(*this).name());
+    SmartPointer<const Triangulation<dim, spacedim>>(&tria,
+                                                     typeid(*this).name());
 }
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 template <typename VectorType>
 void
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_data_vector(
-  const DoFHandlerType &                                    dof_handler,
-  const VectorType &                                        vec,
-  const DataPostprocessor<DoFHandlerType::space_dimension> &data_postprocessor)
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::add_data_vector(
+  const DoFHandler<dim, spacedim> &  dof_handler,
+  const VectorType &                 vec,
+  const DataPostprocessor<spacedim> &data_postprocessor)
 {
   // this is a specialized version of the other function where we have a
   // postprocessor. if we do, we know that we have type_dof_data, which makes
@@ -1568,10 +1561,8 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_data_vector(
     }
   else
     {
-      triangulation =
-        SmartPointer<const Triangulation<DoFHandlerType::dimension,
-                                         DoFHandlerType::space_dimension>>(
-          &dof_handler.get_triangulation(), typeid(*this).name());
+      triangulation = SmartPointer<const Triangulation<dim, spacedim>>(
+        &dof_handler.get_triangulation(), typeid(*this).name());
     }
 
   Assert(vec.size() == dof_handler.n_dofs(),
@@ -1582,24 +1573,22 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_data_vector(
 
 
   auto new_entry = std::make_unique<
-    internal::DataOutImplementation::DataEntry<DoFHandlerType::dimension,
-                                               DoFHandlerType::space_dimension,
-                                               VectorType>>(
+    internal::DataOutImplementation::DataEntry<dim, spacedim, VectorType>>(
     &dof_handler, &vec, &data_postprocessor);
   dof_data.emplace_back(std::move(new_entry));
 }
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 template <typename VectorType>
 void
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::
   add_data_vector_internal(
-    const DoFHandlerType *          dof_handler,
-    const VectorType &              data_vector,
-    const std::vector<std::string> &names,
-    const DataVectorType            type,
+    const DoFHandler<dim, spacedim> *dof_handler,
+    const VectorType &               data_vector,
+    const std::vector<std::string> & names,
+    const DataVectorType             type,
     const std::vector<DataComponentInterpretation::DataComponentInterpretation>
       &        data_component_interpretation_,
     const bool deduce_output_names)
@@ -1608,10 +1597,8 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
   if (triangulation == nullptr)
     {
       Assert(dof_handler != nullptr, ExcInternalError());
-      triangulation =
-        SmartPointer<const Triangulation<DoFHandlerType::dimension,
-                                         DoFHandlerType::space_dimension>>(
-          &dof_handler->get_triangulation(), typeid(*this).name());
+      triangulation = SmartPointer<const Triangulation<dim, spacedim>>(
+        &dof_handler->get_triangulation(), typeid(*this).name());
     }
 
   if (dof_handler != nullptr)
@@ -1706,9 +1693,7 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
 
   // finally, add the data vector:
   auto new_entry = std::make_unique<
-    internal::DataOutImplementation::DataEntry<DoFHandlerType::dimension,
-                                               DoFHandlerType::space_dimension,
-                                               VectorType>>(
+    internal::DataOutImplementation::DataEntry<dim, spacedim, VectorType>>(
     dof_handler, &data_vector, deduced_names, data_component_interpretation);
 
   if (actual_type == type_dof_data)
@@ -1719,11 +1704,11 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 template <class VectorType>
 void
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_mg_data_vector(
-  const DoFHandlerType &           dof_handler,
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::add_mg_data_vector(
+  const DoFHandler<dim, spacedim> &dof_handler,
   const MGLevelObject<VectorType> &data,
   const std::string &              name)
 {
@@ -1734,21 +1719,19 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_mg_data_vector(
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 template <class VectorType>
 void
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_mg_data_vector(
-  const DoFHandlerType &           dof_handler,
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::add_mg_data_vector(
+  const DoFHandler<dim, spacedim> &dof_handler,
   const MGLevelObject<VectorType> &data,
   const std::vector<std::string> & names,
   const std::vector<DataComponentInterpretation::DataComponentInterpretation>
     &data_component_interpretation_)
 {
   if (triangulation == nullptr)
-    triangulation =
-      SmartPointer<const Triangulation<DoFHandlerType::dimension,
-                                       DoFHandlerType::space_dimension>>(
-        &dof_handler.get_triangulation(), typeid(*this).name());
+    triangulation = SmartPointer<const Triangulation<dim, spacedim>>(
+      &dof_handler.get_triangulation(), typeid(*this).name());
 
   Assert(&dof_handler.get_triangulation() == triangulation,
          ExcMessage("The triangulation attached to the DoFHandler does not "
@@ -1780,23 +1763,17 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_mg_data_vector(
          ExcMessage(
            "Invalid number of entries in data_component_interpretation."));
 
-  auto new_entry =
-    std::make_unique<internal::DataOutImplementation::MGDataEntry<
-      DoFHandlerType::dimension,
-      DoFHandlerType::space_dimension,
-      VectorType>>(&dof_handler,
-                   &data,
-                   deduced_names,
-                   data_component_interpretation);
+  auto new_entry = std::make_unique<
+    internal::DataOutImplementation::MGDataEntry<dim, spacedim, VectorType>>(
+    &dof_handler, &data, deduced_names, data_component_interpretation);
   dof_data.emplace_back(std::move(new_entry));
 }
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 void
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
-  clear_data_vectors()
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::clear_data_vectors()
 {
   dof_data.erase(dof_data.begin(), dof_data.end());
   cell_data.erase(cell_data.begin(), cell_data.end());
@@ -1808,9 +1785,9 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 void
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::
   clear_input_data_references()
 {
   for (unsigned int i = 0; i < dof_data.size(); ++i)
@@ -1825,9 +1802,9 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 void
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::clear()
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::clear()
 {
   dof_data.erase(dof_data.begin(), dof_data.end());
   cell_data.erase(cell_data.begin(), cell_data.end());
@@ -1842,9 +1819,9 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::clear()
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 std::vector<std::string>
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::get_dataset_names()
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::get_dataset_names()
   const
 {
   std::vector<std::string> names;
@@ -1902,7 +1879,7 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::get_dataset_names()
                   {
                     // It's a vector. First output all real parts, then all
                     // imaginary parts:
-                    const unsigned int size = patch_space_dim;
+                    const unsigned int size = patch_spacedim;
                     for (unsigned int vec_comp = 0; vec_comp < size; ++vec_comp)
                       names.push_back(input_data->names[i + vec_comp] + "_re");
                     for (unsigned int vec_comp = 0; vec_comp < size; ++vec_comp)
@@ -1918,7 +1895,7 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::get_dataset_names()
                   {
                     // It's a tensor. First output all real parts, then all
                     // imaginary parts:
-                    const unsigned int size = patch_space_dim * patch_space_dim;
+                    const unsigned int size = patch_spacedim * patch_spacedim;
                     for (unsigned int tensor_comp = 0; tensor_comp < size;
                          ++tensor_comp)
                       names.push_back(input_data->names[i + tensor_comp] +
@@ -1961,13 +1938,13 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::get_dataset_names()
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 std::vector<
   std::tuple<unsigned int,
              unsigned int,
              std::string,
              DataComponentInterpretation::DataComponentInterpretation>>
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::
   get_nonscalar_data_ranges() const
 {
   std::vector<
@@ -2006,10 +1983,10 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
               // ensure that there is a continuous number of next space_dim
               // components that all deal with vectors
               Assert(
-                i + patch_space_dim <= input_data->n_output_variables,
+                i + patch_spacedim <= input_data->n_output_variables,
                 Exceptions::DataOutImplementation::ExcInvalidVectorDeclaration(
                   i, input_data->names[i]));
-              for (unsigned int dd = 1; dd < patch_space_dim; ++dd)
+              for (unsigned int dd = 1; dd < patch_spacedim; ++dd)
                 Assert(
                   input_data->data_component_interpretation[i + dd] ==
                     DataComponentInterpretation::component_is_part_of_vector,
@@ -2020,7 +1997,7 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
               // name to these components. if not, leave the name empty and
               // let the output format writer decide what to do here
               std::string name = input_data->names[i];
-              for (unsigned int dd = 1; dd < patch_space_dim; ++dd)
+              for (unsigned int dd = 1; dd < patch_spacedim; ++dd)
                 if (name != input_data->names[i + dd])
                   {
                     name = "";
@@ -2040,33 +2017,33 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
                 {
                   ranges.emplace_back(std::forward_as_tuple(
                     output_component,
-                    output_component + patch_space_dim - 1,
+                    output_component + patch_spacedim - 1,
                     name,
                     DataComponentInterpretation::component_is_part_of_vector));
 
                   // increase the 'component' counter by the appropriate amount,
                   // same for 'i', since we have already dealt with all these
                   // components
-                  output_component += patch_space_dim;
-                  i += patch_space_dim;
+                  output_component += patch_spacedim;
+                  i += patch_spacedim;
                 }
               else
                 {
                   ranges.emplace_back(std::forward_as_tuple(
                     output_component,
-                    output_component + patch_space_dim - 1,
+                    output_component + patch_spacedim - 1,
                     name + "_re",
                     DataComponentInterpretation::component_is_part_of_vector));
-                  output_component += patch_space_dim;
+                  output_component += patch_spacedim;
 
                   ranges.emplace_back(std::forward_as_tuple(
                     output_component,
-                    output_component + patch_space_dim - 1,
+                    output_component + patch_spacedim - 1,
                     name + "_im",
                     DataComponentInterpretation::component_is_part_of_vector));
-                  output_component += patch_space_dim;
+                  output_component += patch_spacedim;
 
-                  i += patch_space_dim;
+                  i += patch_spacedim;
                 }
 
 
@@ -2075,7 +2052,7 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
 
           case DataComponentInterpretation::component_is_part_of_tensor:
             {
-              const unsigned int size = patch_space_dim * patch_space_dim;
+              const unsigned int size = patch_spacedim * patch_spacedim;
               // ensure that there is a continuous number of next
               // space_dim*space_dim components that all deal with tensors
               Assert(
@@ -2157,24 +2134,20 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
-const std::vector<dealii::DataOutBase::Patch<patch_dim, patch_space_dim>> &
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::get_patches() const
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
+const std::vector<dealii::DataOutBase::Patch<patch_dim, patch_spacedim>> &
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::get_patches() const
 {
   return patches;
 }
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
-std::vector<
-  std::shared_ptr<dealii::hp::FECollection<DoFHandlerType::dimension,
-                                           DoFHandlerType::space_dimension>>>
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::get_fes() const
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
+std::vector<std::shared_ptr<dealii::hp::FECollection<dim, spacedim>>>
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::get_fes() const
 {
-  const unsigned int dhdim      = DoFHandlerType::dimension;
-  const unsigned int dhspacedim = DoFHandlerType::space_dimension;
-  std::vector<std::shared_ptr<dealii::hp::FECollection<dhdim, dhspacedim>>>
+  std::vector<std::shared_ptr<dealii::hp::FECollection<dim, spacedim>>>
     finite_elements(this->dof_data.size());
   for (unsigned int i = 0; i < this->dof_data.size(); ++i)
     {
@@ -2196,7 +2169,7 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::get_fes() const
           }
       if (duplicate == false)
         finite_elements[i] =
-          std::make_shared<dealii::hp::FECollection<dhdim, dhspacedim>>(
+          std::make_shared<dealii::hp::FECollection<dim, spacedim>>(
             this->dof_data[i]->dof_handler->get_fe_collection());
     }
   if (this->dof_data.empty())
@@ -2213,20 +2186,20 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::get_fes() const
         {
           if (reference_cell.is_hyper_cube())
             finite_elements.emplace_back(
-              std::make_shared<dealii::hp::FECollection<dhdim, dhspacedim>>(
-                FE_DGQ<dhdim, dhspacedim>(0)));
+              std::make_shared<dealii::hp::FECollection<dim, spacedim>>(
+                FE_DGQ<dim, spacedim>(0)));
           else if (reference_cell.is_simplex())
             finite_elements.emplace_back(
-              std::make_shared<dealii::hp::FECollection<dhdim, dhspacedim>>(
-                FE_SimplexDGP<dhdim, dhspacedim>(1)));
+              std::make_shared<dealii::hp::FECollection<dim, spacedim>>(
+                FE_SimplexDGP<dim, spacedim>(1)));
           else if (reference_cell == dealii::ReferenceCells::Wedge)
             finite_elements.emplace_back(
-              std::make_shared<dealii::hp::FECollection<dhdim, dhspacedim>>(
-                FE_WedgeDGP<dhdim, dhspacedim>(1)));
+              std::make_shared<dealii::hp::FECollection<dim, spacedim>>(
+                FE_WedgeDGP<dim, spacedim>(1)));
           else if (reference_cell == dealii::ReferenceCells::Pyramid)
             finite_elements.emplace_back(
-              std::make_shared<dealii::hp::FECollection<dhdim, dhspacedim>>(
-                FE_PyramidDGP<dhdim, dhspacedim>(1)));
+              std::make_shared<dealii::hp::FECollection<dim, spacedim>>(
+                FE_PyramidDGP<dim, spacedim>(1)));
           else
             Assert(false, ExcNotImplemented());
         }
@@ -2236,12 +2209,12 @@ DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::get_fes() const
 
 
 
-template <typename DoFHandlerType, int patch_dim, int patch_space_dim>
+template <int dim, int patch_dim, int spacedim, int patch_spacedim>
 std::size_t
-DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::
-  memory_consumption() const
+DataOut_DoFData<dim, patch_dim, spacedim, patch_spacedim>::memory_consumption()
+  const
 {
-  return (DataOutInterface<patch_dim, patch_space_dim>::memory_consumption() +
+  return (DataOutInterface<patch_dim, patch_spacedim>::memory_consumption() +
           MemoryConsumption::memory_consumption(dofs) +
           MemoryConsumption::memory_consumption(patches));
 }
index 2e0cbff45053d2b869ca39df087b6dd84773f2fe..2b941aadd8f70cb08c52473b580da62bd7bcf4b7 100644 (file)
@@ -112,31 +112,16 @@ namespace internal
  *
  * @ingroup output
  */
-template <int dim, typename DoFHandlerType = DoFHandler<dim>>
-class DataOutFaces : public DataOut_DoFData<DoFHandlerType,
-                                            DoFHandlerType::dimension - 1,
-                                            DoFHandlerType::dimension>
+template <int dim, int spacedim = dim>
+class DataOutFaces : public DataOut_DoFData<dim, dim - 1, spacedim, dim>
 {
 public:
-  /**
-   * An abbreviation for the dimension of the DoFHandler object we work with.
-   * Faces are then <code>dimension-1</code> dimensional objects.
-   */
-  static const unsigned int dimension = DoFHandlerType::dimension;
-
-  /**
-   * An abbreviation for the spatial dimension within which the triangulation
-   * and DoFHandler are embedded in.
-   */
-  static const unsigned int space_dimension = DoFHandlerType::space_dimension;
-
   /**
    * Alias to the iterator type of the dof handler class under
    * consideration.
    */
-  using cell_iterator = typename DataOut_DoFData<DoFHandlerType,
-                                                 dimension - 1,
-                                                 dimension>::cell_iterator;
+  using cell_iterator =
+    typename DataOut_DoFData<dim, dim - 1, spacedim, dim>::cell_iterator;
 
   /**
    * Constructor determining whether a surface mesh (default) or the whole
@@ -182,8 +167,8 @@ public:
    * hp::MappingCollection in case of a DoFHandler with hp-capabilities.
    */
   virtual void
-  build_patches(const Mapping<dimension> &mapping,
-                const unsigned int        n_subdivisions = 0);
+  build_patches(const Mapping<dim> &mapping,
+                const unsigned int  n_subdivisions = 0);
 
   /**
    * Declare a way to describe a face which we would like to generate output
@@ -244,10 +229,9 @@ private:
    */
   void
   build_one_patch(
-    const FaceDescriptor *cell_and_face,
-    internal::DataOutFacesImplementation::ParallelData<dimension, dimension>
-      &                                                 data,
-    DataOutBase::Patch<dimension - 1, space_dimension> &patch);
+    const FaceDescriptor *                                        cell_and_face,
+    internal::DataOutFacesImplementation::ParallelData<dim, dim> &data,
+    DataOutBase::Patch<dim - 1, spacedim> &                       patch);
 };
 
 namespace Legacy
@@ -258,7 +242,7 @@ namespace Legacy
    */
   template <int dim, typename DoFHandlerType = DoFHandler<dim>>
   using DataOutFaces DEAL_II_DEPRECATED =
-    dealii::DataOutFaces<dim, DoFHandlerType>;
+    dealii::DataOutFaces<dim, DoFHandlerType::space_dimension>;
 } // namespace Legacy
 
 
index f2679873750e82f0c8fc909299a93d842ef0c3d5..ed8e907d6dd8c8b13762a88a5ae7a8200393078d 100644 (file)
@@ -118,29 +118,16 @@ namespace internal
  *
  * @ingroup output
  */
-template <int dim, typename DoFHandlerType = DoFHandler<dim>>
-class DataOutRotation
-  : public DataOut_DoFData<DoFHandlerType, DoFHandlerType::dimension + 1>
+template <int dim, int spacedim = dim>
+class DataOutRotation : public DataOut_DoFData<dim, dim + 1, spacedim, dim + 1>
 {
 public:
-  /**
-   * An abbreviation for the dimension of the DoFHandler object we work with.
-   * Faces are then <code>dimension-1</code> dimensional objects.
-   */
-  static const unsigned int dimension = DoFHandlerType::dimension;
-
-  /**
-   * An abbreviation for the spatial dimension within which the triangulation
-   * and DoFHandler are embedded in.
-   */
-  static const unsigned int space_dimension = DoFHandlerType::space_dimension;
-
   /**
    * Typedef to the iterator type of the dof handler class under
    * consideration.
    */
   using cell_iterator =
-    typename DataOut_DoFData<DoFHandlerType, dimension + 1>::cell_iterator;
+    typename DataOut_DoFData<dim, dim + 1, spacedim, dim + 1>::cell_iterator;
 
   /**
    * This is the central function of this class since it builds the list of
@@ -207,12 +194,9 @@ private:
    */
   void
   build_one_patch(
-    const cell_iterator *cell,
-    internal::DataOutRotationImplementation::ParallelData<dimension,
-                                                          space_dimension>
-      &data,
-    std::vector<DataOutBase::Patch<dimension + 1, space_dimension + 1>>
-      &my_patches);
+    const cell_iterator *                                                 cell,
+    internal::DataOutRotationImplementation::ParallelData<dim, spacedim> &data,
+    std::vector<DataOutBase::Patch<dim + 1, spacedim + 1>> &my_patches);
 };
 
 namespace Legacy
@@ -223,7 +207,7 @@ namespace Legacy
    */
   template <int dim, typename DoFHandlerType = DoFHandler<dim>>
   using DataOutRotation DEAL_II_DEPRECATED =
-    dealii::DataOutRotation<dim, DoFHandlerType>;
+    dealii::DataOutRotation<dim, DoFHandlerType::space_dimension>;
 } // namespace Legacy
 
 
index c70fddbdcfd239b0ad0bccd11c98869361918a6a..6f6994218643c3a27daa75a2c6dcce71dd6e6299 100644 (file)
@@ -142,7 +142,7 @@ namespace Functions
    * for example, evaluating the solution at the origin (here using a parallel
    * TrilinosWrappers vector to hold the solution):
    * @code
-   *   Functions::FEFieldFunction<dim,DoFHandler<dim>,TrilinosWrappers::MPI::Vector>
+   *   Functions::FEFieldFunction<dim,TrilinosWrappers::MPI::Vector>
    *     solution_function (dof_handler, solution);
    *   Point<dim> origin = Point<dim>();
    *
@@ -163,9 +163,7 @@ namespace Functions
    *
    * @ingroup functions
    */
-  template <int dim,
-            typename DoFHandlerType = DoFHandler<dim>,
-            typename VectorType     = Vector<double>>
+  template <int dim, typename VectorType = Vector<double>, int spacedim = dim>
   class FEFieldFunction : public Function<dim, typename VectorType::value_type>
   {
   public:
@@ -178,9 +176,9 @@ namespace Functions
      * lay. Otherwise the standard Q1 mapping is used.
      */
     FEFieldFunction(
-      const DoFHandlerType &dh,
-      const VectorType &    data_vector,
-      const Mapping<dim> &  mapping = StaticMappingQ1<dim>::mapping);
+      const DoFHandler<dim, spacedim> &dh,
+      const VectorType &               data_vector,
+      const Mapping<dim> &             mapping = StaticMappingQ1<dim>::mapping);
 
     /**
      * Set the current cell. If you know in advance where your points lie, you
@@ -189,7 +187,7 @@ namespace Functions
      */
     void
     set_active_cell(
-      const typename DoFHandlerType::active_cell_iterator &newcell);
+      const typename DoFHandler<dim, spacedim>::active_cell_iterator &newcell);
 
     /**
      * Get one vector value at the given point. It is inefficient to use
@@ -438,23 +436,24 @@ namespace Functions
      */
     unsigned int
     compute_point_locations(
-      const std::vector<Point<dim>> &                             points,
-      std::vector<typename DoFHandlerType::active_cell_iterator> &cells,
-      std::vector<std::vector<Point<dim>>> &                      qpoints,
-      std::vector<std::vector<unsigned int>> &                    maps) const;
+      const std::vector<Point<dim>> &points,
+      std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
+        &                                     cells,
+      std::vector<std::vector<Point<dim>>> &  qpoints,
+      std::vector<std::vector<unsigned int>> &maps) const;
 
   private:
     /**
      * Typedef holding the local cell_hint.
      */
     using cell_hint_t = Threads::ThreadLocalStorage<
-      typename DoFHandlerType::active_cell_iterator>;
+      typename DoFHandler<dim, spacedim>::active_cell_iterator>;
 
     /**
      * Pointer to the dof handler.
      */
-    SmartPointer<const DoFHandlerType,
-                 FEFieldFunction<dim, DoFHandlerType, VectorType>>
+    SmartPointer<const DoFHandler<dim, spacedim>,
+                 FEFieldFunction<dim, VectorType, spacedim>>
       dh;
 
     /**
@@ -470,7 +469,7 @@ namespace Functions
     /**
      * The Cache object
      */
-    GridTools::Cache<dim, DoFHandlerType::space_dimension> cache;
+    GridTools::Cache<dim, spacedim> cache;
 
     /**
      * The latest cell hint.
@@ -484,8 +483,8 @@ namespace Functions
      */
     std_cxx17::optional<Point<dim>>
     get_reference_coordinates(
-      const typename DoFHandlerType::active_cell_iterator &cell,
-      const Point<dim> &                                   point) const;
+      const typename DoFHandler<dim, spacedim>::active_cell_iterator &cell,
+      const Point<dim> &point) const;
   };
 } // namespace Functions
 
@@ -500,8 +499,8 @@ namespace Legacy
     template <int dim,
               typename DoFHandlerType = DoFHandler<dim>,
               typename VectorType     = Vector<double>>
-    using FEFieldFunction DEAL_II_DEPRECATED =
-      dealii::Functions::FEFieldFunction<dim, DoFHandlerType, VectorType>;
+    using FEFieldFunction DEAL_II_DEPRECATED = dealii::Functions::
+      FEFieldFunction<dim, VectorType, DoFHandlerType::space_dimension>;
   } // namespace Functions
 } // namespace Legacy
 
index 8c3da383f76e077a430db23e20ecc48338cb3815..1a0bacda7c5fc963689d6d71829b9e40dd8306d3 100644 (file)
@@ -43,11 +43,11 @@ DEAL_II_NAMESPACE_OPEN
 
 namespace Functions
 {
-  template <int dim, typename DoFHandlerType, typename VectorType>
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::FEFieldFunction(
-    const DoFHandlerType &mydh,
-    const VectorType &    myv,
-    const Mapping<dim> &  mymapping)
+  template <int dim, typename VectorType, int spacedim>
+  FEFieldFunction<dim, VectorType, spacedim>::FEFieldFunction(
+    const DoFHandler<dim, spacedim> &mydh,
+    const VectorType &               myv,
+    const Mapping<dim> &             mymapping)
     : Function<dim, typename VectorType::value_type>(
         mydh.get_fe(0).n_components())
     , dh(&mydh, "FEFieldFunction")
@@ -59,34 +59,36 @@ namespace Functions
 
 
 
-  template <int dim, typename DoFHandlerType, typename VectorType>
+  template <int dim, typename VectorType, int spacedim>
   void
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::set_active_cell(
-    const typename DoFHandlerType::active_cell_iterator &newcell)
+  FEFieldFunction<dim, VectorType, spacedim>::set_active_cell(
+    const typename DoFHandler<dim, spacedim>::active_cell_iterator &newcell)
   {
     cell_hint.get() = newcell;
   }
 
 
 
-  template <int dim, typename DoFHandlerType, typename VectorType>
+  template <int dim, typename VectorType, int spacedim>
   void
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::vector_value(
+  FEFieldFunction<dim, VectorType, spacedim>::vector_value(
     const Point<dim> &                       p,
     Vector<typename VectorType::value_type> &values) const
   {
     Assert(values.size() == this->n_components,
            ExcDimensionMismatch(values.size(), this->n_components));
-    typename DoFHandlerType::active_cell_iterator cell = cell_hint.get();
+    typename DoFHandler<dim, spacedim>::active_cell_iterator cell =
+      cell_hint.get();
     if (cell == dh->end())
       cell = dh->begin_active();
 
     std_cxx17::optional<Point<dim>> qp = get_reference_coordinates(cell, p);
     if (!qp)
       {
-        const std::pair<typename dealii::internal::
-                          ActiveCellIterator<dim, dim, DoFHandlerType>::type,
-                        Point<dim>>
+        const std::pair<
+          typename dealii::internal::
+            ActiveCellIterator<dim, dim, DoFHandler<dim, spacedim>>::type,
+          Point<dim>>
           my_pair = GridTools::find_active_cell_around_point(mapping, *dh, p);
         AssertThrow(my_pair.first.state() == IteratorState::valid &&
                       !my_pair.first->is_artificial(),
@@ -114,9 +116,9 @@ namespace Functions
 
 
 
-  template <int dim, typename DoFHandlerType, typename VectorType>
+  template <int dim, typename VectorType, int spacedim>
   typename VectorType::value_type
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::value(
+  FEFieldFunction<dim, VectorType, spacedim>::value(
     const Point<dim> & p,
     const unsigned int comp) const
   {
@@ -127,9 +129,9 @@ namespace Functions
 
 
 
-  template <int dim, typename DoFHandlerType, typename VectorType>
+  template <int dim, typename VectorType, int spacedim>
   void
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::vector_gradient(
+  FEFieldFunction<dim, VectorType, spacedim>::vector_gradient(
     const Point<dim> &                                            p,
     std::vector<Tensor<1, dim, typename VectorType::value_type>> &gradients)
     const
@@ -137,16 +139,18 @@ namespace Functions
     using number = typename VectorType::value_type;
     Assert(gradients.size() == this->n_components,
            ExcDimensionMismatch(gradients.size(), this->n_components));
-    typename DoFHandlerType::active_cell_iterator cell = cell_hint.get();
+    typename DoFHandler<dim, spacedim>::active_cell_iterator cell =
+      cell_hint.get();
     if (cell == dh->end())
       cell = dh->begin_active();
 
     std_cxx17::optional<Point<dim>> qp = get_reference_coordinates(cell, p);
     if (!qp)
       {
-        const std::pair<typename dealii::internal::
-                          ActiveCellIterator<dim, dim, DoFHandlerType>::type,
-                        Point<dim>>
+        const std::pair<
+          typename dealii::internal::
+            ActiveCellIterator<dim, dim, DoFHandler<dim, spacedim>>::type,
+          Point<dim>>
           my_pair = GridTools::find_active_cell_around_point(mapping, *dh, p);
         AssertThrow(my_pair.first.state() == IteratorState::valid &&
                       !my_pair.first->is_artificial(),
@@ -189,9 +193,9 @@ namespace Functions
 
 
 
-  template <int dim, typename DoFHandlerType, typename VectorType>
+  template <int dim, typename VectorType, int spacedim>
   Tensor<1, dim, typename VectorType::value_type>
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::gradient(
+  FEFieldFunction<dim, VectorType, spacedim>::gradient(
     const Point<dim> & p,
     const unsigned int comp) const
   {
@@ -203,24 +207,26 @@ namespace Functions
 
 
 
-  template <int dim, typename DoFHandlerType, typename VectorType>
+  template <int dim, typename VectorType, int spacedim>
   void
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::vector_laplacian(
+  FEFieldFunction<dim, VectorType, spacedim>::vector_laplacian(
     const Point<dim> &                       p,
     Vector<typename VectorType::value_type> &values) const
   {
     Assert(values.size() == this->n_components,
            ExcDimensionMismatch(values.size(), this->n_components));
-    typename DoFHandlerType::active_cell_iterator cell = cell_hint.get();
+    typename DoFHandler<dim, spacedim>::active_cell_iterator cell =
+      cell_hint.get();
     if (cell == dh->end())
       cell = dh->begin_active();
 
     std_cxx17::optional<Point<dim>> qp = get_reference_coordinates(cell, p);
     if (!qp)
       {
-        const std::pair<typename dealii::internal::
-                          ActiveCellIterator<dim, dim, DoFHandlerType>::type,
-                        Point<dim>>
+        const std::pair<
+          typename dealii::internal::
+            ActiveCellIterator<dim, dim, DoFHandler<dim, spacedim>>::type,
+          Point<dim>>
           my_pair = GridTools::find_active_cell_around_point(mapping, *dh, p);
         AssertThrow(my_pair.first.state() == IteratorState::valid &&
                       !my_pair.first->is_artificial(),
@@ -248,9 +254,9 @@ namespace Functions
 
 
 
-  template <int dim, typename DoFHandlerType, typename VectorType>
+  template <int dim, typename VectorType, int spacedim>
   typename VectorType::value_type
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::laplacian(
+  FEFieldFunction<dim, VectorType, spacedim>::laplacian(
     const Point<dim> & p,
     const unsigned int comp) const
   {
@@ -263,18 +269,18 @@ namespace Functions
   // Now the list versions
   // ==============================
 
-  template <int dim, typename DoFHandlerType, typename VectorType>
+  template <int dim, typename VectorType, int spacedim>
   void
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::vector_value_list(
+  FEFieldFunction<dim, VectorType, spacedim>::vector_value_list(
     const std::vector<Point<dim>> &                       points,
     std::vector<Vector<typename VectorType::value_type>> &values) const
   {
     Assert(points.size() == values.size(),
            ExcDimensionMismatch(points.size(), values.size()));
 
-    std::vector<typename DoFHandlerType::active_cell_iterator> cells;
-    std::vector<std::vector<Point<dim>>>                       qpoints;
-    std::vector<std::vector<unsigned int>>                     maps;
+    std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator> cells;
+    std::vector<std::vector<Point<dim>>>   qpoints;
+    std::vector<std::vector<unsigned int>> maps;
 
     const unsigned int n_cells =
       compute_point_locations(points, cells, qpoints, maps);
@@ -316,9 +322,9 @@ namespace Functions
 
 
 
-  template <int dim, typename DoFHandlerType, typename VectorType>
+  template <int dim, typename VectorType, int spacedim>
   void
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::value_list(
+  FEFieldFunction<dim, VectorType, spacedim>::value_list(
     const std::vector<Point<dim>> &               points,
     std::vector<typename VectorType::value_type> &values,
     const unsigned int                            component) const
@@ -342,9 +348,9 @@ namespace Functions
 
 
 
-  template <int dim, typename DoFHandlerType, typename VectorType>
+  template <int dim, typename VectorType, int spacedim>
   void
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::vector_gradient_list(
+  FEFieldFunction<dim, VectorType, spacedim>::vector_gradient_list(
     const std::vector<Point<dim>> &points,
     std::vector<std::vector<Tensor<1, dim, typename VectorType::value_type>>>
       &values) const
@@ -352,9 +358,9 @@ namespace Functions
     Assert(points.size() == values.size(),
            ExcDimensionMismatch(points.size(), values.size()));
 
-    std::vector<typename DoFHandlerType::active_cell_iterator> cells;
-    std::vector<std::vector<Point<dim>>>                       qpoints;
-    std::vector<std::vector<unsigned int>>                     maps;
+    std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator> cells;
+    std::vector<std::vector<Point<dim>>>   qpoints;
+    std::vector<std::vector<unsigned int>> maps;
 
     const unsigned int n_cells =
       compute_point_locations(points, cells, qpoints, maps);
@@ -405,9 +411,9 @@ namespace Functions
 
 
 
-  template <int dim, typename DoFHandlerType, typename VectorType>
+  template <int dim, typename VectorType, int spacedim>
   void
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::gradient_list(
+  FEFieldFunction<dim, VectorType, spacedim>::gradient_list(
     const std::vector<Point<dim>> &                               points,
     std::vector<Tensor<1, dim, typename VectorType::value_type>> &values,
     const unsigned int component) const
@@ -432,18 +438,18 @@ namespace Functions
 
 
 
-  template <int dim, typename DoFHandlerType, typename VectorType>
+  template <int dim, typename VectorType, int spacedim>
   void
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::vector_laplacian_list(
+  FEFieldFunction<dim, VectorType, spacedim>::vector_laplacian_list(
     const std::vector<Point<dim>> &                       points,
     std::vector<Vector<typename VectorType::value_type>> &values) const
   {
     Assert(points.size() == values.size(),
            ExcDimensionMismatch(points.size(), values.size()));
 
-    std::vector<typename DoFHandlerType::active_cell_iterator> cells;
-    std::vector<std::vector<Point<dim>>>                       qpoints;
-    std::vector<std::vector<unsigned int>>                     maps;
+    std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator> cells;
+    std::vector<std::vector<Point<dim>>>   qpoints;
+    std::vector<std::vector<unsigned int>> maps;
 
     const unsigned int n_cells =
       compute_point_locations(points, cells, qpoints, maps);
@@ -487,9 +493,9 @@ namespace Functions
 
 
 
-  template <int dim, typename DoFHandlerType, typename VectorType>
+  template <int dim, typename VectorType, int spacedim>
   void
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::laplacian_list(
+  FEFieldFunction<dim, VectorType, spacedim>::laplacian_list(
     const std::vector<Point<dim>> &               points,
     std::vector<typename VectorType::value_type> &values,
     const unsigned int                            component) const
@@ -513,13 +519,14 @@ namespace Functions
 
 
 
-  template <int dim, typename DoFHandlerType, typename VectorType>
+  template <int dim, typename VectorType, int spacedim>
   unsigned int
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::compute_point_locations(
-    const std::vector<Point<dim>> &                             points,
-    std::vector<typename DoFHandlerType::active_cell_iterator> &cells,
-    std::vector<std::vector<Point<dim>>> &                      qpoints,
-    std::vector<std::vector<unsigned int>> &                    maps) const
+  FEFieldFunction<dim, VectorType, spacedim>::compute_point_locations(
+    const std::vector<Point<dim>> &points,
+    std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
+      &                                     cells,
+    std::vector<std::vector<Point<dim>>> &  qpoints,
+    std::vector<std::vector<unsigned int>> &maps) const
   {
     // Calling the GridTools routine and preparing output
     auto cell_qpoint_map =
@@ -530,7 +537,7 @@ namespace Functions
     cells.resize(tria_cells.size());
     unsigned int i = 0;
     for (const auto &c : tria_cells)
-      cells[i++] = typename DoFHandlerType::cell_iterator(*c, dh);
+      cells[i++] = typename DoFHandler<dim, spacedim>::cell_iterator(*c, dh);
     qpoints = std::get<1>(cell_qpoint_map);
     maps    = std::get<2>(cell_qpoint_map);
 
@@ -541,11 +548,11 @@ namespace Functions
   }
 
 
-  template <int dim, typename DoFHandlerType, typename VectorType>
+  template <int dim, typename VectorType, int spacedim>
   std_cxx17::optional<Point<dim>>
-  FEFieldFunction<dim, DoFHandlerType, VectorType>::get_reference_coordinates(
-    const typename DoFHandlerType::active_cell_iterator &cell,
-    const Point<dim> &                                   point) const
+  FEFieldFunction<dim, VectorType, spacedim>::get_reference_coordinates(
+    const typename DoFHandler<dim, spacedim>::active_cell_iterator &cell,
+    const Point<dim> &                                              point) const
   {
     try
       {
index 9efc94d62100471cfa44e18d84334b4a552a7911..cc4929f3d1c4f7a522c18dda57c9a2efa880f32b 100644 (file)
@@ -49,7 +49,7 @@ DEAL_II_NAMESPACE_OPEN
  * <li> If the grid will only be refined (i.e. no cells are coarsened) then
  * use @p SolutionTransfer as follows:
  * @code
- * SolutionTransfer<dim, double> soltrans(*dof_handler);
+ * SolutionTransfer<dim, Vector<double> > soltrans(*dof_handler);
  *
  * // flag some cells for refinement, e.g.
  * GridRefinement::refine_and_coarsen_fixed_fraction(*tria,
@@ -151,10 +151,10 @@ DEAL_II_NAMESPACE_OPEN
  * soltrans.refine_interpolate(old_solution, solution);
  * @endcode
  *
- * Multiple calls to the function <code>interpolate (const Vector<number> &in,
- * Vector<number> &out)</code> are NOT allowed. Interpolating several
+ * Multiple calls to the function <code>interpolate (const VectorType &in,
+ * VectorType &out)</code> are NOT allowed. Interpolating several
  * functions can be performed in one step by using <tt>void interpolate (const
- * vector<Vector<number> >&all_in, vector<Vector<number> >&all_out)
+ * vector<VectorType> &all_in, vector<VectorType> &all_out)
  * const</tt>, and using the respective @p
  * prepare_for_coarsening_and_refinement function taking several vectors as
  * input before actually refining and coarsening the triangulation (see
@@ -164,7 +164,7 @@ DEAL_II_NAMESPACE_OPEN
  * For deleting all stored data in @p SolutionTransfer and reinitializing it
  * use the <tt>clear()</tt> function.
  *
- * The template argument @p number denotes the data type of the vectors you
+ * The template argument @p VectorType denotes the type of data container you
  * want to transfer.
  *
  *
@@ -221,17 +221,17 @@ DEAL_II_NAMESPACE_OPEN
  * will not be coarsened need to be stored according to the solution transfer
  * with pure refinement (cf there). All this is performed by
  * <tt>prepare_for_coarsening_and_refinement(all_in)</tt> where the
- * <tt>vector<Vector<number> > all_in</tt> includes all discrete
+ * <tt>vector<VectorType> all_in</tt> includes all discrete
  * functions to be interpolated onto the new grid.
  *
  * As we need two different kinds of pointers (<tt>vector<unsigned int> *</tt>
- * for the Dof indices and <tt>vector<Vector<number> > *</tt> for the
+ * for the Dof indices and <tt>vector<VectorType> *</tt> for the
  * interpolated DoF values) we use the @p Pointerstruct that includes both of
  * these pointers and the pointer for each cell points to these @p
  * Pointerstructs. On each cell only one of the two different pointers is used
  * at one time hence we could use a <tt>void * pointer</tt> as
  * <tt>vector<unsigned int> *</tt> at one time and as
- * <tt>vector<Vector<number> > *</tt> at the other but using this @p
+ * <tt>vector<VectorType> *</tt> at the other but using this @p
  * Pointerstruct in between makes the use of these pointers more safe and
  * gives better possibility to expand their usage.
  *
@@ -239,10 +239,10 @@ DEAL_II_NAMESPACE_OPEN
  * according to the solution transfer while pure refinement. Additionally, on
  * each cell that is coarsened (hence previously was a father cell), the
  * values of the discrete functions in @p all_out are set to the stored local
- * interpolated values that are accessible due to the 'vector<Vector<number> >
+ * interpolated values that are accessible due to the 'vector<VectorType>
  * *' pointer in @p Pointerstruct that is pointed to by the pointer of that
  * cell. It is clear that <tt>interpolate(all_in, all_out)</tt> only can be
- * called with the <tt>vector<Vector<number> > all_in</tt> that previously was
+ * called with the <tt>vector<VectorType> all_in</tt> that previously was
  * the parameter of the <tt>prepare_for_coarsening_and_refinement(all_in)</tt>
  * function. Hence <tt>interpolate(all_in, all_out)</tt> can (in contrast to
  * <tt>refine_interpolate(in, out)</tt>) only be called once.
@@ -332,22 +332,14 @@ DEAL_II_NAMESPACE_OPEN
  *
  * @ingroup numerics
  */
-template <int dim,
-          typename VectorType     = Vector<double>,
-          typename DoFHandlerType = DoFHandler<dim>>
+template <int dim, typename VectorType = Vector<double>, int spacedim = dim>
 class SolutionTransfer
 {
-#  ifndef DEAL_II_MSVC
-  static_assert(dim == DoFHandlerType::dimension,
-                "The dimension explicitly provided as a template "
-                "argument, and the dimension of the DoFHandlerType "
-                "template argument must match.");
-#  endif
 public:
   /**
    * Constructor, takes the current DoFHandler as argument.
    */
-  SolutionTransfer(const DoFHandlerType &dof);
+  SolutionTransfer(const DoFHandler<dim, spacedim> &dof);
 
   /**
    * Destructor
@@ -476,8 +468,8 @@ private:
   /**
    * Pointer to the degree of freedom handler to work with.
    */
-  SmartPointer<const DoFHandlerType,
-               SolutionTransfer<dim, VectorType, DoFHandlerType>>
+  SmartPointer<const DoFHandler<dim, spacedim>,
+               SolutionTransfer<dim, VectorType, spacedim>>
     dof_handler;
 
   /**
@@ -584,7 +576,7 @@ namespace Legacy
             typename VectorType     = Vector<double>,
             typename DoFHandlerType = DoFHandler<dim>>
   using SolutionTransfer DEAL_II_DEPRECATED =
-    dealii::SolutionTransfer<dim, VectorType, DoFHandlerType>;
+    dealii::SolutionTransfer<dim, VectorType, DoFHandlerType::space_dimension>;
 } // namespace Legacy
 
 
index d91669a8a25679cb70b7d6a20393cdb4bfcbe0ad..99dcf55b42e741f6e0b66e7eb876277d803ec769 100644 (file)
@@ -114,16 +114,15 @@ namespace parallel
 {
   namespace distributed
   {
-    template <int dim, typename VectorType, typename DoFHandlerType>
-    SolutionTransfer<dim, VectorType, DoFHandlerType>::SolutionTransfer(
-      const DoFHandlerType &dof)
+    template <int dim, typename VectorType, int spacedim>
+    SolutionTransfer<dim, VectorType, spacedim>::SolutionTransfer(
+      const DoFHandler<dim, spacedim> &dof)
       : dof_handler(&dof, typeid(*this).name())
       , handle(numbers::invalid_unsigned_int)
     {
       Assert(
-        (dynamic_cast<const parallel::DistributedTriangulationBase<
-           dim,
-           DoFHandlerType::space_dimension> *>(
+        (dynamic_cast<
+           const parallel::DistributedTriangulationBase<dim, spacedim> *>(
            &dof_handler->get_triangulation()) != nullptr),
         ExcMessage(
           "parallel::distributed::SolutionTransfer requires a parallel::distributed::Triangulation object."));
@@ -131,9 +130,9 @@ namespace parallel
 
 
 
-    template <int dim, typename VectorType, typename DoFHandlerType>
+    template <int dim, typename VectorType, int spacedim>
     void
-    SolutionTransfer<dim, VectorType, DoFHandlerType>::
+    SolutionTransfer<dim, VectorType, spacedim>::
       prepare_for_coarsening_and_refinement(
         const std::vector<const VectorType *> &all_in)
     {
@@ -147,32 +146,31 @@ namespace parallel
 
 
 
-    template <int dim, typename VectorType, typename DoFHandlerType>
+    template <int dim, typename VectorType, int spacedim>
     void
-    SolutionTransfer<dim, VectorType, DoFHandlerType>::register_data_attach()
+    SolutionTransfer<dim, VectorType, spacedim>::register_data_attach()
     {
       // TODO: casting away constness is bad
-      auto *tria = (dynamic_cast<parallel::DistributedTriangulationBase<
-                      dim,
-                      DoFHandlerType::space_dimension> *>(
-        const_cast<dealii::Triangulation<dim, DoFHandlerType::space_dimension>
-                     *>(&dof_handler->get_triangulation())));
+      parallel::DistributedTriangulationBase<dim, spacedim> *tria =
+        (dynamic_cast<parallel::DistributedTriangulationBase<dim, spacedim> *>(
+          const_cast<dealii::Triangulation<dim, spacedim> *>(
+            &dof_handler->get_triangulation())));
       Assert(tria != nullptr, ExcInternalError());
 
       handle = tria->register_data_attach(
         [this](
-          const typename Triangulation<dim, DoFHandlerType::space_dimension>::
-            cell_iterator &cell_,
-          const typename Triangulation<dim, DoFHandlerType::space_dimension>::
-            CellStatus status) { return this->pack_callback(cell_, status); },
+          const typename Triangulation<dim, spacedim>::cell_iterator &cell_,
+          const typename Triangulation<dim, spacedim>::CellStatus     status) {
+          return this->pack_callback(cell_, status);
+        },
         /*returns_variable_size_data=*/dof_handler->has_hp_capabilities());
     }
 
 
 
-    template <int dim, typename VectorType, typename DoFHandlerType>
+    template <int dim, typename VectorType, int spacedim>
     void
-    SolutionTransfer<dim, VectorType, DoFHandlerType>::
+    SolutionTransfer<dim, VectorType, spacedim>::
       prepare_for_coarsening_and_refinement(const VectorType &in)
     {
       std::vector<const VectorType *> all_in(1, &in);
@@ -181,10 +179,10 @@ namespace parallel
 
 
 
-    template <int dim, typename VectorType, typename DoFHandlerType>
+    template <int dim, typename VectorType, int spacedim>
     void
-    SolutionTransfer<dim, VectorType, DoFHandlerType>::
-      prepare_for_serialization(const VectorType &in)
+    SolutionTransfer<dim, VectorType, spacedim>::prepare_for_serialization(
+      const VectorType &in)
     {
       std::vector<const VectorType *> all_in(1, &in);
       prepare_for_serialization(all_in);
@@ -192,20 +190,19 @@ namespace parallel
 
 
 
-    template <int dim, typename VectorType, typename DoFHandlerType>
+    template <int dim, typename VectorType, int spacedim>
     void
-    SolutionTransfer<dim, VectorType, DoFHandlerType>::
-      prepare_for_serialization(const std::vector<const VectorType *> &all_in)
+    SolutionTransfer<dim, VectorType, spacedim>::prepare_for_serialization(
+      const std::vector<const VectorType *> &all_in)
     {
       prepare_for_coarsening_and_refinement(all_in);
     }
 
 
 
-    template <int dim, typename VectorType, typename DoFHandlerType>
+    template <int dim, typename VectorType, int spacedim>
     void
-    SolutionTransfer<dim, VectorType, DoFHandlerType>::deserialize(
-      VectorType &in)
+    SolutionTransfer<dim, VectorType, spacedim>::deserialize(VectorType &in)
     {
       std::vector<VectorType *> all_in(1, &in);
       deserialize(all_in);
@@ -213,9 +210,9 @@ namespace parallel
 
 
 
-    template <int dim, typename VectorType, typename DoFHandlerType>
+    template <int dim, typename VectorType, int spacedim>
     void
-    SolutionTransfer<dim, VectorType, DoFHandlerType>::deserialize(
+    SolutionTransfer<dim, VectorType, spacedim>::deserialize(
       std::vector<VectorType *> &all_in)
     {
       register_data_attach();
@@ -227,9 +224,9 @@ namespace parallel
     }
 
 
-    template <int dim, typename VectorType, typename DoFHandlerType>
+    template <int dim, typename VectorType, int spacedim>
     void
-    SolutionTransfer<dim, VectorType, DoFHandlerType>::interpolate(
+    SolutionTransfer<dim, VectorType, spacedim>::interpolate(
       std::vector<VectorType *> &all_out)
     {
       Assert(input_vectors.size() == all_out.size(),
@@ -239,20 +236,17 @@ namespace parallel
                ExcDimensionMismatch(all_out[i]->size(), dof_handler->n_dofs()));
 
       // TODO: casting away constness is bad
-      auto *tria = (dynamic_cast<parallel::DistributedTriangulationBase<
-                      dim,
-                      DoFHandlerType::space_dimension> *>(
-        const_cast<dealii::Triangulation<dim, DoFHandlerType::space_dimension>
-                     *>(&dof_handler->get_triangulation())));
+      parallel::DistributedTriangulationBase<dim, spacedim> *tria =
+        (dynamic_cast<parallel::DistributedTriangulationBase<dim, spacedim> *>(
+          const_cast<dealii::Triangulation<dim, spacedim> *>(
+            &dof_handler->get_triangulation())));
       Assert(tria != nullptr, ExcInternalError());
 
       tria->notify_ready_to_unpack(
         handle,
         [this, &all_out](
-          const typename Triangulation<dim, DoFHandlerType::space_dimension>::
-            cell_iterator &cell_,
-          const typename Triangulation<dim, DoFHandlerType::space_dimension>::
-            CellStatus status,
+          const typename Triangulation<dim, spacedim>::cell_iterator &cell_,
+          const typename Triangulation<dim, spacedim>::CellStatus     status,
           const boost::iterator_range<std::vector<char>::const_iterator>
             &data_range) {
           this->unpack_callback(cell_, status, data_range, all_out);
@@ -268,10 +262,9 @@ namespace parallel
 
 
 
-    template <int dim, typename VectorType, typename DoFHandlerType>
+    template <int dim, typename VectorType, int spacedim>
     void
-    SolutionTransfer<dim, VectorType, DoFHandlerType>::interpolate(
-      VectorType &out)
+    SolutionTransfer<dim, VectorType, spacedim>::interpolate(VectorType &out)
     {
       std::vector<VectorType *> all_out(1, &out);
       interpolate(all_out);
@@ -279,16 +272,14 @@ namespace parallel
 
 
 
-    template <int dim, typename VectorType, typename DoFHandlerType>
+    template <int dim, typename VectorType, int spacedim>
     std::vector<char>
-    SolutionTransfer<dim, VectorType, DoFHandlerType>::pack_callback(
-      const typename Triangulation<dim, DoFHandlerType::space_dimension>::
-        cell_iterator &cell_,
-      const typename Triangulation<dim,
-                                   DoFHandlerType::space_dimension>::CellStatus
-        status)
+    SolutionTransfer<dim, VectorType, spacedim>::pack_callback(
+      const typename Triangulation<dim, spacedim>::cell_iterator &cell_,
+      const typename Triangulation<dim, spacedim>::CellStatus     status)
     {
-      typename DoFHandlerType::cell_iterator cell(*cell_, dof_handler);
+      typename DoFHandler<dim, spacedim>::cell_iterator cell(*cell_,
+                                                             dof_handler);
 
       // create buffer for each individual object
       std::vector<::dealii::Vector<typename VectorType::value_type>> dof_values(
@@ -299,20 +290,17 @@ namespace parallel
         {
           switch (status)
             {
-              case parallel::distributed::Triangulation<
-                dim,
-                DoFHandlerType::space_dimension>::CELL_PERSIST:
-              case parallel::distributed::Triangulation<
-                dim,
-                DoFHandlerType::space_dimension>::CELL_REFINE:
+              case parallel::distributed::Triangulation<dim,
+                                                        spacedim>::CELL_PERSIST:
+              case parallel::distributed::Triangulation<dim,
+                                                        spacedim>::CELL_REFINE:
                 {
                   fe_index = cell->future_fe_index();
                   break;
                 }
 
-              case parallel::distributed::Triangulation<
-                dim,
-                DoFHandlerType::space_dimension>::CELL_COARSEN:
+              case parallel::distributed::Triangulation<dim,
+                                                        spacedim>::CELL_COARSEN:
                 {
                   // In case of coarsening, we need to find a suitable FE index
                   // for the parent cell. We choose the 'least dominant fe'
@@ -325,9 +313,7 @@ namespace parallel
 #  endif
 
                   fe_index = dealii::internal::hp::DoFHandlerImplementation::
-                    dominated_future_fe_on_children<
-                      dim,
-                      DoFHandlerType::space_dimension>(cell);
+                    dominated_future_fe_on_children<dim, spacedim>(cell);
                   break;
                 }
 
@@ -357,39 +343,34 @@ namespace parallel
 
 
 
-    template <int dim, typename VectorType, typename DoFHandlerType>
+    template <int dim, typename VectorType, int spacedim>
     void
-    SolutionTransfer<dim, VectorType, DoFHandlerType>::unpack_callback(
-      const typename Triangulation<dim, DoFHandlerType::space_dimension>::
-        cell_iterator &cell_,
-      const typename Triangulation<dim,
-                                   DoFHandlerType::space_dimension>::CellStatus
-        status,
+    SolutionTransfer<dim, VectorType, spacedim>::unpack_callback(
+      const typename Triangulation<dim, spacedim>::cell_iterator &cell_,
+      const typename Triangulation<dim, spacedim>::CellStatus     status,
       const boost::iterator_range<std::vector<char>::const_iterator>
         &                        data_range,
       std::vector<VectorType *> &all_out)
     {
-      typename DoFHandlerType::cell_iterator cell(*cell_, dof_handler);
+      typename DoFHandler<dim, spacedim>::cell_iterator cell(*cell_,
+                                                             dof_handler);
 
       unsigned int fe_index = 0;
       if (dof_handler->has_hp_capabilities())
         {
           switch (status)
             {
-              case parallel::distributed::Triangulation<
-                dim,
-                DoFHandlerType::space_dimension>::CELL_PERSIST:
-              case parallel::distributed::Triangulation<
-                dim,
-                DoFHandlerType::space_dimension>::CELL_COARSEN:
+              case parallel::distributed::Triangulation<dim,
+                                                        spacedim>::CELL_PERSIST:
+              case parallel::distributed::Triangulation<dim,
+                                                        spacedim>::CELL_COARSEN:
                 {
                   fe_index = cell->active_fe_index();
                   break;
                 }
 
-              case parallel::distributed::Triangulation<
-                dim,
-                DoFHandlerType::space_dimension>::CELL_REFINE:
+              case parallel::distributed::Triangulation<dim,
+                                                        spacedim>::CELL_REFINE:
                 {
                   // After refinement, this particular cell is no longer active,
                   // and its children have inherited its FE index. However, to
index 21e16ab73b3d86df66f12a28aeb5b9f78dba13aa..fb373fa7935d6459a6031e031c7fd98c1cb7b106 100644 (file)
 
 
 
-for (DoFHandler : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS;
-     deal_II_space_dimension : SPACE_DIMENSIONS)
+for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
   {
     namespace parallel
     \{
       namespace distributed
       \{
 #if deal_II_dimension <= deal_II_space_dimension
-        template class SolutionTransfer<
-          deal_II_dimension,
-          ::dealii::Vector<double>,
-          DoFHandler<deal_II_dimension, deal_II_space_dimension>>;
+        template class SolutionTransfer<deal_II_dimension,
+                                        ::dealii::Vector<double>,
+                                        deal_II_space_dimension>;
         template class SolutionTransfer<
           deal_II_dimension,
           ::dealii::LinearAlgebra::distributed::Vector<double>,
-          DoFHandler<deal_II_dimension, deal_II_space_dimension>>;
+          deal_II_space_dimension>;
         template class SolutionTransfer<
           deal_II_dimension,
           ::dealii::LinearAlgebra::distributed::Vector<float>,
-          DoFHandler<deal_II_dimension, deal_II_space_dimension>>;
+          deal_II_space_dimension>;
         template class SolutionTransfer<
           deal_II_dimension,
           ::dealii::LinearAlgebra::distributed::BlockVector<double>,
-          DoFHandler<deal_II_dimension, deal_II_space_dimension>>;
+          deal_II_space_dimension>;
         template class SolutionTransfer<
           deal_II_dimension,
           ::dealii::LinearAlgebra::distributed::BlockVector<float>,
-          DoFHandler<deal_II_dimension, deal_II_space_dimension>>;
+          deal_II_space_dimension>;
 
 
 #  ifdef DEAL_II_WITH_PETSC
-        template class SolutionTransfer<
-          deal_II_dimension,
-          PETScWrappers::MPI::Vector,
-          DoFHandler<deal_II_dimension, deal_II_space_dimension>>;
-        template class SolutionTransfer<
-          deal_II_dimension,
-          PETScWrappers::MPI::BlockVector,
-          DoFHandler<deal_II_dimension, deal_II_space_dimension>>;
+        template class SolutionTransfer<deal_II_dimension,
+                                        PETScWrappers::MPI::Vector,
+                                        deal_II_space_dimension>;
+        template class SolutionTransfer<deal_II_dimension,
+                                        PETScWrappers::MPI::BlockVector,
+                                        deal_II_space_dimension>;
 #  endif
 
 #  ifdef DEAL_II_WITH_TRILINOS
-        template class SolutionTransfer<
-          deal_II_dimension,
-          TrilinosWrappers::MPI::Vector,
-          DoFHandler<deal_II_dimension, deal_II_space_dimension>>;
-        template class SolutionTransfer<
-          deal_II_dimension,
-          TrilinosWrappers::MPI::BlockVector,
-          DoFHandler<deal_II_dimension, deal_II_space_dimension>>;
+        template class SolutionTransfer<deal_II_dimension,
+                                        TrilinosWrappers::MPI::Vector,
+                                        deal_II_space_dimension>;
+        template class SolutionTransfer<deal_II_dimension,
+                                        TrilinosWrappers::MPI::BlockVector,
+                                        deal_II_space_dimension>;
 #  endif
 
 #endif
index 2f7cd9009f6da1c464f83e9036503f83bb552b89..6e1ccd82aec1f1007bc1fa73134e4f72d4bf5626 100644 (file)
@@ -3740,7 +3740,7 @@ GridOut::write_mesh_per_processor_as_vtu(
             (filename_without_extension + ".pvtu");
           std::ofstream pvtu_output(pvtu_filename.c_str());
 
-          DataOut<dim, DoFHandler<dim, spacedim>> data_out;
+          DataOut<dim, spacedim> data_out;
           data_out.attach_triangulation(*tr);
 
           // We need a dummy vector with the names of the data values in the
index 113a3e350c955a5ed0a426ee574ff1ccf575022a..2507c7d819b7980d60fcc398d4d9420524f5d839 100644 (file)
@@ -65,8 +65,8 @@ namespace internal
 
 
 
-template <int dim, typename DoFHandlerType>
-DataOut<dim, DoFHandlerType>::DataOut()
+template <int dim, int spacedim>
+DataOut<dim, spacedim>::DataOut()
 {
   // For the moment, just call the existing virtual functions. This
   // preserves backward compatibility. When these deprecated functions are
@@ -83,28 +83,25 @@ DataOut<dim, DoFHandlerType>::DataOut()
 
 
 
-template <int dim, typename DoFHandlerType>
+template <int dim, int spacedim>
 void
-DataOut<dim, DoFHandlerType>::build_one_patch(
-  const std::pair<cell_iterator, unsigned int> *cell_and_index,
-  internal::DataOutImplementation::ParallelData<DoFHandlerType::dimension,
-                                                DoFHandlerType::space_dimension>
-    &                    scratch_data,
-  const unsigned int     n_subdivisions,
+DataOut<dim, spacedim>::build_one_patch(
+  const std::pair<cell_iterator, unsigned int> *                cell_and_index,
+  internal::DataOutImplementation::ParallelData<dim, spacedim> &scratch_data,
+  const unsigned int                                            n_subdivisions,
   const CurvedCellRegion curved_cell_region)
 {
   // first create the output object that we will write into
-  ::dealii::DataOutBase::Patch<DoFHandlerType::dimension,
-                               DoFHandlerType::space_dimension>
-    patch;
+
+  ::dealii::DataOutBase::Patch<dim, spacedim> patch;
   patch.n_subdivisions = n_subdivisions;
   patch.reference_cell = cell_and_index->first->reference_cell();
 
   // initialize FEValues
   scratch_data.reinit_all_fe_values(this->dof_data, cell_and_index->first);
 
-  const FEValuesBase<DoFHandlerType::dimension, DoFHandlerType::space_dimension>
-    &fe_patch_values = scratch_data.get_present_fe_values(0);
+  const FEValuesBase<dim, spacedim> &fe_patch_values =
+    scratch_data.get_present_fe_values(0);
 
   // set the vertices of the patch. if the mapping does not preserve locations
   // (e.g. MappingQEulerian), we need to compute the offset of the vertex for
@@ -115,8 +112,7 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
     else
       patch.vertices[vertex] =
         fe_patch_values.get_mapping().transform_unit_to_real_cell(
-          cell_and_index->first,
-          GeometryInfo<DoFHandlerType::dimension>::unit_cell_vertex(vertex));
+          cell_and_index->first, GeometryInfo<dim>::unit_cell_vertex(vertex));
 
   const unsigned int n_q_points = fe_patch_values.n_quadrature_points;
 
@@ -145,13 +141,11 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
   // note: a cell is *always* at the boundary if dim<spacedim
   if (curved_cell_region == curved_inner_cells ||
       (curved_cell_region == curved_boundary &&
-       (cell_and_index->first->at_boundary() ||
-        (DoFHandlerType::dimension != DoFHandlerType::space_dimension))) ||
+       (cell_and_index->first->at_boundary() || (dim != spacedim))) ||
       (cell_and_index->first->reference_cell() !=
        ReferenceCells::get_hypercube<dim>()))
     {
-      Assert(patch.space_dim == DoFHandlerType::space_dimension,
-             ExcInternalError());
+      Assert(patch.space_dim == spacedim, ExcInternalError());
 
       // set the flag indicating that for this cell the points are
       // explicitly given
@@ -159,16 +153,13 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
 
       // then resize the patch.data member in order to have enough memory for
       // the quadrature points as well, and copy the quadrature points there
-      const std::vector<Point<DoFHandlerType::space_dimension>> &q_points =
+      const std::vector<Point<spacedim>> &q_points =
         fe_patch_values.get_quadrature_points();
 
-      patch.data.reinit(scratch_data.n_datasets +
-                          DoFHandlerType::space_dimension,
-                        n_q_points);
-      for (unsigned int i = 0; i < DoFHandlerType::space_dimension; ++i)
+      patch.data.reinit(scratch_data.n_datasets + spacedim, n_q_points);
+      for (unsigned int i = 0; i < spacedim; ++i)
         for (unsigned int q = 0; q < n_q_points; ++q)
-          patch.data(patch.data.size(0) - DoFHandlerType::space_dimension + i,
-                     q) = q_points[q][i];
+          patch.data(patch.data.size(0) - spacedim + i, q) = q_points[q][i];
     }
   else
     {
@@ -187,15 +178,13 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
       unsigned int dataset_number = 0;
       for (const auto &dataset : this->dof_data)
         {
-          const FEValuesBase<DoFHandlerType::dimension,
-                             DoFHandlerType::space_dimension>
-            &this_fe_patch_values =
-              scratch_data.get_present_fe_values(dataset_number);
+          const FEValuesBase<dim, spacedim> &this_fe_patch_values =
+            scratch_data.get_present_fe_values(dataset_number);
           const unsigned int n_components =
             this_fe_patch_values.get_fe().n_components();
 
-          const DataPostprocessor<DoFHandlerType::space_dimension>
-            *postprocessor = dataset->postprocessor;
+          const DataPostprocessor<spacedim> *postprocessor =
+            dataset->postprocessor;
 
           if (postprocessor != nullptr)
             {
@@ -240,11 +229,11 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
                     scratch_data.patch_values_scalar.evaluation_points =
                       this_fe_patch_values.get_quadrature_points();
 
-                  const typename DoFHandlerType::cell_iterator dh_cell(
-                    &cell_and_index->first->get_triangulation(),
-                    cell_and_index->first->level(),
-                    cell_and_index->first->index(),
-                    dataset->dof_handler);
+                  const typename DoFHandler<dim, spacedim>::cell_iterator
+                    dh_cell(&cell_and_index->first->get_triangulation(),
+                            cell_and_index->first->level(),
+                            cell_and_index->first->index(),
+                            dataset->dof_handler);
                   scratch_data.patch_values_scalar.template set_cell<dim>(
                     dh_cell);
 
@@ -550,14 +539,10 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
                           // Now do the exact same thing for the gradients
                           if (update_flags & update_gradients)
                             {
-                              std::vector<std::vector<
-                                Tensor<1, DoFHandlerType::space_dimension>>>
-                                tmp(
-                                  scratch_data.patch_values_system
-                                    .solution_gradients.size(),
-                                  std::vector<
-                                    Tensor<1, DoFHandlerType::space_dimension>>(
-                                    n_components));
+                              std::vector<std::vector<Tensor<1, spacedim>>> tmp(
+                                scratch_data.patch_values_system
+                                  .solution_gradients.size(),
+                                std::vector<Tensor<1, spacedim>>(n_components));
 
                               // First the real part
                               dataset->get_function_gradients(
@@ -605,14 +590,10 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
                           // And finally the Hessians. Same scheme as above.
                           if (update_flags & update_hessians)
                             {
-                              std::vector<std::vector<
-                                Tensor<2, DoFHandlerType::space_dimension>>>
-                                tmp(
-                                  scratch_data.patch_values_system
-                                    .solution_gradients.size(),
-                                  std::vector<
-                                    Tensor<2, DoFHandlerType::space_dimension>>(
-                                    n_components));
+                              std::vector<std::vector<Tensor<2, spacedim>>> tmp(
+                                scratch_data.patch_values_system
+                                  .solution_gradients.size(),
+                                std::vector<Tensor<2, spacedim>>(n_components));
 
                               // First the real part
                               dataset->get_function_hessians(
@@ -664,11 +645,11 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
                     scratch_data.patch_values_system.evaluation_points =
                       this_fe_patch_values.get_quadrature_points();
 
-                  const typename DoFHandlerType::cell_iterator dh_cell(
-                    &cell_and_index->first->get_triangulation(),
-                    cell_and_index->first->level(),
-                    cell_and_index->first->index(),
-                    dataset->dof_handler);
+                  const typename DoFHandler<dim, spacedim>::cell_iterator
+                    dh_cell(&cell_and_index->first->get_triangulation(),
+                            cell_and_index->first->level(),
+                            cell_and_index->first->index(),
+                            dataset->dof_handler);
                   scratch_data.patch_values_system.template set_cell<dim>(
                     dh_cell);
 
@@ -839,7 +820,7 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
                                   component_is_part_of_vector:
                                   {
                                     // A vector component. Put the
-                                    // DoFHandlerType::space_dimension
+                                    // spacedim
                                     // components into the next set of
                                     // contiguous rows
                                     // ('destination+c'); then move 'component'
@@ -849,8 +830,7 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
                                     // (because we're going to put the imaginary
                                     // part of the vector into the subsequent
                                     // spacedim slots).
-                                    const unsigned int size =
-                                      DoFHandlerType::space_dimension;
+                                    const unsigned int size = spacedim;
                                     for (unsigned int c = 0; c < size; ++c)
                                       for (unsigned int q = 0; q < n_q_points;
                                            ++q)
@@ -869,8 +849,7 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
                                   {
                                     // Same approach as for vectors above.
                                     const unsigned int size =
-                                      DoFHandlerType::space_dimension *
-                                      DoFHandlerType::space_dimension;
+                                      spacedim * spacedim;
                                     for (unsigned int c = 0; c < size; ++c)
                                       for (unsigned int q = 0; q < n_q_points;
                                            ++q)
@@ -930,12 +909,11 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
                                   component_is_part_of_vector:
                                   {
                                     // A vector component. Put the
-                                    // DoFHandlerType::space_dimension
+                                    // spacedim
                                     // components into the set of contiguous
                                     // rows that follow the real parts
                                     // ('destination+spacedim+c').
-                                    const unsigned int size =
-                                      DoFHandlerType::space_dimension;
+                                    const unsigned int size = spacedim;
                                     for (unsigned int c = 0; c < size; ++c)
                                       for (unsigned int q = 0; q < n_q_points;
                                            ++q)
@@ -954,8 +932,7 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
                                   {
                                     // Same as for vectors.
                                     const unsigned int size =
-                                      DoFHandlerType::space_dimension *
-                                      DoFHandlerType::space_dimension;
+                                      spacedim * spacedim;
                                     for (unsigned int c = 0; c < size; ++c)
                                       for (unsigned int q = 0; q < n_q_points;
                                            ++q)
@@ -1052,7 +1029,7 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
            (*scratch_data.cell_to_patch_index_map)[neighbor->level()].size()) ||
           ((*scratch_data.cell_to_patch_index_map)[neighbor->level()]
                                                   [neighbor->index()] ==
-           dealii::DataOutBase::Patch<DoFHandlerType::dimension>::no_neighbor))
+           dealii::DataOutBase::Patch<dim>::no_neighbor))
         {
           patch.neighbors[f] = numbers::invalid_unsigned_int;
           continue;
@@ -1080,50 +1057,42 @@ DataOut<dim, DoFHandlerType>::build_one_patch(
 
 
 
-template <int dim, typename DoFHandlerType>
+template <int dim, int spacedim>
 void
-DataOut<dim, DoFHandlerType>::build_patches(const unsigned int n_subdivisions)
+DataOut<dim, spacedim>::build_patches(const unsigned int n_subdivisions)
 {
   AssertDimension(this->triangulation->get_reference_cells().size(), 1);
 
-  build_patches(
-    this->triangulation->get_reference_cells()[0]
-      .template get_default_linear_mapping<DoFHandlerType::dimension,
-                                           DoFHandlerType::space_dimension>(),
-    n_subdivisions,
-    no_curved_cells);
+  build_patches(this->triangulation->get_reference_cells()[0]
+                  .template get_default_linear_mapping<dim, spacedim>(),
+                n_subdivisions,
+                no_curved_cells);
 }
 
 
 
-template <int dim, typename DoFHandlerType>
+template <int dim, int spacedim>
 void
-DataOut<dim, DoFHandlerType>::build_patches(
-  const Mapping<DoFHandlerType::dimension, DoFHandlerType::space_dimension>
-    &                    mapping,
-  const unsigned int     n_subdivisions_,
-  const CurvedCellRegion curved_region)
+DataOut<dim, spacedim>::build_patches(const Mapping<dim, spacedim> &mapping,
+                                      const unsigned int     n_subdivisions_,
+                                      const CurvedCellRegion curved_region)
 {
-  hp::MappingCollection<DoFHandlerType::dimension,
-                        DoFHandlerType::space_dimension>
-    mapping_collection(mapping);
+  hp::MappingCollection<dim, spacedim> mapping_collection(mapping);
 
   build_patches(mapping_collection, n_subdivisions_, curved_region);
 }
 
 
 
-template <int dim, typename DoFHandlerType>
+template <int dim, int spacedim>
 void
-DataOut<dim, DoFHandlerType>::build_patches(
-  const hp::MappingCollection<DoFHandlerType::dimension,
-                              DoFHandlerType::space_dimension> &mapping,
-  const unsigned int                                            n_subdivisions_,
-  const CurvedCellRegion                                        curved_region)
+DataOut<dim, spacedim>::build_patches(
+  const hp::MappingCollection<dim, spacedim> &mapping,
+  const unsigned int                          n_subdivisions_,
+  const CurvedCellRegion                      curved_region)
 {
   // Check consistency of redundant template parameter
-  Assert(dim == DoFHandlerType::dimension,
-         ExcDimensionMismatch(dim, DoFHandlerType::dimension));
+  Assert(dim == dim, ExcDimensionMismatch(dim, dim));
 
   Assert(this->triangulation != nullptr,
          Exceptions::DataOutImplementation::ExcNoTriangulationSelected());
@@ -1166,10 +1135,7 @@ DataOut<dim, DoFHandlerType>::build_patches(
             std::max(max_index, static_cast<unsigned int>(cell->index()));
 
       cell_to_patch_index_map[l].resize(
-        max_index + 1,
-        dealii::DataOutBase::Patch<
-          DoFHandlerType::dimension,
-          DoFHandlerType::space_dimension>::no_neighbor);
+        max_index + 1, dealii::DataOutBase::Patch<dim, spacedim>::no_neighbor);
     }
 
   // will be all_cells[patch_index] = pair(cell, active_index)
@@ -1259,21 +1225,19 @@ DataOut<dim, DoFHandlerType>::build_patches(
       "The update of normal vectors may not be requested for evaluation of "
       "data on cells via DataPostprocessor."));
 
-  internal::DataOutImplementation::ParallelData<DoFHandlerType::dimension,
-                                                DoFHandlerType::space_dimension>
-    thread_data(n_datasets,
-                n_subdivisions,
-                n_postprocessor_outputs,
-                mapping,
-                this->get_fes(),
-                update_flags,
-                cell_to_patch_index_map);
+  internal::DataOutImplementation::ParallelData<dim, spacedim> thread_data(
+    n_datasets,
+    n_subdivisions,
+    n_postprocessor_outputs,
+    mapping,
+    this->get_fes(),
+    update_flags,
+    cell_to_patch_index_map);
 
   auto worker = [this, n_subdivisions, curved_cell_region](
                   const std::pair<cell_iterator, unsigned int> *cell_and_index,
-                  internal::DataOutImplementation::ParallelData<
-                    DoFHandlerType::dimension,
-                    DoFHandlerType::space_dimension> &scratch_data,
+                  internal::DataOutImplementation::ParallelData<dim, spacedim>
+                    &scratch_data,
                   // this function doesn't actually need a copy data object --
                   // it just writes everything right into the output array
                   int) {
@@ -1304,9 +1268,9 @@ DataOut<dim, DoFHandlerType>::build_patches(
 
 
 
-template <int dim, typename DoFHandlerType>
+template <int dim, int spacedim>
 void
-DataOut<dim, DoFHandlerType>::set_cell_selection(
+DataOut<dim, spacedim>::set_cell_selection(
   const std::function<cell_iterator(const Triangulation<dim, spacedim> &)>
     &                                                        first_cell,
   const std::function<cell_iterator(const Triangulation<dim, spacedim> &,
@@ -1318,9 +1282,9 @@ DataOut<dim, DoFHandlerType>::set_cell_selection(
 
 
 
-template <int dim, typename DoFHandlerType>
+template <int dim, int spacedim>
 void
-DataOut<dim, DoFHandlerType>::set_cell_selection(
+DataOut<dim, spacedim>::set_cell_selection(
   const FilteredIterator<cell_iterator> &filtered_iterator)
 {
   const auto first_cell =
@@ -1359,46 +1323,45 @@ DataOut<dim, DoFHandlerType>::set_cell_selection(
 
 
 
-template <int dim, typename DoFHandlerType>
-const std::pair<typename DataOut<dim, DoFHandlerType>::FirstCellFunctionType,
-                typename DataOut<dim, DoFHandlerType>::NextCellFunctionType>
-DataOut<dim, DoFHandlerType>::get_cell_selection() const
+template <int dim, int spacedim>
+const std::pair<typename DataOut<dim, spacedim>::FirstCellFunctionType,
+                typename DataOut<dim, spacedim>::NextCellFunctionType>
+DataOut<dim, spacedim>::get_cell_selection() const
 {
   return std::make_pair(first_cell_function, next_cell_function);
 }
 
 
 
-template <int dim, typename DoFHandlerType>
-typename DataOut<dim, DoFHandlerType>::cell_iterator
-DataOut<dim, DoFHandlerType>::first_cell()
+template <int dim, int spacedim>
+typename DataOut<dim, spacedim>::cell_iterator
+DataOut<dim, spacedim>::first_cell()
 {
   return this->triangulation->begin_active();
 }
 
 
 
-template <int dim, typename DoFHandlerType>
-typename DataOut<dim, DoFHandlerType>::cell_iterator
-DataOut<dim, DoFHandlerType>::next_cell(
-  const typename DataOut<dim, DoFHandlerType>::cell_iterator &cell)
+template <int dim, int spacedim>
+typename DataOut<dim, spacedim>::cell_iterator
+DataOut<dim, spacedim>::next_cell(
+  const typename DataOut<dim, spacedim>::cell_iterator &cell)
 {
   // convert the iterator to an active_iterator and advance this to the next
   // active cell
-  typename Triangulation<DoFHandlerType::dimension,
-                         DoFHandlerType::space_dimension>::active_cell_iterator
-    active_cell = cell;
+  typename Triangulation<dim, spacedim>::active_cell_iterator active_cell =
+    cell;
   ++active_cell;
   return active_cell;
 }
 
 
 
-template <int dim, typename DoFHandlerType>
-typename DataOut<dim, DoFHandlerType>::cell_iterator
-DataOut<dim, DoFHandlerType>::first_locally_owned_cell()
+template <int dim, int spacedim>
+typename DataOut<dim, spacedim>::cell_iterator
+DataOut<dim, spacedim>::first_locally_owned_cell()
 {
-  typename DataOut<dim, DoFHandlerType>::cell_iterator cell = first_cell();
+  typename DataOut<dim, spacedim>::cell_iterator cell = first_cell();
 
   // skip cells if the current one has no children (is active) and is a ghost
   // or artificial cell
@@ -1411,13 +1374,12 @@ DataOut<dim, DoFHandlerType>::first_locally_owned_cell()
 
 
 
-template <int dim, typename DoFHandlerType>
-typename DataOut<dim, DoFHandlerType>::cell_iterator
-DataOut<dim, DoFHandlerType>::next_locally_owned_cell(
-  const typename DataOut<dim, DoFHandlerType>::cell_iterator &old_cell)
+template <int dim, int spacedim>
+typename DataOut<dim, spacedim>::cell_iterator
+DataOut<dim, spacedim>::next_locally_owned_cell(
+  const typename DataOut<dim, spacedim>::cell_iterator &old_cell)
 {
-  typename DataOut<dim, DoFHandlerType>::cell_iterator cell =
-    next_cell(old_cell);
+  typename DataOut<dim, spacedim>::cell_iterator cell = next_cell(old_cell);
   while ((cell != this->triangulation->end()) && cell->is_active() &&
          !cell->is_locally_owned())
     cell = next_cell(cell);
index 83ab6315fd909e30c19bf88484c084fa85a658a2..4bec09f3ef4e9025bff5dc5dafc407455031a6b0 100644 (file)
@@ -30,15 +30,14 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : DIMENSIONS)
   }
 
 
-for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS)
+for (deal_II_dimension : DIMENSIONS)
   {
-    template class DataOut<deal_II_dimension, DH<deal_II_dimension>>;
+    template class DataOut<deal_II_dimension>;
 #if deal_II_dimension < 3
-    template class DataOut<deal_II_dimension,
-                           DH<deal_II_dimension, deal_II_dimension + 1>>;
+    template class DataOut<deal_II_dimension, deal_II_dimension + 1>;
 #endif
 
 #if deal_II_dimension == 3
-    template class DataOut<1, DH<1, 3>>;
+    template class DataOut<1, 3>;
 #endif
   }
index 559cf27b97d9b05871ccc0537a43acd33c9c2037..74098f7f7c2aee2d9cb856e618b80c7d5e86eab7 100644 (file)
 // ---------------------------------------------------------------------
 
 
-for (VEC : VECTOR_TYPES; DH : DOFHANDLER_TEMPLATES;
-     deal_II_dimension : DIMENSIONS)
+for (VEC : VECTOR_TYPES; deal_II_dimension : DIMENSIONS)
   {
-    template void DataOut_DoFData<DH<deal_II_dimension, deal_II_dimension>,
-                                  deal_II_dimension,
-                                  deal_II_dimension>::
+    template void DataOut_DoFData<deal_II_dimension, deal_II_dimension>::
       add_data_vector_internal<VEC>(
-        const DH<deal_II_dimension, deal_II_dimension> *,
+        const DoFHandler<deal_II_dimension> *,
         const VEC &,
         const std::vector<std::string> &,
         const DataVectorType,
@@ -29,42 +26,37 @@ for (VEC : VECTOR_TYPES; DH : DOFHANDLER_TEMPLATES;
           DataComponentInterpretation::DataComponentInterpretation> &,
         const bool);
 
-    template void DataOut_DoFData<DH<deal_II_dimension, deal_II_dimension>,
-                                  deal_II_dimension,
-                                  deal_II_dimension>::
-      add_data_vector<VEC>(
-        const DH<deal_II_dimension, deal_II_dimension> &,
-        const VEC &,
-        const DataPostprocessor<
-          DH<deal_II_dimension, deal_II_dimension>::space_dimension> &);
+    template void
+    DataOut_DoFData<deal_II_dimension, deal_II_dimension>::add_data_vector<VEC>(
+      const DoFHandler<deal_II_dimension> &,
+      const VEC &,
+      const DataPostprocessor<DoFHandler<deal_II_dimension>::space_dimension>
+        &);
 
 
-    template void DataOut_DoFData<DH<deal_II_dimension, deal_II_dimension>,
-                                  deal_II_dimension,
-                                  deal_II_dimension>::
-      add_mg_data_vector<VEC>(const DH<deal_II_dimension, deal_II_dimension> &,
+    template void DataOut_DoFData<deal_II_dimension, deal_II_dimension>::
+      add_mg_data_vector<VEC>(const DoFHandler<deal_II_dimension> &,
                               const MGLevelObject<VEC> &,
                               const std::string &);
 
-    template void DataOut_DoFData<DH<deal_II_dimension, deal_II_dimension>,
-                                  deal_II_dimension,
-                                  deal_II_dimension>::
-      add_mg_data_vector<VEC>(
-        const DH<deal_II_dimension, deal_II_dimension> &,
-        const MGLevelObject<VEC> &,
-        const std::vector<std::string> &,
-        const std::vector<
-          DataComponentInterpretation::DataComponentInterpretation> &);
+    template void
+    DataOut_DoFData<deal_II_dimension, deal_II_dimension>::add_mg_data_vector<
+      VEC>(const DoFHandler<deal_II_dimension> &,
+           const MGLevelObject<VEC> &,
+           const std::vector<std::string> &,
+           const std::vector<
+             DataComponentInterpretation::DataComponentInterpretation> &);
 
 
 
     // stuff needed for face data
 
-    template void DataOut_DoFData<DH<deal_II_dimension, deal_II_dimension>,
+    template void DataOut_DoFData<deal_II_dimension,
                                   deal_II_dimension - 1,
+                                  deal_II_dimension,
                                   deal_II_dimension>::
       add_data_vector_internal<VEC>(
-        const DH<deal_II_dimension, deal_II_dimension> *,
+        const DoFHandler<deal_II_dimension> *,
         const VEC &,
         const std::vector<std::string> &,
         const DataVectorType,
@@ -72,25 +64,24 @@ for (VEC : VECTOR_TYPES; DH : DOFHANDLER_TEMPLATES;
           DataComponentInterpretation::DataComponentInterpretation> &,
         const bool);
 
-    template void DataOut_DoFData<DH<deal_II_dimension, deal_II_dimension>,
+    template void DataOut_DoFData<deal_II_dimension,
                                   deal_II_dimension - 1,
+                                  deal_II_dimension,
                                   deal_II_dimension>::
       add_data_vector<VEC>(
-        const DH<deal_II_dimension, deal_II_dimension> &,
+        const DoFHandler<deal_II_dimension> &,
         const VEC &,
-        const DataPostprocessor<
-          DH<deal_II_dimension, deal_II_dimension>::space_dimension> &);
+        const DataPostprocessor<DoFHandler<deal_II_dimension>::space_dimension>
+          &);
 
 
 
     // things for DataOutRotation
 
 #if deal_II_dimension < 3
-    template void DataOut_DoFData<DH<deal_II_dimension, deal_II_dimension>,
-                                  deal_II_dimension + 1,
-                                  deal_II_dimension + 1>::
+    template void DataOut_DoFData<deal_II_dimension, deal_II_dimension + 1>::
       add_data_vector_internal<VEC>(
-        const DH<deal_II_dimension, deal_II_dimension> *,
+        const DoFHandler<deal_II_dimension> *,
         const VEC &,
         const std::vector<std::string> &,
         const DataVectorType,
@@ -98,45 +89,40 @@ for (VEC : VECTOR_TYPES; DH : DOFHANDLER_TEMPLATES;
           DataComponentInterpretation::DataComponentInterpretation> &,
         const bool);
 
-    template void DataOut_DoFData<DH<deal_II_dimension, deal_II_dimension>,
-                                  deal_II_dimension + 1,
-                                  deal_II_dimension + 1>::
+    template void DataOut_DoFData<deal_II_dimension, deal_II_dimension + 1>::
       add_data_vector<VEC>(
-        const DH<deal_II_dimension, deal_II_dimension> &,
+        const DoFHandler<deal_II_dimension> &,
         const VEC &,
-        const DataPostprocessor<
-          DH<deal_II_dimension, deal_II_dimension>::space_dimension> &);
+        const DataPostprocessor<DoFHandler<deal_II_dimension>::space_dimension>
+          &);
 #endif
   }
 
 
 
-for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS)
+for (deal_II_dimension : DIMENSIONS)
   {
-    template class DataOut_DoFData<DH<deal_II_dimension>, deal_II_dimension>;
+    template class DataOut_DoFData<deal_II_dimension, deal_II_dimension>;
 
 #if deal_II_dimension < 3
-    template class DataOut_DoFData<DH<deal_II_dimension>,
-                                   deal_II_dimension + 1>;
-    template class DataOut_DoFData<DH<deal_II_dimension>,
+    template class DataOut_DoFData<deal_II_dimension, deal_II_dimension + 1>;
+    template class DataOut_DoFData<deal_II_dimension,
+                                   deal_II_dimension,
                                    deal_II_dimension,
                                    deal_II_dimension + 1>;
 #endif
 
 #if deal_II_dimension >= 2
-    template class DataOut_DoFData<DH<deal_II_dimension>,
+    template class DataOut_DoFData<deal_II_dimension,
                                    deal_II_dimension - 1,
+                                   deal_II_dimension,
                                    deal_II_dimension>;
 #endif
 
 #if deal_II_dimension == 3
-    template class DataOut_DoFData<DH<1>, 1, 3>;
+    template class DataOut_DoFData<1, 1, 1, 3>;
 #endif
-  }
-
 
-for (deal_II_dimension : DIMENSIONS)
-  {
     namespace internal
     \{
       namespace DataOutImplementation
index 4efedc0e654727c5f4f02e9128eb3256b4cf05ad..fe8b24e2cb7d8c47196dfeb54d84db6505934d9e 100644 (file)
 // ---------------------------------------------------------------------
 
 
-for (VEC : REAL_VECTOR_TYPES; DH : DOFHANDLER_TEMPLATES;
-     deal_II_dimension : DIMENSIONS;
+for (VEC : REAL_VECTOR_TYPES; deal_II_dimension : DIMENSIONS;
      deal_II_space_dimension : DIMENSIONS)
   {
 #if deal_II_dimension < deal_II_space_dimension
-    template void
-    DataOut_DoFData<DH<deal_II_dimension, deal_II_space_dimension>,
-                    deal_II_dimension,
-                    deal_II_space_dimension>::
+    template void DataOut_DoFData<deal_II_dimension,
+                                  deal_II_dimension,
+                                  deal_II_space_dimension,
+                                  deal_II_space_dimension>::
       add_data_vector_internal<VEC>(
-        const DH<deal_II_dimension, deal_II_space_dimension> *,
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension> *,
         const VEC &,
         const std::vector<std::string> &,
         const DataVectorType,
@@ -32,39 +31,42 @@ for (VEC : REAL_VECTOR_TYPES; DH : DOFHANDLER_TEMPLATES;
           DataComponentInterpretation::DataComponentInterpretation> &,
         const bool);
 
-    template void
-    DataOut_DoFData<DH<deal_II_dimension, deal_II_space_dimension>,
-                    deal_II_dimension,
-                    deal_II_space_dimension>::
+    template void DataOut_DoFData<deal_II_dimension,
+                                  deal_II_dimension,
+                                  deal_II_space_dimension,
+                                  deal_II_space_dimension>::
       add_data_vector<VEC>(
         const VEC &,
         const DataPostprocessor<
-          DH<deal_II_dimension, deal_II_space_dimension>::space_dimension> &);
+          DoFHandler<deal_II_dimension,
+                     deal_II_space_dimension>::space_dimension> &);
 
-    template void
-    DataOut_DoFData<DH<deal_II_dimension, deal_II_space_dimension>,
-                    deal_II_dimension,
-                    deal_II_space_dimension>::
+    template void DataOut_DoFData<deal_II_dimension,
+                                  deal_II_dimension,
+                                  deal_II_space_dimension,
+                                  deal_II_space_dimension>::
       add_data_vector<VEC>(
-        const DH<deal_II_dimension, deal_II_space_dimension> &,
+        const DoFHandler<deal_II_dimension, deal_II_space_dimension> &,
         const VEC &,
         const DataPostprocessor<
-          DH<deal_II_dimension, deal_II_space_dimension>::space_dimension> &);
+          DoFHandler<deal_II_dimension,
+                     deal_II_space_dimension>::space_dimension> &);
 #endif
   }
 
 
 
-for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS)
+for (deal_II_dimension : DIMENSIONS)
   {
 #if deal_II_dimension < 3
-    template class DataOut_DoFData<DH<deal_II_dimension, deal_II_dimension + 1>,
+    template class DataOut_DoFData<deal_II_dimension,
                                    deal_II_dimension,
+                                   deal_II_dimension + 1,
                                    deal_II_dimension + 1>;
 #endif
 
 #if deal_II_dimension == 3
-    template class DataOut_DoFData<DH<1, 3>, 1, 3>;
+    template class DataOut_DoFData<1, 1, 3, 3>;
 #endif
   }
 
index 52118e7a8644015aadf28d3a4174ce65b51b5892..1844379514980140095809a21d453a412109ed3d 100644 (file)
@@ -80,22 +80,19 @@ namespace internal
 
 
 
-template <int dim, typename DoFHandlerType>
-DataOutFaces<dim, DoFHandlerType>::DataOutFaces(const bool so)
+template <int dim, int spacedim>
+DataOutFaces<dim, spacedim>::DataOutFaces(const bool so)
   : surface_only(so)
-{
-  Assert(dim == DoFHandlerType::dimension, ExcNotImplemented());
-}
+{}
 
 
 
-template <int dim, typename DoFHandlerType>
+template <int dim, int spacedim>
 void
-DataOutFaces<dim, DoFHandlerType>::build_one_patch(
-  const FaceDescriptor *cell_and_face,
-  internal::DataOutFacesImplementation::ParallelData<dimension, dimension>
-    &                                                 data,
-  DataOutBase::Patch<dimension - 1, space_dimension> &patch)
+DataOutFaces<dim, spacedim>::build_one_patch(
+  const FaceDescriptor *                                        cell_and_face,
+  internal::DataOutFacesImplementation::ParallelData<dim, dim> &data,
+  DataOutBase::Patch<dim - 1, spacedim> &                       patch)
 {
   Assert(cell_and_face->first->is_locally_owned(), ExcNotImplemented());
 
@@ -104,12 +101,12 @@ DataOutFaces<dim, DoFHandlerType>::build_one_patch(
   // to a unit cell vertex and then, finally, that to the mapped vertex. In
   // most cases this complicated procedure will be the identity.
   for (unsigned int vertex = 0;
-       vertex < GeometryInfo<dimension - 1>::vertices_per_cell;
+       vertex < GeometryInfo<dim - 1>::vertices_per_cell;
        ++vertex)
     patch.vertices[vertex] =
       data.mapping_collection[0].transform_unit_to_real_cell(
         cell_and_face->first,
-        GeometryInfo<dimension>::unit_cell_vertex(
+        GeometryInfo<dim>::unit_cell_vertex(
           GeometryInfo<dim>::face_to_cell_vertices(
             cell_and_face->second,
             vertex,
@@ -122,25 +119,24 @@ DataOutFaces<dim, DoFHandlerType>::build_one_patch(
       data.reinit_all_fe_values(this->dof_data,
                                 cell_and_face->first,
                                 cell_and_face->second);
-      const FEValuesBase<dimension> &fe_patch_values =
-        data.get_present_fe_values(0);
+      const FEValuesBase<dim> &fe_patch_values = data.get_present_fe_values(0);
 
       const unsigned int n_q_points = fe_patch_values.n_quadrature_points;
 
       // store the intermediate points
-      Assert(patch.space_dim == dimension, ExcInternalError());
-      const std::vector<Point<dimension>> &q_points =
+      Assert(patch.space_dim == dim, ExcInternalError());
+      const std::vector<Point<dim>> &q_points =
         fe_patch_values.get_quadrature_points();
       // resize the patch.data member in order to have enough memory for the
       // quadrature points as well
-      patch.data.reinit(data.n_datasets + dimension, patch.data.size(1));
+      patch.data.reinit(data.n_datasets + dim, patch.data.size(1));
       // set the flag indicating that for this cell the points are explicitly
       // given
       patch.points_are_available = true;
       // copy points to patch.data
-      for (unsigned int i = 0; i < dimension; ++i)
+      for (unsigned int i = 0; i < dim; ++i)
         for (unsigned int q = 0; q < n_q_points; ++q)
-          patch.data(patch.data.size(0) - dimension + i, q) = q_points[q][i];
+          patch.data(patch.data.size(0) - dim + i, q) = q_points[q][i];
 
       // counter for data records
       unsigned int offset = 0;
@@ -148,7 +144,7 @@ DataOutFaces<dim, DoFHandlerType>::build_one_patch(
       // first fill dof_data
       for (unsigned int dataset = 0; dataset < this->dof_data.size(); ++dataset)
         {
-          const FEValuesBase<dimension> &this_fe_patch_values =
+          const FEValuesBase<dim> &this_fe_patch_values =
             data.get_present_fe_values(dataset);
           const unsigned int n_components =
             this_fe_patch_values.get_fe().n_components();
@@ -192,13 +188,12 @@ DataOutFaces<dim, DoFHandlerType>::build_one_patch(
                     data.patch_values_scalar.normals =
                       this_fe_patch_values.get_normal_vectors();
 
-                  const typename DoFHandlerType::active_cell_iterator dh_cell(
-                    &cell_and_face->first->get_triangulation(),
-                    cell_and_face->first->level(),
-                    cell_and_face->first->index(),
-                    this->dof_data[dataset]->dof_handler);
-                  data.patch_values_scalar.template set_cell<DoFHandlerType>(
-                    dh_cell);
+                  const typename DoFHandler<dim, spacedim>::active_cell_iterator
+                    dh_cell(&cell_and_face->first->get_triangulation(),
+                            cell_and_face->first->level(),
+                            cell_and_face->first->index(),
+                            this->dof_data[dataset]->dof_handler);
+                  data.patch_values_scalar.template set_cell<dim>(dh_cell);
 
                   postprocessor->evaluate_scalar_field(
                     data.patch_values_scalar,
@@ -236,13 +231,12 @@ DataOutFaces<dim, DoFHandlerType>::build_one_patch(
                     data.patch_values_system.normals =
                       this_fe_patch_values.get_normal_vectors();
 
-                  const typename DoFHandlerType::active_cell_iterator dh_cell(
-                    &cell_and_face->first->get_triangulation(),
-                    cell_and_face->first->level(),
-                    cell_and_face->first->index(),
-                    this->dof_data[dataset]->dof_handler);
-                  data.patch_values_system.template set_cell<DoFHandlerType>(
-                    dh_cell);
+                  const typename DoFHandler<dim, spacedim>::active_cell_iterator
+                    dh_cell(&cell_and_face->first->get_triangulation(),
+                            cell_and_face->first->level(),
+                            cell_and_face->first->index(),
+                            this->dof_data[dataset]->dof_handler);
+                  data.patch_values_system.template set_cell<dim>(dh_cell);
 
                   postprocessor->evaluate_vector_field(
                     data.patch_values_system,
@@ -300,10 +294,10 @@ DataOutFaces<dim, DoFHandlerType>::build_one_patch(
               "The current function is trying to generate cell-data output "
               "for a face that does not belong to an active cell. This is "
               "not supported."));
-          const unsigned int cell_number =
-            std::distance(this->triangulation->begin_active(),
-                          typename Triangulation<dimension, space_dimension>::
-                            active_cell_iterator(cell_and_face->first));
+          const unsigned int cell_number = std::distance(
+            this->triangulation->begin_active(),
+            typename Triangulation<dim, spacedim>::active_cell_iterator(
+              cell_and_face->first));
 
           const double value = this->cell_data[dataset]->get_cell_data_value(
             cell_number,
@@ -316,25 +310,20 @@ DataOutFaces<dim, DoFHandlerType>::build_one_patch(
 
 
 
-template <int dim, typename DoFHandlerType>
+template <int dim, int spacedim>
 void
-DataOutFaces<dim, DoFHandlerType>::build_patches(
-  const unsigned int n_subdivisions_)
+DataOutFaces<dim, spacedim>::build_patches(const unsigned int n_subdivisions_)
 {
-  build_patches(StaticMappingQ1<dimension>::mapping, n_subdivisions_);
+  build_patches(StaticMappingQ1<dim>::mapping, n_subdivisions_);
 }
 
 
 
-template <int dim, typename DoFHandlerType>
+template <int dim, int spacedim>
 void
-DataOutFaces<dim, DoFHandlerType>::build_patches(
-  const Mapping<dimension> &mapping,
-  const unsigned int        n_subdivisions_)
+DataOutFaces<dim, spacedim>::build_patches(const Mapping<dim> &mapping,
+                                           const unsigned int  n_subdivisions_)
 {
-  // Check consistency of redundant template parameter
-  Assert(dim == dimension, ExcDimensionMismatch(dim, dimension));
-
   const unsigned int n_subdivisions =
     (n_subdivisions_ != 0) ? n_subdivisions_ : this->default_subdivisions;
 
@@ -383,31 +372,30 @@ DataOutFaces<dim, DoFHandlerType>::build_patches(
         this->dof_data[i]->postprocessor->get_needed_update_flags();
   update_flags |= update_quadrature_points;
 
-  internal::DataOutFacesImplementation::ParallelData<dimension, space_dimension>
-                                                     thread_data(n_datasets,
-                n_subdivisions,
-                n_postprocessor_outputs,
-                mapping,
-                this->get_fes(),
-                update_flags);
-  DataOutBase::Patch<dimension - 1, space_dimension> sample_patch;
+  internal::DataOutFacesImplementation::ParallelData<dim, spacedim> thread_data(
+    n_datasets,
+    n_subdivisions,
+    n_postprocessor_outputs,
+    mapping,
+    this->get_fes(),
+    update_flags);
+  DataOutBase::Patch<dim - 1, spacedim> sample_patch;
   sample_patch.n_subdivisions = n_subdivisions;
-  sample_patch.data.reinit(
-    n_datasets, Utilities::fixed_power<dimension - 1>(n_subdivisions + 1));
+  sample_patch.data.reinit(n_datasets,
+                           Utilities::fixed_power<dim - 1>(n_subdivisions + 1));
 
   // now build the patches in parallel
   WorkStream::run(
     all_faces.data(),
     all_faces.data() + all_faces.size(),
     [this](const FaceDescriptor *cell_and_face,
-           internal::DataOutFacesImplementation::ParallelData<dimension,
-                                                              dimension> &data,
-           DataOutBase::Patch<dimension - 1, space_dimension> &patch) {
+           internal::DataOutFacesImplementation::ParallelData<dim, dim> &data,
+           DataOutBase::Patch<dim - 1, spacedim> &patch) {
       this->build_one_patch(cell_and_face, data, patch);
     },
-    [this](const DataOutBase::Patch<dim - 1, space_dimension> &patch) {
-      internal::DataOutFacesImplementation::
-        append_patch_to_list<dim, space_dimension>(patch, this->patches);
+    [this](const DataOutBase::Patch<dim - 1, spacedim> &patch) {
+      internal::DataOutFacesImplementation::append_patch_to_list<dim, spacedim>(
+        patch, this->patches);
     },
     thread_data,
     sample_patch);
@@ -415,16 +403,14 @@ DataOutFaces<dim, DoFHandlerType>::build_patches(
 
 
 
-template <int dim, typename DoFHandlerType>
-typename DataOutFaces<dim, DoFHandlerType>::FaceDescriptor
-DataOutFaces<dim, DoFHandlerType>::first_face()
+template <int dim, int spacedim>
+typename DataOutFaces<dim, spacedim>::FaceDescriptor
+DataOutFaces<dim, spacedim>::first_face()
 {
   // simply find first active cell with a face on the boundary
-  typename Triangulation<dimension, space_dimension>::active_cell_iterator
-    cell = this->triangulation->begin_active();
-  for (; cell != this->triangulation->end(); ++cell)
+  for (const auto &cell : this->triangulation->active_cell_iterators())
     if (cell->is_locally_owned())
-      for (const unsigned int f : GeometryInfo<dimension>::face_indices())
+      for (const unsigned int f : GeometryInfo<dim>::face_indices())
         if (!surface_only || cell->face(f)->at_boundary())
           return FaceDescriptor(cell, f);
 
@@ -436,17 +422,16 @@ DataOutFaces<dim, DoFHandlerType>::first_face()
 
 
 
-template <int dim, typename DoFHandlerType>
-typename DataOutFaces<dim, DoFHandlerType>::FaceDescriptor
-DataOutFaces<dim, DoFHandlerType>::next_face(const FaceDescriptor &old_face)
+template <int dim, int spacedim>
+typename DataOutFaces<dim, spacedim>::FaceDescriptor
+DataOutFaces<dim, spacedim>::next_face(const FaceDescriptor &old_face)
 {
   FaceDescriptor face = old_face;
 
   // first check whether the present cell has more faces on the boundary. since
   // we started with this face, its cell must clearly be locally owned
   Assert(face.first->is_locally_owned(), ExcInternalError());
-  for (unsigned int f = face.second + 1;
-       f < GeometryInfo<dimension>::faces_per_cell;
+  for (unsigned int f = face.second + 1; f < GeometryInfo<dim>::faces_per_cell;
        ++f)
     if (!surface_only || face.first->face(f)->at_boundary())
       // yup, that is so, so return it
@@ -459,8 +444,8 @@ DataOutFaces<dim, DoFHandlerType>::next_face(const FaceDescriptor &old_face)
 
   // convert the iterator to an active_iterator and advance this to the next
   // active cell
-  typename Triangulation<dimension, space_dimension>::active_cell_iterator
-    active_cell = face.first;
+  typename Triangulation<dim, spacedim>::active_cell_iterator active_cell =
+    face.first;
 
   // increase face pointer by one
   ++active_cell;
@@ -471,7 +456,7 @@ DataOutFaces<dim, DoFHandlerType>::next_face(const FaceDescriptor &old_face)
       // check all the faces of this active cell. but skip it altogether
       // if it isn't locally owned
       if (active_cell->is_locally_owned())
-        for (const unsigned int f : GeometryInfo<dimension>::face_indices())
+        for (const unsigned int f : GeometryInfo<dim>::face_indices())
           if (!surface_only || active_cell->face(f)->at_boundary())
             {
               face.first  = active_cell;
index 87509e1fb222ff133853f7d5175a04c0f71edfb1..291b52568242adcdb40111bd47cf23a812349213 100644 (file)
@@ -18,7 +18,6 @@ for (deal_II_dimension : DIMENSIONS)
   {
     // don't instantiate anything for the 1d
 #if deal_II_dimension >= 2
-    template class DataOutFaces<deal_II_dimension,
-                                DoFHandler<deal_II_dimension>>;
+    template class DataOutFaces<deal_II_dimension>;
 #endif
   }
index 39b4877139013809c5ae3e74343434a73e00eb50..f75b1e95a0d185f41ad8c1a57c08a3afed068c2b 100644 (file)
@@ -98,14 +98,12 @@ namespace internal
 
 
 
-template <int dim, typename DoFHandlerType>
+template <int dim, int spacedim>
 void
-DataOutRotation<dim, DoFHandlerType>::build_one_patch(
-  const cell_iterator *                                                   cell,
-  internal::DataOutRotationImplementation::ParallelData<dimension,
-                                                        space_dimension> &data,
-  std::vector<DataOutBase::Patch<dimension + 1, space_dimension + 1>>
-    &my_patches)
+DataOutRotation<dim, spacedim>::build_one_patch(
+  const cell_iterator *                                                 cell,
+  internal::DataOutRotationImplementation::ParallelData<dim, spacedim> &data,
+  std::vector<DataOutBase::Patch<dim + 1, spacedim + 1>> &my_patches)
 {
   if (dim == 3)
     {
@@ -126,21 +124,21 @@ DataOutRotation<dim, DoFHandlerType>::build_one_patch(
   // which we will put points in the whole domain (not the rotationally
   // reduced one in which the computation took place. for simplicity add the
   // initial direction at the end again
-  std::vector<Point<dimension + 1>> angle_directions(n_patches_per_circle + 1);
+  std::vector<Point<dim + 1>> angle_directions(n_patches_per_circle + 1);
   for (unsigned int i = 0; i <= n_patches_per_circle; ++i)
     {
-      angle_directions[i][dimension - 1] =
+      angle_directions[i][dim - 1] =
         std::cos(2 * numbers::PI * i / n_patches_per_circle);
-      angle_directions[i][dimension] =
+      angle_directions[i][dim] =
         std::sin(2 * numbers::PI * i / n_patches_per_circle);
     }
 
   for (unsigned int angle = 0; angle < n_patches_per_circle; ++angle)
     {
       // first compute the vertices of the patch. note that they will have to
-      // be computed from the vertices of the cell, which has one dimension
+      // be computed from the vertices of the cell, which has one dim
       // less, however.
-      switch (dimension)
+      switch (dim)
         {
           case 1:
             {
@@ -160,9 +158,9 @@ DataOutRotation<dim, DoFHandlerType>::build_one_patch(
           case 2:
             {
               for (const unsigned int vertex :
-                   GeometryInfo<dimension>::vertex_indices())
+                   GeometryInfo<dim>::vertex_indices())
                 {
-                  const Point<dimension> v = (*cell)->vertex(vertex);
+                  const Point<dim> v = (*cell)->vertex(vertex);
 
                   // make sure that the radial variable is nonnegative
                   Assert(v(0) >= 0, ExcRadialVariableHasNegativeValues(v(0)));
@@ -173,13 +171,11 @@ DataOutRotation<dim, DoFHandlerType>::build_one_patch(
                   my_patches[angle].vertices[vertex][0] = v(1);
 
                   my_patches[angle]
-                    .vertices[vertex +
-                              GeometryInfo<dimension>::vertices_per_cell] =
+                    .vertices[vertex + GeometryInfo<dim>::vertices_per_cell] =
                     v(0) * angle_directions[angle + 1];
                   my_patches[angle]
-                    .vertices[vertex +
-                              GeometryInfo<dimension>::vertices_per_cell][0] =
-                    v(1);
+                    .vertices[vertex + GeometryInfo<dim>::vertices_per_cell]
+                             [0] = v(1);
                 }
 
               break;
@@ -199,7 +195,7 @@ DataOutRotation<dim, DoFHandlerType>::build_one_patch(
           for (unsigned int dataset = 0; dataset < this->dof_data.size();
                ++dataset)
             {
-              const FEValuesBase<dimension> &fe_patch_values =
+              const FEValuesBase<dim> &fe_patch_values =
                 data.get_present_fe_values(dataset);
               const unsigned int n_components =
                 fe_patch_values.get_fe().n_components();
@@ -241,13 +237,13 @@ DataOutRotation<dim, DoFHandlerType>::build_one_patch(
                         data.patch_values_scalar.evaluation_points =
                           fe_patch_values.get_quadrature_points();
 
-                      const typename DoFHandlerType::active_cell_iterator
+                      const typename DoFHandler<dim,
+                                                spacedim>::active_cell_iterator
                         dh_cell(&(*cell)->get_triangulation(),
                                 (*cell)->level(),
                                 (*cell)->index(),
                                 this->dof_data[dataset]->dof_handler);
-                      data.patch_values_scalar
-                        .template set_cell<DoFHandlerType>(dh_cell);
+                      data.patch_values_scalar.template set_cell<dim>(dh_cell);
 
                       postprocessor->evaluate_scalar_field(
                         data.patch_values_scalar,
@@ -282,13 +278,13 @@ DataOutRotation<dim, DoFHandlerType>::build_one_patch(
                         data.patch_values_system.evaluation_points =
                           fe_patch_values.get_quadrature_points();
 
-                      const typename DoFHandlerType::active_cell_iterator
+                      const typename DoFHandler<dim,
+                                                spacedim>::active_cell_iterator
                         dh_cell(&(*cell)->get_triangulation(),
                                 (*cell)->level(),
                                 (*cell)->index(),
                                 this->dof_data[dataset]->dof_handler);
-                      data.patch_values_system
-                        .template set_cell<DoFHandlerType>(dh_cell);
+                      data.patch_values_system.template set_cell<dim>(dh_cell);
 
                       postprocessor->evaluate_vector_field(
                         data.patch_values_system,
@@ -299,7 +295,7 @@ DataOutRotation<dim, DoFHandlerType>::build_one_patch(
                        component < this->dof_data[dataset]->n_output_variables;
                        ++component)
                     {
-                      switch (dimension)
+                      switch (dim)
                         {
                           case 1:
                             for (unsigned int x = 0; x < n_points; ++x)
@@ -336,7 +332,7 @@ DataOutRotation<dim, DoFHandlerType>::build_one_patch(
                       real_part,
                     data.patch_values_scalar.solution_values);
 
-                  switch (dimension)
+                  switch (dim)
                     {
                       case 1:
                         for (unsigned int x = 0; x < n_points; ++x)
@@ -373,7 +369,7 @@ DataOutRotation<dim, DoFHandlerType>::build_one_patch(
                   for (unsigned int component = 0; component < n_components;
                        ++component)
                     {
-                      switch (dimension)
+                      switch (dim)
                         {
                           case 1:
                             for (unsigned int x = 0; x < n_points; ++x)
@@ -416,14 +412,14 @@ DataOutRotation<dim, DoFHandlerType>::build_one_patch(
                      ExcMessage("Cell must be active for cell data"));
               const unsigned int cell_number = std::distance(
                 this->triangulation->begin_active(),
-                typename Triangulation<dimension, space_dimension>::
-                  active_cell_iterator(*cell));
+                typename Triangulation<dim, spacedim>::active_cell_iterator(
+                  *cell));
               const double value =
                 this->cell_data[dataset]->get_cell_data_value(
                   cell_number,
                   internal::DataOutImplementation::ComponentExtractor::
                     real_part);
-              switch (dimension)
+              switch (dim)
                 {
                   case 1:
                     for (unsigned int x = 0; x < n_points; ++x)
@@ -451,15 +447,12 @@ DataOutRotation<dim, DoFHandlerType>::build_one_patch(
 
 
 
-template <int dim, typename DoFHandlerType>
+template <int dim, int spacedim>
 void
-DataOutRotation<dim, DoFHandlerType>::build_patches(
+DataOutRotation<dim, spacedim>::build_patches(
   const unsigned int n_patches_per_circle,
   const unsigned int nnnn_subdivisions)
 {
-  // Check consistency of redundant
-  // template parameter
-  Assert(dim == dimension, ExcDimensionMismatch(dim, dimension));
   Assert(this->triangulation != nullptr,
          Exceptions::DataOutImplementation::ExcNoTriangulationSelected());
 
@@ -512,22 +505,21 @@ DataOutRotation<dim, DoFHandlerType>::build_patches(
     else
       n_postprocessor_outputs[dataset] = 0;
 
-  internal::DataOutRotationImplementation::ParallelData<dimension,
-                                                        space_dimension>
-    thread_data(n_datasets,
+  internal::DataOutRotationImplementation::ParallelData<dim, spacedim>
+                                                         thread_data(n_datasets,
                 n_subdivisions,
                 n_patches_per_circle,
                 n_postprocessor_outputs,
-                StaticMappingQ1<dimension, space_dimension>::mapping,
+                StaticMappingQ1<dim, spacedim>::mapping,
                 this->get_fes(),
                 update_flags);
-  std::vector<DataOutBase::Patch<dimension + 1, space_dimension + 1>>
-    new_patches(n_patches_per_circle);
+  std::vector<DataOutBase::Patch<dim + 1, spacedim + 1>> new_patches(
+    n_patches_per_circle);
   for (unsigned int i = 0; i < new_patches.size(); ++i)
     {
       new_patches[i].n_subdivisions = n_subdivisions;
       new_patches[i].data.reinit(
-        n_datasets, Utilities::fixed_power<dimension + 1>(n_subdivisions + 1));
+        n_datasets, Utilities::fixed_power<dim + 1>(n_subdivisions + 1));
     }
 
   // now build the patches in parallel
@@ -535,16 +527,16 @@ DataOutRotation<dim, DoFHandlerType>::build_patches(
     all_cells.data(),
     all_cells.data() + all_cells.size(),
     [this](const cell_iterator *cell,
-           internal::DataOutRotationImplementation::
-             ParallelData<dimension, space_dimension> &data,
-           std::vector<DataOutBase::Patch<dimension + 1, space_dimension + 1>>
-             &my_patches) { this->build_one_patch(cell, data, my_patches); },
-    [this](
-      const std::vector<DataOutBase::Patch<dimension + 1, space_dimension + 1>>
-        &new_patches) {
-      internal::DataOutRotationImplementation::
-        append_patch_to_list<dimension, space_dimension>(new_patches,
-                                                         this->patches);
+           internal::DataOutRotationImplementation::ParallelData<dim, spacedim>
+             &                                                     data,
+           std::vector<DataOutBase::Patch<dim + 1, spacedim + 1>> &my_patches) {
+      this->build_one_patch(cell, data, my_patches);
+    },
+    [this](const std::vector<DataOutBase::Patch<dim + 1, spacedim + 1>>
+             &new_patches) {
+      internal::DataOutRotationImplementation::append_patch_to_list<dim,
+                                                                    spacedim>(
+        new_patches, this->patches);
     },
     thread_data,
     new_patches);
@@ -552,23 +544,23 @@ DataOutRotation<dim, DoFHandlerType>::build_patches(
 
 
 
-template <int dim, typename DoFHandlerType>
-typename DataOutRotation<dim, DoFHandlerType>::cell_iterator
-DataOutRotation<dim, DoFHandlerType>::first_cell()
+template <int dim, int spacedim>
+typename DataOutRotation<dim, spacedim>::cell_iterator
+DataOutRotation<dim, spacedim>::first_cell()
 {
   return this->triangulation->begin_active();
 }
 
 
-template <int dim, typename DoFHandlerType>
-typename DataOutRotation<dim, DoFHandlerType>::cell_iterator
-DataOutRotation<dim, DoFHandlerType>::next_cell(const cell_iterator &cell)
+template <int dim, int spacedim>
+typename DataOutRotation<dim, spacedim>::cell_iterator
+DataOutRotation<dim, spacedim>::next_cell(const cell_iterator &cell)
 {
   // convert the iterator to an
   // active_iterator and advance
   // this to the next active cell
-  typename Triangulation<dimension, space_dimension>::active_cell_iterator
-    active_cell = cell;
+  typename Triangulation<dim, spacedim>::active_cell_iterator active_cell =
+    cell;
   ++active_cell;
   return active_cell;
 }
index 50d91c797d5bfb386a62b20e5a581d3e9f4edd64..041dc453e8beed6dc8fdba1bf272d19b3d643920 100644 (file)
@@ -17,7 +17,6 @@
 for (deal_II_dimension : DIMENSIONS)
   {
 #if deal_II_dimension < 3
-    template class DataOutRotation<deal_II_dimension,
-                                   DoFHandler<deal_II_dimension>>;
+    template class DataOutRotation<deal_II_dimension>;
 #endif
   }
index 6aa5072fe1e23e3a6f624c60527745aa72367ea6..69b655745bd9c2669fa9915a457713d1ff6dec54 100644 (file)
 
 
 
-for (DoFHandler : DOFHANDLER_TEMPLATES; VECTOR : VECTOR_TYPES;
-     deal_II_dimension : DIMENSIONS)
+for (VECTOR : VECTOR_TYPES; deal_II_dimension : DIMENSIONS)
   {
     namespace Functions
     \{
-      template class FEFieldFunction<deal_II_dimension,
-                                     DoFHandler<deal_II_dimension>,
-                                     VECTOR>;
+      template class FEFieldFunction<deal_II_dimension, VECTOR>;
     \}
   }
index 74b4d43123feb9dc099b7fd4edb01cd057a4aee5..c42f99bf93efb8a6642a6b28c226a8b88a78b49f 100644 (file)
 
 DEAL_II_NAMESPACE_OPEN
 
-template <int dim, typename VectorType, typename DoFHandlerType>
-SolutionTransfer<dim, VectorType, DoFHandlerType>::SolutionTransfer(
-  const DoFHandlerType &dof)
+template <int dim, typename VectorType, int spacedim>
+SolutionTransfer<dim, VectorType, spacedim>::SolutionTransfer(
+  const DoFHandler<dim, spacedim> &dof)
   : dof_handler(&dof, typeid(*this).name())
   , n_dofs_old(0)
   , prepared_for(none)
 {
-  Assert((dynamic_cast<const parallel::distributed::Triangulation<
-            DoFHandlerType::dimension,
-            DoFHandlerType::space_dimension> *>(
-            &dof_handler->get_triangulation()) == nullptr),
-         ExcMessage("You are calling the dealii::SolutionTransfer class "
-                    "with a DoF handler that is built on a "
-                    "parallel::distributed::Triangulation. This will not "
-                    "work for parallel computations. You probably want to "
-                    "use the parallel::distributed::SolutionTransfer class."));
+  Assert(
+    (dynamic_cast<const parallel::distributed::Triangulation<dim, spacedim> *>(
+       &dof_handler->get_triangulation()) == nullptr),
+    ExcMessage("You are calling the dealii::SolutionTransfer class "
+               "with a DoFHandler that is built on a "
+               "parallel::distributed::Triangulation. This will not "
+               "work for parallel computations. You probably want to "
+               "use the parallel::distributed::SolutionTransfer class."));
 }
 
 
 
-template <int dim, typename VectorType, typename DoFHandlerType>
-SolutionTransfer<dim, VectorType, DoFHandlerType>::~SolutionTransfer()
+template <int dim, typename VectorType, int spacedim>
+SolutionTransfer<dim, VectorType, spacedim>::~SolutionTransfer()
 {
   clear();
 }
 
 
 
-template <int dim, typename VectorType, typename DoFHandlerType>
+template <int dim, typename VectorType, int spacedim>
 void
-SolutionTransfer<dim, VectorType, DoFHandlerType>::clear()
+SolutionTransfer<dim, VectorType, spacedim>::clear()
 {
   indices_on_cell.clear();
   dof_values_on_cell.clear();
@@ -83,9 +82,9 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::clear()
 
 
 
-template <int dim, typename VectorType, typename DoFHandlerType>
+template <int dim, typename VectorType, int spacedim>
 void
-SolutionTransfer<dim, VectorType, DoFHandlerType>::prepare_for_pure_refinement()
+SolutionTransfer<dim, VectorType, spacedim>::prepare_for_pure_refinement()
 {
   Assert(prepared_for != pure_refinement, ExcAlreadyPrepForRef());
   Assert(prepared_for != coarsening_and_refinement,
@@ -101,9 +100,9 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::prepare_for_pure_refinement()
   // the current set of subdomain ids, set subdomain ids to the "true" owner of
   // each cell upon construction of the TemporarilyRestoreSubdomainIds object,
   // and later restore these flags when it is destroyed.
-  const internal::parallel::shared::
-    TemporarilyRestoreSubdomainIds<dim, DoFHandlerType::space_dimension>
-      subdomain_modifier(dof_handler->get_triangulation());
+  const internal::parallel::shared::TemporarilyRestoreSubdomainIds<dim,
+                                                                   spacedim>
+    subdomain_modifier(dof_handler->get_triangulation());
 
   const unsigned int n_active_cells =
     dof_handler->get_triangulation().n_active_cells();
@@ -132,9 +131,9 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::prepare_for_pure_refinement()
 
 
 
-template <int dim, typename VectorType, typename DoFHandlerType>
+template <int dim, typename VectorType, int spacedim>
 void
-SolutionTransfer<dim, VectorType, DoFHandlerType>::refine_interpolate(
+SolutionTransfer<dim, VectorType, spacedim>::refine_interpolate(
   const VectorType &in,
   VectorType &      out) const
 {
@@ -154,9 +153,9 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::refine_interpolate(
   // the current set of subdomain ids, set subdomain ids to the "true" owner of
   // each cell upon construction of the TemporarilyRestoreSubdomainIds object,
   // and later restore these flags when it is destroyed.
-  const internal::parallel::shared::
-    TemporarilyRestoreSubdomainIds<dim, DoFHandlerType::space_dimension>
-      subdomain_modifier(dof_handler->get_triangulation());
+  const internal::parallel::shared::TemporarilyRestoreSubdomainIds<dim,
+                                                                   spacedim>
+    subdomain_modifier(dof_handler->get_triangulation());
 
   Vector<typename VectorType::value_type> local_values(0);
 
@@ -275,9 +274,9 @@ namespace internal
 
 
 
-template <int dim, typename VectorType, typename DoFHandlerType>
+template <int dim, typename VectorType, int spacedim>
 void
-SolutionTransfer<dim, VectorType, DoFHandlerType>::
+SolutionTransfer<dim, VectorType, spacedim>::
   prepare_for_coarsening_and_refinement(const std::vector<VectorType> &all_in)
 {
   Assert(prepared_for != pure_refinement, ExcAlreadyPrepForRef());
@@ -307,9 +306,9 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::
   // the current set of subdomain ids, set subdomain ids to the "true" owner of
   // each cell upon construction of the TemporarilyRestoreSubdomainIds object,
   // and later restore these flags when it is destroyed.
-  const internal::parallel::shared::
-    TemporarilyRestoreSubdomainIds<dim, DoFHandlerType::space_dimension>
-      subdomain_modifier(dof_handler->get_triangulation());
+  const internal::parallel::shared::TemporarilyRestoreSubdomainIds<dim,
+                                                                   spacedim>
+    subdomain_modifier(dof_handler->get_triangulation());
 
   // first count the number
   // of cells that will be coarsened
@@ -430,9 +429,9 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::
 
 
 
-template <int dim, typename VectorType, typename DoFHandlerType>
+template <int dim, typename VectorType, int spacedim>
 void
-SolutionTransfer<dim, VectorType, DoFHandlerType>::
+SolutionTransfer<dim, VectorType, spacedim>::
   prepare_for_coarsening_and_refinement(const VectorType &in)
 {
   std::vector<VectorType> all_in(1, in);
@@ -441,9 +440,9 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::
 
 
 
-template <int dim, typename VectorType, typename DoFHandlerType>
+template <int dim, typename VectorType, int spacedim>
 void
-SolutionTransfer<dim, VectorType, DoFHandlerType>::interpolate(
+SolutionTransfer<dim, VectorType, spacedim>::interpolate(
   const std::vector<VectorType> &all_in,
   std::vector<VectorType> &      all_out) const
 {
@@ -472,9 +471,9 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::interpolate(
   // the current set of subdomain ids, set subdomain ids to the "true" owner of
   // each cell upon construction of the TemporarilyRestoreSubdomainIds object,
   // and later restore these flags when it is destroyed.
-  const internal::parallel::shared::
-    TemporarilyRestoreSubdomainIds<dim, DoFHandlerType::space_dimension>
-      subdomain_modifier(dof_handler->get_triangulation());
+  const internal::parallel::shared::TemporarilyRestoreSubdomainIds<dim,
+                                                                   spacedim>
+    subdomain_modifier(dof_handler->get_triangulation());
 
   Vector<typename VectorType::value_type> local_values;
   std::vector<types::global_dof_index>    dofs;
@@ -585,11 +584,10 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::interpolate(
 
 
 
-template <int dim, typename VectorType, typename DoFHandlerType>
+template <int dim, typename VectorType, int spacedim>
 void
-SolutionTransfer<dim, VectorType, DoFHandlerType>::interpolate(
-  const VectorType &in,
-  VectorType &      out) const
+SolutionTransfer<dim, VectorType, spacedim>::interpolate(const VectorType &in,
+                                                         VectorType &out) const
 {
   Assert(in.size() == n_dofs_old, ExcDimensionMismatch(in.size(), n_dofs_old));
   Assert(out.size() == dof_handler->n_dofs(),
@@ -605,9 +603,9 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::interpolate(
 
 
 
-template <int dim, typename VectorType, typename DoFHandlerType>
+template <int dim, typename VectorType, int spacedim>
 std::size_t
-SolutionTransfer<dim, VectorType, DoFHandlerType>::memory_consumption() const
+SolutionTransfer<dim, VectorType, spacedim>::memory_consumption() const
 {
   // at the moment we do not include the memory
   // consumption of the cell_map as we have no
@@ -622,10 +620,10 @@ SolutionTransfer<dim, VectorType, DoFHandlerType>::memory_consumption() const
 
 
 
-template <int dim, typename VectorType, typename DoFHandlerType>
+template <int dim, typename VectorType, int spacedim>
 std::size_t
-SolutionTransfer<dim, VectorType, DoFHandlerType>::Pointerstruct::
-  memory_consumption() const
+SolutionTransfer<dim, VectorType, spacedim>::Pointerstruct::memory_consumption()
+  const
 {
   return sizeof(*this);
 }
index 4e17a70e8ee9a530429920175b66b30f576538d8..eb2c14694471112b4349c3518f986a88367166c7 100644 (file)
@@ -18,13 +18,8 @@ for (VEC : VECTOR_TYPES; deal_II_dimension : DIMENSIONS;
      deal_II_space_dimension : SPACE_DIMENSIONS)
   {
 #if deal_II_dimension <= deal_II_space_dimension
-    template class SolutionTransfer<
-      deal_II_dimension,
-      VEC,
-      DoFHandler<deal_II_dimension, deal_II_space_dimension>>;
-    template class SolutionTransfer<
-      deal_II_dimension,
-      VEC,
-      hp::DoFHandler<deal_II_dimension, deal_II_space_dimension>>;
+    template class SolutionTransfer<deal_II_dimension,
+                                    VEC,
+                                    deal_II_space_dimension>;
 #endif
   }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.