]> https://gitweb.dealii.org/ - dealii.git/commitdiff
instantiated for dim,spacedim 1967/head
authoralberto sartori <alberto.sartori86@gmail.com>
Wed, 9 Dec 2015 17:29:17 +0000 (18:29 +0100)
committeralberto sartori <alberto.sartori86@gmail.com>
Wed, 9 Dec 2015 17:29:17 +0000 (18:29 +0100)
include/deal.II/distributed/solution_transfer.h
source/distributed/solution_transfer.cc
source/distributed/solution_transfer.inst.in

index c87db104087b0138d9bdc937efecf56ab56d7332..9f97a1f8a7cd41a89798e5609a5c8996dbe6d529 100644 (file)
@@ -219,8 +219,8 @@ namespace parallel
        * objects that can later be retrieved after refinement, coarsening and
        * repartitioning.
        */
-      void pack_callback(const typename Triangulation<dim,dim>::cell_iterator &cell,
-                         const typename Triangulation<dim,dim>::CellStatus status,
+      void pack_callback(const typename Triangulation<dim,DoFHandlerType::space_dimension>::cell_iterator &cell,
+                         const typename Triangulation<dim,DoFHandlerType::space_dimension>::CellStatus status,
                          void *data);
 
       /**
@@ -228,8 +228,8 @@ namespace parallel
        * has been packed up previously on the mesh before refinement,
        * coarsening and repartitioning.
        */
-      void unpack_callback(const typename Triangulation<dim,dim>::cell_iterator &cell,
-                           const typename Triangulation<dim,dim>::CellStatus status,
+      void unpack_callback(const typename Triangulation<dim,DoFHandlerType::space_dimension>::cell_iterator &cell,
+                           const typename Triangulation<dim,DoFHandlerType::space_dimension>::CellStatus status,
                            const void *data,
                            std::vector<VectorType *> &all_out);
 
index 89dcdbefe97e953dba78c918be5a8293524b2bbc..1f77407c80d0e6d5ba3f878b43a8de83ca2063c1 100644 (file)
@@ -79,9 +79,9 @@ namespace parallel
       Assert(size > 0, ExcMessage("Please transfer at least one vector!"));
 
 //TODO: casting away constness is bad
-      parallel::distributed::Triangulation<dim> *tria
-        = (dynamic_cast<parallel::distributed::Triangulation<dim>*>
-           (const_cast<dealii::Triangulation<dim>*>
+      parallel::distributed::Triangulation<dim,DoFHandlerType::space_dimension> *tria
+        = (dynamic_cast<parallel::distributed::Triangulation<dim,DoFHandlerType::space_dimension>*>
+           (const_cast<dealii::Triangulation<dim,DoFHandlerType::space_dimension>*>
             (&dof_handler->get_tria())));
       Assert (tria != 0, ExcInternalError());
 
@@ -160,9 +160,9 @@ namespace parallel
              ExcDimensionMismatch(input_vectors.size(), all_out.size()) );
 
 //TODO: casting away constness is bad
-      parallel::distributed::Triangulation<dim> *tria
-        = (dynamic_cast<parallel::distributed::Triangulation<dim>*>
-           (const_cast<dealii::Triangulation<dim>*>
+      parallel::distributed::Triangulation<dim,DoFHandlerType::space_dimension> *tria
+        = (dynamic_cast<parallel::distributed::Triangulation<dim,DoFHandlerType::space_dimension>*>
+           (const_cast<dealii::Triangulation<dim,DoFHandlerType::space_dimension>*>
             (&dof_handler->get_tria())));
       Assert (tria != 0, ExcInternalError());
 
@@ -207,8 +207,8 @@ namespace parallel
     template<int dim, typename VectorType, typename DoFHandlerType>
     void
     SolutionTransfer<dim, VectorType, DoFHandlerType>::
-    pack_callback(const typename Triangulation<dim,dim>::cell_iterator &cell_,
-                  const typename Triangulation<dim,dim>::CellStatus /*status*/,
+    pack_callback(const typename Triangulation<dim,DoFHandlerType::space_dimension>::cell_iterator &cell_,
+                  const typename Triangulation<dim,DoFHandlerType::space_dimension>::CellStatus /*status*/,
                   void *data)
     {
       typename VectorType::value_type *data_store = reinterpret_cast<typename VectorType::value_type *>(data);
@@ -232,8 +232,8 @@ namespace parallel
     template<int dim, typename VectorType, typename DoFHandlerType>
     void
     SolutionTransfer<dim, VectorType, DoFHandlerType>::unpack_callback
-    (const typename Triangulation<dim,dim>::cell_iterator &cell_,
-     const typename Triangulation<dim,dim>::CellStatus    /*status*/,
+    (const typename Triangulation<dim,DoFHandlerType::space_dimension>::cell_iterator &cell_,
+     const typename Triangulation<dim,DoFHandlerType::space_dimension>::CellStatus    /*status*/,
      const void                                           *data,
      std::vector<VectorType *>                            &all_out)
     {
index fe49a1a1e8b77c74cc1e26719ce40df7fc83b397..fdb83f5bcaa688aa1554de546b10952982b2e112 100644 (file)
 
 
 
-for (deal_II_dimension : DIMENSIONS)
+for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS)
   {
   namespace parallel
   \{
     namespace distributed
     \{
 #if deal_II_dimension > 1
-    template class SolutionTransfer<deal_II_dimension,::dealii::Vector<double>, DoFHandler<deal_II_dimension> >;
-    template class SolutionTransfer<deal_II_dimension,::dealii::parallel::distributed::Vector<double>, DoFHandler<deal_II_dimension> >;
-    template class SolutionTransfer<deal_II_dimension,::dealii::parallel::distributed::Vector<float>, DoFHandler<deal_II_dimension> >;
-    template class SolutionTransfer<deal_II_dimension,::dealii::parallel::distributed::BlockVector<double>, DoFHandler<deal_II_dimension> >;
-    template class SolutionTransfer<deal_II_dimension,::dealii::parallel::distributed::BlockVector<float>, DoFHandler<deal_II_dimension> >;
+#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::parallel::distributed::Vector<double>, DoFHandler<deal_II_dimension,deal_II_space_dimension> >;
+    template class SolutionTransfer<deal_II_dimension,::dealii::parallel::distributed::Vector<float>, DoFHandler<deal_II_dimension,deal_II_space_dimension> >;
+    template class SolutionTransfer<deal_II_dimension,::dealii::parallel::distributed::BlockVector<double>, DoFHandler<deal_II_dimension,deal_II_space_dimension> >;
+    template class SolutionTransfer<deal_II_dimension,::dealii::parallel::distributed::BlockVector<float>, DoFHandler<deal_II_dimension,deal_II_space_dimension> >;
 
 
 #ifdef DEAL_II_WITH_PETSC
-    template class SolutionTransfer<deal_II_dimension, PETScWrappers::Vector, DoFHandler<deal_II_dimension> >;
+    template class SolutionTransfer<deal_II_dimension, PETScWrappers::Vector, DoFHandler<deal_II_dimension,deal_II_space_dimension> >;
 
-    template class SolutionTransfer<deal_II_dimension, PETScWrappers::BlockVector, DoFHandler<deal_II_dimension> >;
+    template class SolutionTransfer<deal_II_dimension, PETScWrappers::BlockVector, DoFHandler<deal_II_dimension,deal_II_space_dimension> >;
 
-    template class SolutionTransfer<deal_II_dimension, PETScWrappers::MPI::Vector, DoFHandler<deal_II_dimension> >;
+    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> >;
+    template class SolutionTransfer<deal_II_dimension, PETScWrappers::MPI::BlockVector, DoFHandler<deal_II_dimension,deal_II_space_dimension> >;
 #endif
 
 #ifdef DEAL_II_WITH_TRILINOS
-    template class SolutionTransfer<deal_II_dimension, TrilinosWrappers::Vector, DoFHandler<deal_II_dimension> >;
+    template class SolutionTransfer<deal_II_dimension, TrilinosWrappers::Vector, DoFHandler<deal_II_dimension,deal_II_space_dimension> >;
 
-    template class SolutionTransfer<deal_II_dimension, TrilinosWrappers::BlockVector, DoFHandler<deal_II_dimension> >;
+    template class SolutionTransfer<deal_II_dimension, TrilinosWrappers::BlockVector, DoFHandler<deal_II_dimension,deal_II_space_dimension> >;
 
-    template class SolutionTransfer<deal_II_dimension, TrilinosWrappers::MPI::Vector, DoFHandler<deal_II_dimension> >;
+    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> >;
+    template class SolutionTransfer<deal_II_dimension, TrilinosWrappers::MPI::BlockVector, DoFHandler<deal_II_dimension,deal_II_space_dimension> >;
+#endif
+    
 #endif
 #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.