From: maier Date: Tue, 1 Oct 2013 21:33:33 +0000 (+0000) Subject: Port the distributed periodicity test, add missing template instantiation X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=273d906663e432b9c65e135e6e87ab3c683d8e21;p=dealii-svn.git Port the distributed periodicity test, add missing template instantiation git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31062 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/grid/grid_tools.h b/deal.II/include/deal.II/grid/grid_tools.h index ac6080e565..68051ef871 100644 --- a/deal.II/include/deal.II/grid/grid_tools.h +++ b/deal.II/include/deal.II/grid/grid_tools.h @@ -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>()); /** diff --git a/deal.II/source/grid/grid_tools.inst.in b/deal.II/source/grid/grid_tools.inst.in index 6f4d0f0d6e..58602fe7cd 100644 --- a/deal.II/source/grid/grid_tools.inst.in +++ b/deal.II/source/grid/grid_tools.inst.in @@ -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::cell_iterator> > + collect_periodic_faces > + (const parallel::distributed::Triangulation &, + const types::boundary_id, + const types::boundary_id, + const int, + const Tensor<1,parallel::distributed::Triangulation::space_dimension> &); + + template + std::vector::cell_iterator> > + collect_periodic_faces > + (const parallel::distributed::Triangulation &, + const types::boundary_id, + const int, + const Tensor<1,parallel::distributed::Triangulation::space_dimension> &); + + \} + #endif +#endif +} + diff --git a/tests/mpi/periodicity_01.cc b/tests/mpi/periodicity_01.cc index bf8f4f25b1..fd775bdd57 100644 --- a/tests/mpi/periodicity_01.cc +++ b/tests/mpi/periodicity_01.cc @@ -480,20 +480,14 @@ namespace Step40 GridGenerator::subdivided_hyper_rectangle (triangulation,reps,p1,p2,true); - std::vector - ::cell_iterator, unsigned int, - typename parallel::distributed::Triangulation::cell_iterator, unsigned int> > - periodicity_vector; for(int i=1; i::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