]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make bits/grid_generator_01 work again.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 11 Nov 2010 16:19:20 +0000 (16:19 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 11 Nov 2010 16:19:20 +0000 (16:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@22687 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/grid/grid_generator.cc

index 902094e5895680d3641adee49821db682d3dec34..71ac661a7be1437fa6c4043aaf7ed75852c2aa7c 100644 (file)
@@ -139,11 +139,16 @@ template <int dim, int spacedim>
 void
 GridGenerator::colorize_hyper_rectangle (Triangulation<dim,spacedim> &tria)
 {
-                                  // there is only one cell, so
-                                  // simple task
-  const typename Triangulation<dim,spacedim>::cell_iterator cell = tria.begin();
-  for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
-    cell->face(f)->set_boundary_indicator (f);
+                                  // there is nothing to do in 1d
+  if (dim > 1)
+    {
+                                      // there is only one cell, so
+                                      // simple task
+      const typename Triangulation<dim,spacedim>::cell_iterator
+       cell = tria.begin();
+      for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
+       cell->face(f)->set_boundary_indicator (f);
+    }
 }
 
 

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.