]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Port the distributed periodicity test, add missing template instantiation
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 1 Oct 2013 21:33:33 +0000 (21:33 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 1 Oct 2013 21:33:33 +0000 (21:33 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31062 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/grid/grid_tools.h
deal.II/source/grid/grid_tools.inst.in
tests/mpi/periodicity_01.cc

index ac6080e5659d4f99acf6b2632d8b9d0929e62b25..68051ef871377fefd9824945b679deb9d246cad5 100644 (file)
@@ -1103,7 +1103,7 @@ namespace GridTools
    const types::boundary_id b_id1,
    const types::boundary_id b_id2,
    const int                direction,
-   const dealii::Tensor<1,DH::space_dimension> &offset);
+   const dealii::Tensor<1,DH::space_dimension> &offset = dealii::Tensor<1,DH::space_dimension>());
 
 
   /**
@@ -1132,7 +1132,7 @@ namespace GridTools
   (const DH                 &dof_handler,
    const types::boundary_id b_id,
    const int                direction,
-   const dealii::Tensor<1,DH::space_dimension> &offset);
+   const dealii::Tensor<1,DH::space_dimension> &offset = dealii::Tensor<1,DH::space_dimension>());
 
 
   /**
index 6f4d0f0d6edb8a072ad3b3f46704894b202cb68f..58602fe7cd842b6161d4445d39a19aa3e4c706a9 100644 (file)
@@ -274,3 +274,32 @@ for (X : TRIANGULATION_AND_DOFHANDLERS; deal_II_dimension : DIMENSIONS ; deal_II
 #endif
 }
 
+for (deal_II_dimension : DIMENSIONS ; deal_II_space_dimension : SPACE_DIMENSIONS)
+{
+#if deal_II_dimension <= deal_II_space_dimension
+   #if deal_II_dimension >= 2
+
+     namespace GridTools \{
+
+      template
+      std::vector<PeriodicFacePair<parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension>::cell_iterator> >
+      collect_periodic_faces<parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension> >
+                                 (const parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension> &,
+                                  const types::boundary_id,
+                                  const types::boundary_id,
+                                  const int,
+                                  const Tensor<1,parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension>::space_dimension> &);
+
+      template
+      std::vector<PeriodicFacePair<parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension>::cell_iterator> >
+      collect_periodic_faces<parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension> >
+                                 (const parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension> &,
+                                  const types::boundary_id,
+                                  const int,
+                                  const Tensor<1,parallel::distributed::Triangulation<deal_II_dimension, deal_II_space_dimension>::space_dimension> &);
+
+     \}
+   #endif
+#endif
+}
+
index bf8f4f25b140ee05fce917ece5908df8a7bf8a4d..fd775bdd576b96d82645cc2836b40a72acd3bcaf 100644 (file)
@@ -480,20 +480,14 @@ namespace Step40
             GridGenerator::subdivided_hyper_rectangle
               (triangulation,reps,p1,p2,true);
 
-            std::vector
-              <std_cxx1x::tuple
-                <typename parallel::distributed::Triangulation<dim>::cell_iterator, unsigned int,
-                 typename parallel::distributed::Triangulation<dim>::cell_iterator, unsigned int> >
-              periodicity_vector;
 
             for(int i=1; i<dim; ++i)
-              GridTools::identify_periodic_face_pairs
-                (triangulation,
-                 /*b_id1*/ 2*i, /*b_id2*/2*i+1, /*direction*/ i,
-                 periodicity_vector);
-            
-            triangulation.add_periodicity(periodicity_vector);
-            
+              {
+                std::vector<GridTools::PeriodicFacePair<typename parallel::distributed::Triangulation<dim>::cell_iterator> >
+                  periodicity_vector = GridTools::collect_periodic_faces
+                    ( triangulation, /*b_id1*/ 2*i, /*b_id2*/ 2*i+1, /*direction*/ i);
+                triangulation.add_periodicity(periodicity_vector);
+              }
             triangulation.refine_global (1);
           }
         else

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.