Skip to content
Snippets Groups Projects
Commit 28c10440 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent 8ffd1a3e
Branches
Tags
No related merge requests found
// $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 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
// //
...@@ -189,22 +189,20 @@ bool TooManyElements(int dim){ ...@@ -189,22 +189,20 @@ bool TooManyElements(int dim){
for(GModel::viter it = GMODEL->firstVertex(); it != GMODEL->lastVertex(); ++it) for(GModel::viter it = GMODEL->firstVertex(); it != GMODEL->lastVertex(); ++it)
sumAllLc += (*it)->prescribedMeshSizeAtVertex(); sumAllLc += (*it)->prescribedMeshSizeAtVertex();
sumAllLc /= (double)GMODEL->numVertex(); sumAllLc /= (double)GMODEL->numVertex();
if(pow(CTX.lc / sumAllLc, dim) < 1.e7) return false; if(!sumAllLc || pow(CTX.lc / sumAllLc, dim) > 1.e7)
return !GetBinaryAnswer("Your choice of characteristic lengths will likely produce\n" return !GetBinaryAnswer("Your choice of characteristic lengths will likely produce\n"
"a very large mesh. Do you really want to continue?\n\n" "a very large mesh. Do you really want to continue?\n\n"
"(To disable this warning in the future, select `Enable\n" "(To disable this warning in the future, select `Enable\n"
"expert mode' in the option dialog.)", "expert mode' in the option dialog.)",
"Continue", "Cancel"); "Continue", "Cancel");
return false;
} }
void Mesh1D() void Mesh1D()
{ {
if(TooManyElements(1)) return; if(TooManyElements(1)) return;
double t1 = Cpu(); double t1 = Cpu();
std::for_each(GMODEL->firstEdge(), GMODEL->lastEdge(), meshGEdge()); std::for_each(GMODEL->firstEdge(), GMODEL->lastEdge(), meshGEdge());
double t2 = Cpu(); double t2 = Cpu();
CTX.mesh_timer[0] = t2 - t1; CTX.mesh_timer[0] = t2 - t1;
} }
...@@ -212,7 +210,6 @@ void Mesh1D() ...@@ -212,7 +210,6 @@ void Mesh1D()
void Mesh2D() void Mesh2D()
{ {
if(TooManyElements(2)) return; if(TooManyElements(2)) return;
double t1 = Cpu(); double t1 = Cpu();
std::for_each(GMODEL->firstFace(), GMODEL->lastFace(), meshGFace()); std::for_each(GMODEL->firstFace(), GMODEL->lastFace(), meshGFace());
double t2 = Cpu(); double t2 = Cpu();
...@@ -222,7 +219,6 @@ void Mesh2D() ...@@ -222,7 +219,6 @@ void Mesh2D()
void Mesh3D() void Mesh3D()
{ {
if(TooManyElements(3)) return; if(TooManyElements(3)) return;
double t1 = Cpu(); double t1 = Cpu();
std::for_each(GMODEL->firstRegion(), GMODEL->lastRegion(), meshGRegion()); std::for_each(GMODEL->firstRegion(), GMODEL->lastRegion(), meshGRegion());
double t2 = Cpu(); double t2 = Cpu();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment