]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
fix boundary numbers on 3D cylinder
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 19 Sep 2003 12:19:51 +0000 (12:19 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 19 Sep 2003 12:19:51 +0000 (12:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@7988 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/grid_generator.cc

index a7abb7b0692a96cb4eb2c01f9933f4da2f808fff..46b35159f381b494ba0578ea322c9978d81a8a93 100644 (file)
@@ -1146,10 +1146,16 @@ GridGenerator::cylinder (Triangulation<3> &tria,
   
   while (cell != end)
     {
-      if (cell->face(0)->boundary_indicator() != 255)
-       cell->face(0)->set_boundary_indicator(1);
-      if (cell->face(1)->boundary_indicator() != 255)
-       cell->face(1)->set_boundary_indicator(2);
+      for (unsigned int i=0;i<GeometryInfo<3>::faces_per_cell;++i)
+       {
+         if (cell->face(i)->boundary_indicator() == 255)
+           continue;
+         
+         if (cell->face(i)->center()(0) > 1.-1.e-5)
+           cell->face(i)->set_boundary_indicator(2);
+         else if (cell->face(i)->center()(0) < -1.+1.e-5)
+           cell->face(i)->set_boundary_indicator(1);
+       }
       ++cell;
     }
 }

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.