]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Merge pull request #784 from luca-heltai/grid-generators-codim-one
authorLuca Heltai <luca.heltai@sissa.it>
Sun, 12 Apr 2015 18:11:26 +0000 (20:11 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Sun, 12 Apr 2015 18:11:26 +0000 (20:11 +0200)
Make subdivided hyper cube/rectangle work for general Triangulation.

1  2 
doc/news/changes.h
include/deal.II/grid/grid_generator.h
source/grid/grid_generator.cc

Simple merge
Simple merge
index 44add74bcd2f62d9b6c16c930719ef55dbb2a1f2,5dd92b5e48cef4649a4d0cb8ba633e6839523aa7..3c3730a43984439c755b994b7a853bc757075515
@@@ -114,25 -115,25 +115,25 @@@ namespace GridGenerato
        // should be smaller than the smallest cell
        // diameter.
  
-       typename Triangulation<dim>::face_iterator face = tria.begin_face(),
-                                                  endface = tria.end_face();
+       typename Triangulation<dim,spacedim>::face_iterator face = tria.begin_face(),
+                                                           endface = tria.end_face();
        for (; face!=endface; ++face)
          {
 -          if (face->boundary_indicator() == 0)
 +          if (face->boundary_id() == 0)
              {
-               const Point<dim> center (face->center());
+               const Point<spacedim> center (face->center());
                if (std::abs(center(0)-p1[0]) < epsilon)
 -                face->set_boundary_indicator(0);
 +                face->set_boundary_id(0);
                else if (std::abs(center(0) - p2[0]) < epsilon)
 -                face->set_boundary_indicator(1);
 +                face->set_boundary_id(1);
                else if (dim > 1 && std::abs(center(1) - p1[1]) < epsilon)
 -                face->set_boundary_indicator(2);
 +                face->set_boundary_id(2);
                else if (dim > 1 && std::abs(center(1) - p2[1]) < epsilon)
 -                face->set_boundary_indicator(3);
 +                face->set_boundary_id(3);
                else if (dim > 2 && std::abs(center(2) - p1[2]) < epsilon)
 -                face->set_boundary_indicator(4);
 +                face->set_boundary_id(4);
                else if (dim > 2 && std::abs(center(2) - p2[2]) < epsilon)
 -                face->set_boundary_indicator(5);
 +                face->set_boundary_id(5);
                else
                  // triangulation says it
                  // is on the boundary,

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.