]> https://gitweb.dealii.org/ - dealii.git/commitdiff
nicer error message when refining an empty Triangulation
authorTimo Heister <timo.heister@gmail.com>
Thu, 27 Sep 2012 22:14:23 +0000 (22:14 +0000)
committerTimo Heister <timo.heister@gmail.com>
Thu, 27 Sep 2012 22:14:23 +0000 (22:14 +0000)
git-svn-id: https://svn.dealii.org/trunk@26810 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/grid/tria.cc

index 0e0f18ad22a910a0ff9d1812170ec0e1ca3813a5..d52648089f453ff62190040bd2c79e08ee169c52 100644 (file)
@@ -9845,6 +9845,7 @@ void Triangulation<dim, spacedim>::distort_random (const double factor,
 template <int dim, int spacedim>
 void Triangulation<dim, spacedim>::set_all_refine_flags ()
 {
+  Assert(n_cells()>0, ExcMessage("Error: An empty Triangulation can not be refined."));
   active_cell_iterator cell = begin_active(),
                        endc = end();
 

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.