]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Adjust the tests using collect_periodic_faces to the new signature in r31900
authordaniel.arndt <daniel.arndt@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 5 Dec 2013 12:30:16 +0000 (12:30 +0000)
committerdaniel.arndt <daniel.arndt@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 5 Dec 2013 12:30:16 +0000 (12:30 +0000)
git-svn-id: https://svn.dealii.org/trunk@31901 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/grid_tools_05.cc
tests/deal.II/grid_tools_06.cc
tests/mpi/periodicity_01.cc

index bbe85ed40a55313f87225b43d7a776515ed592b2..9d4f5850dcdf546e6cc6189a6d621b341be9f329 100644 (file)
@@ -205,8 +205,9 @@ int main()
 
   typedef Triangulation<2>::cell_iterator CellIterator2;
   typedef std::vector<GridTools::PeriodicFacePair<CellIterator2> > FaceVector2;
-  FaceVector2 test2 = GridTools::collect_periodic_faces
-                        (triangulation2, 42, 1, dealii::Tensor<1,2>());
+  FaceVector2 test2;
+  GridTools::collect_periodic_faces
+    (triangulation2, 42, 1, test2, dealii::Tensor<1,2>());
 
   for (FaceVector2::iterator it = test2.begin(); it != test2.end(); ++it)
     print_match(it->cell[0]->face(it->face_idx[0]),
@@ -223,8 +224,9 @@ int main()
 
   typedef Triangulation<3>::cell_iterator CellIterator3;
   typedef std::vector<GridTools::PeriodicFacePair<CellIterator3> > FaceVector3;
-  FaceVector3 test3 = GridTools::collect_periodic_faces
-                       (triangulation3, 42, 2, dealii::Tensor<1,3>());
+  FaceVector3 test3;
+  GridTools::collect_periodic_faces
+    (triangulation3, 42, 2, test3, dealii::Tensor<1,3>());
 
   for (FaceVector3::iterator it = test3.begin(); it != test3.end(); ++it)
     print_match(it->cell[0]->face(it->face_idx[0]),
index cf2ed7c62628281771031f391c80d510c3359aed..951d63b76f1edd851b51bec1478b2c838d20316d 100644 (file)
@@ -225,8 +225,9 @@ int main()
       typedef Triangulation<2>::cell_iterator CellIterator;
       typedef std::vector<GridTools::PeriodicFacePair<CellIterator> >
         FaceVector;
-      FaceVector test = GridTools::collect_periodic_faces
-                          (triangulation, 42, 43, 1, dealii::Tensor<1,2>());
+      FaceVector test;
+      GridTools::collect_periodic_faces
+        (triangulation, 42, 43, 1, test, dealii::Tensor<1,2>());
 
       deallog << "Triangulation: " << i << std::endl;
 
@@ -248,8 +249,9 @@ int main()
       typedef Triangulation<3>::cell_iterator CellIterator;
       typedef std::vector<GridTools::PeriodicFacePair<CellIterator> >
         FaceVector;
-      FaceVector test = GridTools::collect_periodic_faces
-                          (triangulation, 42, 43, 2, dealii::Tensor<1,3>());
+      FaceVector test;
+      GridTools::collect_periodic_faces
+        (triangulation, 42, 43, 2, test, dealii::Tensor<1,3>());
 
       deallog << "Triangulation: " << i << std::endl;
 
index 4b9ccb0fa1b9a06987b0ce1d331cd6d65fc2f446..8a7199b12476acae0ac6812f505a593af0471dd5 100644 (file)
@@ -481,13 +481,15 @@ namespace Step40
               (triangulation,reps,p1,p2,true);
 
 
+            std::vector<GridTools::PeriodicFacePair<typename parallel::distributed::Triangulation<dim>::cell_iterator> >
+              periodicity_vector;
+              
             for(int i=1; i<dim; ++i)
-              {
-                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);
-              }
+              GridTools::collect_periodic_faces
+                ( triangulation, /*b_id1*/ 2*i, /*b_id2*/ 2*i+1,
+                  /*direction*/ i, periodicity_vector);
+              
+            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.