]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a test. 471/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 25 Jan 2015 04:39:51 +0000 (22:39 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 25 Jan 2015 04:39:51 +0000 (22:39 -0600)
tests/deal.II/grid_hyper_shell.cc

index 2e6ac5419d650518cdb978362c1791af2027a1aa..13cb5caf7d8a1ba5ad04f6ea062aa037be8f9664 100644 (file)
@@ -1,6 +1,6 @@
 // ---------------------------------------------------------------------
 //
-// Copyright (C) 2007 - 2014 by the deal.II authors
+// Copyright (C) 2007 - 2015 by the deal.II authors
 //
 // This file is part of the deal.II library.
 //
@@ -44,7 +44,19 @@ void check (double r1, double r2, unsigned int n)
 
   Point<dim> center;
   Triangulation<dim> tria (Triangulation<dim>::none, true);
+
+  // create a hyper shell. before a bug fix in early 2015, the coloring would
+  // only set the boundary indicators of the faces, not of the edges in
+  // 3d. the test was written in a way that it tests with this bug present, so
+  // undo the big fix here
   GridGenerator::hyper_shell (tria, center, r1, r2, n, true);
+  if (dim==3)
+    for (typename Triangulation<dim>::active_cell_iterator c=tria.begin_active(); c!=tria.end(); ++c)
+      for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
+       if (c->face(f)->at_boundary())
+         for (unsigned int e=0; e<GeometryInfo<dim>::lines_per_face; ++e)
+           c->face(f)->line(e)->set_boundary_indicator(0);
+  
   static const HyperShellBoundary<dim> boundary(center);
   tria.set_boundary(0, 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.