]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Check in create_triangulation that all cells have positive volume.
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 5 Jul 2005 17:58:13 +0000 (17:58 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 5 Jul 2005 17:58:13 +0000 (17:58 +0000)
git-svn-id: https://svn.dealii.org/trunk@11061 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/tria.cc

index 3e39e4d3013884cbc3a5dd311f2a579f58b74418..ec9c7c22be29ee60e3e7b7c03f663202afdf81f7 100644 (file)
@@ -1183,7 +1183,13 @@ Triangulation<3>::create_triangulation (const std::vector<Point<3> >    &v,
     if (quad->at_boundary())
       for (unsigned int l=0; l<4; ++l)
        quad->line(l)->set_boundary_indicator (0);
-
+  
+                                  // Check that all cells have
+                                  // positive volume
+  Triangulation<dim>::active_cell_iterator cell=tria->begin_active(),
+                                          endc=tria->end();
+  for (unsigned int c=0; cell!=endc; ++cell, ++c)
+    AssertThrow(cell->measure()>0, ExcCellNegativeMeasure(c));
 
                                   ///////////////////////////////////////
                                   // now set boundary indicators
@@ -1249,7 +1255,6 @@ Triangulation<3>::create_triangulation (const std::vector<Point<3> >    &v,
       line->set_boundary_indicator (boundary_line->material_id);
     }
 
-
                                   // now go on with boundary faces
   std::vector<CellData<2> >::const_iterator boundary_quad
     = subcelldata.boundary_quads.begin();

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.