]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add tests for cases that lead to wrong boundary ID
authorBruno Blais <blais.bruno@gmail.com>
Sun, 25 Feb 2024 18:33:12 +0000 (13:33 -0500)
committerBruno Blais <blais.bruno@gmail.com>
Sun, 25 Feb 2024 18:33:12 +0000 (13:33 -0500)
tests/grid/grid_generator_cylinder_shell_colorized.cc
tests/grid/grid_generator_cylinder_shell_colorized.output

index 454c20b9c0a0c21d5e2a9b72300f230400c62ace..c4d7066e95db6299a7ec6d8c779b720393be698c 100644 (file)
@@ -30,7 +30,8 @@ template <int dim>
 void
 test(std::ostream &out)
 {
-  deallog << "cylinder_shell colorized" << std::endl;
+  deallog << "cylinder_shell colorized with default aspect ratio" << std::endl;
+  {
   Triangulation<dim> tr;
   GridGenerator::cylinder_shell(tr, 2., 5., 6., 0, 0, true);
 
@@ -46,6 +47,26 @@ test(std::ostream &out)
                     << " faceidx = " << face->index() << std::endl;
         }
     }
+  }
+
+  deallog << "cylinder_shell colorized with 3:2 ratio " << std::endl;
+  {
+  Triangulation<dim> tr;
+  GridGenerator::cylinder_shell(tr, 2., 5., 6., 3, 2, true);
+
+  for (const auto &cell : tr.active_cell_iterators())
+    {
+      deallog << "cell:" << std::endl;
+
+      for (const auto &face : cell->face_iterators())
+        {
+          if (face->at_boundary())
+            deallog << "boundary id = " << face->boundary_id()
+                    << " center = " << face->center()
+                    << " faceidx = " << face->index() << std::endl;
+        }
+    }
+  }
 }
 
 
index ff129338a6f154956fdbef1ed501880ce0130b03..cc87d9d16f8d00a35adca034633287e7aed34a16 100644 (file)
@@ -1,5 +1,5 @@
 
-DEAL::cylinder_shell colorized
+DEAL::cylinder_shell colorized with default aspect ratio
 DEAL::cell:
 DEAL::boundary id = 2 center = 5.45581 0.491031 0.00000 faceidx = 0
 DEAL::boundary id = 1 center = 5.95179 0.535671 0.333333 faceidx = 35
@@ -385,3 +385,28 @@ DEAL::cell:
 DEAL::boundary id = 3 center = 5.45581 -0.491031 2.00000 faceidx = 418
 DEAL::boundary id = 1 center = 5.95179 -0.535671 1.66667 faceidx = 417
 DEAL::boundary id = 0 center = 4.95982 -0.446392 1.66667 faceidx = 454
+DEAL::cylinder_shell colorized with 3:2 ratio 
+DEAL::cell:
+DEAL::boundary id = 2 center = 1.37500 2.38157 0.00000 faceidx = 0
+DEAL::boundary id = 1 center = 1.50000 2.59808 0.500000 faceidx = 3
+DEAL::boundary id = 0 center = 1.25000 2.16506 0.500000 faceidx = 12
+DEAL::cell:
+DEAL::boundary id = 2 center = -2.75000 1.11022e-15 0.00000 faceidx = 1
+DEAL::boundary id = 1 center = -3.00000 8.88178e-16 0.500000 faceidx = 6
+DEAL::boundary id = 0 center = -2.50000 8.88178e-16 0.500000 faceidx = 13
+DEAL::cell:
+DEAL::boundary id = 2 center = 1.37500 -2.38157 0.00000 faceidx = 2
+DEAL::boundary id = 1 center = 1.50000 -2.59808 0.500000 faceidx = 9
+DEAL::boundary id = 0 center = 1.25000 -2.16506 0.500000 faceidx = 14
+DEAL::cell:
+DEAL::boundary id = 3 center = 1.37500 2.38157 2.00000 faceidx = 16
+DEAL::boundary id = 1 center = 1.50000 2.59808 1.50000 faceidx = 15
+DEAL::boundary id = 0 center = 1.25000 2.16506 1.50000 faceidx = 24
+DEAL::cell:
+DEAL::boundary id = 3 center = -2.75000 1.11022e-15 2.00000 faceidx = 19
+DEAL::boundary id = 1 center = -3.00000 8.88178e-16 1.50000 faceidx = 18
+DEAL::boundary id = 0 center = -2.50000 8.88178e-16 1.50000 faceidx = 25
+DEAL::cell:
+DEAL::boundary id = 3 center = 1.37500 -2.38157 2.00000 faceidx = 22
+DEAL::boundary id = 1 center = 1.50000 -2.59808 1.50000 faceidx = 21
+DEAL::boundary id = 0 center = 1.25000 -2.16506 1.50000 faceidx = 26

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.