From 28c10440cbcf00969e8fe98f7497e8f56f9bd1b5 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sun, 26 Nov 2006 03:25:09 +0000
Subject: [PATCH] *** empty log message ***

---
 Mesh/Generator.cpp | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp
index be27f67bc4..e9d94362cd 100644
--- a/Mesh/Generator.cpp
+++ b/Mesh/Generator.cpp
@@ -1,4 +1,4 @@
-// $Id: Generator.cpp,v 1.105 2006-11-26 01:11:01 geuzaine Exp $
+// $Id: Generator.cpp,v 1.106 2006-11-26 03:25:09 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -189,22 +189,20 @@ bool TooManyElements(int dim){
   for(GModel::viter it = GMODEL->firstVertex(); it != GMODEL->lastVertex(); ++it)
     sumAllLc += (*it)->prescribedMeshSizeAtVertex();
   sumAllLc /= (double)GMODEL->numVertex();
-  if(pow(CTX.lc / sumAllLc, dim) < 1.e7) return false;
-  return !GetBinaryAnswer("Your choice of characteristic lengths will likely produce\n"
-			  "a very large mesh. Do you really want to continue?\n\n"
-			  "(To disable this warning in the future, select `Enable\n"
-			  "expert mode' in the option dialog.)",
-			  "Continue", "Cancel");
+  if(!sumAllLc || pow(CTX.lc / sumAllLc, dim) > 1.e7) 
+    return !GetBinaryAnswer("Your choice of characteristic lengths will likely produce\n"
+			    "a very large mesh. Do you really want to continue?\n\n"
+			    "(To disable this warning in the future, select `Enable\n"
+			    "expert mode' in the option dialog.)",
+			    "Continue", "Cancel");
+  return false;
 }
 
 void Mesh1D()
 {
   if(TooManyElements(1)) return;
-
   double t1 = Cpu();
-
   std::for_each(GMODEL->firstEdge(), GMODEL->lastEdge(), meshGEdge());
-
   double t2 = Cpu();
   CTX.mesh_timer[0] = t2 - t1;
 }
@@ -212,7 +210,6 @@ void Mesh1D()
 void Mesh2D()
 {
   if(TooManyElements(2)) return;
-
   double t1 = Cpu();
   std::for_each(GMODEL->firstFace(), GMODEL->lastFace(), meshGFace());
   double t2 = Cpu();
@@ -222,7 +219,6 @@ void Mesh2D()
 void Mesh3D()
 {
   if(TooManyElements(3)) return;
-
   double t1 = Cpu();
   std::for_each(GMODEL->firstRegion(), GMODEL->lastRegion(), meshGRegion());
   double t2 = Cpu();
-- 
GitLab