From: Nils Schween Date: Wed, 15 Mar 2023 09:10:19 +0000 (+0100) Subject: fix indentation X-Git-Tag: v9.5.0-rc1~454^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc0da591809fe566d4c88dc09987e9a31853cc59;p=dealii.git fix indentation --- diff --git a/source/grid/grid_tools_dof_handlers.inst.in b/source/grid/grid_tools_dof_handlers.inst.in index e307d272e7..c8f198d660 100644 --- a/source/grid/grid_tools_dof_handlers.inst.in +++ b/source/grid/grid_tools_dof_handlers.inst.in @@ -370,41 +370,41 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) { #if deal_II_dimension <= deal_II_space_dimension - namespace GridTools - \{ - template void - collect_periodic_faces< - parallel::shared::Triangulation>( - const parallel::shared::Triangulation &, - const types::boundary_id, - const types::boundary_id, - const unsigned int, - std::vector::cell_iterator>> &, - const Tensor<1, - parallel::shared::Triangulation< - deal_II_dimension, - deal_II_space_dimension>::space_dimension> &, - const FullMatrix &); - template void - collect_periodic_faces< - parallel::shared::Triangulation>( - const parallel::shared::Triangulation &, - const types::boundary_id, - const unsigned int, - std::vector::cell_iterator>> &, - const Tensor<1, - parallel::shared::Triangulation< - deal_II_dimension, - deal_II_space_dimension>::space_dimension> &, - const FullMatrix &); - \} + namespace GridTools + \{ + template void + collect_periodic_faces< + parallel::shared::Triangulation>( + const parallel::shared::Triangulation &, + const types::boundary_id, + const types::boundary_id, + const unsigned int, + std::vector::cell_iterator>> &, + const Tensor<1, + parallel::shared::Triangulation< + deal_II_dimension, + deal_II_space_dimension>::space_dimension> &, + const FullMatrix &); + template void + collect_periodic_faces< + parallel::shared::Triangulation>( + const parallel::shared::Triangulation &, + const types::boundary_id, + const unsigned int, + std::vector::cell_iterator>> &, + const Tensor<1, + parallel::shared::Triangulation< + deal_II_dimension, + deal_II_space_dimension>::space_dimension> &, + const FullMatrix &); + \} #endif } diff --git a/tests/grid/grid_tools_collect_periodic_faces_parallel_shared_tria.cc b/tests/grid/grid_tools_collect_periodic_faces_parallel_shared_tria.cc index eb47df5be6..4654a0e589 100644 --- a/tests/grid/grid_tools_collect_periodic_faces_parallel_shared_tria.cc +++ b/tests/grid/grid_tools_collect_periodic_faces_parallel_shared_tria.cc @@ -16,8 +16,10 @@ #include #include #include + #include #include + #include #include #include @@ -27,47 +29,57 @@ #include "../tests.h" template -void test(MPI_Comm comm) { +void +test(MPI_Comm comm) +{ deallog << "dim = " << dim << std::endl; parallel::shared::Triangulation tria(comm); std::vector::cell_iterator>> - matched_pairs; + typename parallel::shared::Triangulation::cell_iterator>> + matched_pairs; unsigned int num_refinements = 1 << 4; - if constexpr (dim == 1) { - Point p1{0.}; - Point p2{1.}; - std::vector repitions{num_refinements}; - GridGenerator::subdivided_hyper_rectangle(tria, repitions, p1, p2, true); + if constexpr (dim == 1) + { + Point p1{0.}; + Point p2{1.}; + std::vector repitions{num_refinements}; + GridGenerator::subdivided_hyper_rectangle(tria, repitions, p1, p2, true); - // Collect periodic faces in the x-direction - GridTools::collect_periodic_faces(tria, 0, 1, 0, matched_pairs); - // Check the size of the matched_pairs vector - deallog << matched_pairs.size() << std::endl; - } else if constexpr (dim == 2) { - Point p1{0., 0.}; - Point p2{1., 1.}; - std::vector repitions{num_refinements, num_refinements}; - GridGenerator::subdivided_hyper_rectangle(tria, repitions, p1, p2, true); + // Collect periodic faces in the x-direction + GridTools::collect_periodic_faces(tria, 0, 1, 0, matched_pairs); + // Check the size of the matched_pairs vector + deallog << matched_pairs.size() << std::endl; + } + else if constexpr (dim == 2) + { + Point p1{0., 0.}; + Point p2{1., 1.}; + std::vector repitions{num_refinements, num_refinements}; + GridGenerator::subdivided_hyper_rectangle(tria, repitions, p1, p2, true); - GridTools::collect_periodic_faces(tria, 0, 1, 0, matched_pairs); - deallog << matched_pairs.size() << std::endl; - } else if constexpr (dim == 3) { - Point p1{0., 0., 0.}; - Point p2{1., 1., 1.}; - std::vector repitions{num_refinements, num_refinements, - num_refinements}; - GridGenerator::subdivided_hyper_rectangle(tria, repitions, p1, p2, true); + GridTools::collect_periodic_faces(tria, 0, 1, 0, matched_pairs); + deallog << matched_pairs.size() << std::endl; + } + else if constexpr (dim == 3) + { + Point p1{0., 0., 0.}; + Point p2{1., 1., 1.}; + std::vector repitions{num_refinements, + num_refinements, + num_refinements}; + GridGenerator::subdivided_hyper_rectangle(tria, repitions, p1, p2, true); - GridTools::collect_periodic_faces(tria, 0, 1, 0, matched_pairs); - deallog << matched_pairs.size() << std::endl; - } + GridTools::collect_periodic_faces(tria, 0, 1, 0, matched_pairs); + deallog << matched_pairs.size() << std::endl; + } } -int main(int argc, char *argv[]) { +int +main(int argc, char *argv[]) +{ Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); mpi_initlog(); MPI_Comm comm = MPI_COMM_WORLD;