]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix indentation
authorNils Schween <symbolschubser@riseup.net>
Wed, 15 Mar 2023 09:10:19 +0000 (10:10 +0100)
committerNils Schween <symbolschubser@riseup.net>
Wed, 15 Mar 2023 09:15:07 +0000 (10:15 +0100)
source/grid/grid_tools_dof_handlers.inst.in
tests/grid/grid_tools_collect_periodic_faces_parallel_shared_tria.cc

index e307d272e71de336d50f08b400e32c9b3095453c..c8f198d660a0b63f46f964e06bbb59130e950866 100644 (file)
@@ -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<deal_II_dimension,
-                                       deal_II_space_dimension>>(
-       const parallel::shared::Triangulation<deal_II_dimension,
-                                             deal_II_space_dimension> &,
-       const types::boundary_id,
-       const types::boundary_id,
-       const unsigned int,
-       std::vector<PeriodicFacePair<parallel::shared::Triangulation<
-         deal_II_dimension,
-         deal_II_space_dimension>::cell_iterator>> &,
-       const Tensor<1,
-                    parallel::shared::Triangulation<
-                      deal_II_dimension,
-                      deal_II_space_dimension>::space_dimension> &,
-       const FullMatrix<double> &);
-     template void
-     collect_periodic_faces<
-       parallel::shared::Triangulation<deal_II_dimension,
-                                       deal_II_space_dimension>>(
-       const parallel::shared::Triangulation<deal_II_dimension,
-                                             deal_II_space_dimension> &,
-       const types::boundary_id,
-       const unsigned int,
-       std::vector<PeriodicFacePair<parallel::shared::Triangulation<
-         deal_II_dimension,
-         deal_II_space_dimension>::cell_iterator>> &,
-       const Tensor<1,
-                    parallel::shared::Triangulation<
-                      deal_II_dimension,
-                      deal_II_space_dimension>::space_dimension> &,
-       const FullMatrix<double> &);
-   \}
+    namespace GridTools
+    \{
+      template void
+      collect_periodic_faces<
+        parallel::shared::Triangulation<deal_II_dimension,
+                                        deal_II_space_dimension>>(
+        const parallel::shared::Triangulation<deal_II_dimension,
+                                              deal_II_space_dimension> &,
+        const types::boundary_id,
+        const types::boundary_id,
+        const unsigned int,
+        std::vector<PeriodicFacePair<parallel::shared::Triangulation<
+          deal_II_dimension,
+          deal_II_space_dimension>::cell_iterator>> &,
+        const Tensor<1,
+                     parallel::shared::Triangulation<
+                       deal_II_dimension,
+                       deal_II_space_dimension>::space_dimension> &,
+        const FullMatrix<double> &);
+      template void
+      collect_periodic_faces<
+        parallel::shared::Triangulation<deal_II_dimension,
+                                        deal_II_space_dimension>>(
+        const parallel::shared::Triangulation<deal_II_dimension,
+                                              deal_II_space_dimension> &,
+        const types::boundary_id,
+        const unsigned int,
+        std::vector<PeriodicFacePair<parallel::shared::Triangulation<
+          deal_II_dimension,
+          deal_II_space_dimension>::cell_iterator>> &,
+        const Tensor<1,
+                     parallel::shared::Triangulation<
+                       deal_II_dimension,
+                       deal_II_space_dimension>::space_dimension> &,
+        const FullMatrix<double> &);
+    \}
 #endif
   }
index eb47df5be68af5edcc24bb6569dd093a544fafe1..4654a0e589060411b6da43e3defbc03f1eb93096 100644 (file)
 #include <deal.II/base/exceptions.h>
 #include <deal.II/base/mpi.h>
 #include <deal.II/base/point.h>
+
 #include <deal.II/distributed/shared_tria.h>
 #include <deal.II/distributed/tria.h>
+
 #include <deal.II/grid/grid_generator.h>
 #include <deal.II/grid/grid_tools.h>
 #include <deal.II/grid/tria.h>
 #include "../tests.h"
 
 template <int dim>
-void test(MPI_Comm comm) {
+void
+test(MPI_Comm comm)
+{
   deallog << "dim = " << dim << std::endl;
   parallel::shared::Triangulation<dim> tria(comm);
 
   std::vector<typename GridTools::PeriodicFacePair<
-      typename parallel::shared::Triangulation<dim>::cell_iterator>>
-      matched_pairs;
+    typename parallel::shared::Triangulation<dim>::cell_iterator>>
+    matched_pairs;
 
   unsigned int num_refinements = 1 << 4;
 
-  if constexpr (dim == 1) {
-    Point<dim> p1{0.};
-    Point<dim> p2{1.};
-    std::vector<unsigned int> repitions{num_refinements};
-    GridGenerator::subdivided_hyper_rectangle(tria, repitions, p1, p2, true);
+  if constexpr (dim == 1)
+    {
+      Point<dim>                p1{0.};
+      Point<dim>                p2{1.};
+      std::vector<unsigned int> 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<dim> p1{0., 0.};
-    Point<dim> p2{1., 1.};
-    std::vector<unsigned int> 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<dim>                p1{0., 0.};
+      Point<dim>                p2{1., 1.};
+      std::vector<unsigned int> 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<dim> p1{0., 0., 0.};
-    Point<dim> p2{1., 1., 1.};
-    std::vector<unsigned int> 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<dim>                p1{0., 0., 0.};
+      Point<dim>                p2{1., 1., 1.};
+      std::vector<unsigned int> 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;

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.