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]),
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]),
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;
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;
(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