diff --git a/Geo/GFaceCompound.cpp b/Geo/GFaceCompound.cpp index 7703069734eba8b09f6fc0b5732ce1e0e585a083..1acc2a23c5a6a0b5b6b4bded2ce37d215d00fa39 100644 --- a/Geo/GFaceCompound.cpp +++ b/Geo/GFaceCompound.cpp @@ -1398,7 +1398,9 @@ bool GFaceCompound::checkAspectRatio() const bool paramOK = true; if(allNodes.empty()) buildAllNodes(); + double limit = 1.e15 ; double areaMax = 0.0; + int nb = 0; std::list<GFace*>::const_iterator it = _compound.begin(); for( ; it != _compound.end() ; ++it){ for(unsigned int i = 0; i < (*it)->triangles.size(); ++i){ @@ -1417,25 +1419,26 @@ bool GFaceCompound::checkAspectRatio() const double q0[3] = {it0->second.x(), it0->second.y(), 0.0}; double q1[3] = {it1->second.x(), it1->second.y(), 0.0}; double q2[3] = {it2->second.x(), it2->second.y(), 0.0}; - double a_2D = fabs(triangle_area(q0, q1, q2)); + double a_2D = fabs(triangle_area(q0, q1, q2)); + if (1/a_2D > limit) nb++; areaMax = std::max(areaMax,1./a_2D); //printf("a3D/a2D=%g, AreaMax=%g\n", a_3D/a_2D, areaMax); } } - if (areaMax > 1.e15 ) { + if (areaMax > limit && nb > 10) { Msg::Warning("Geometrical aspect ratio too high (1/area_2D=%g)", areaMax); SBoundingBox3d bboxH = bounds(); SBoundingBox3d bboxD = bound_U0(); double H = norm(SVector3(bboxH.max(), bboxH.min())); double D = norm(SVector3(bboxD.max(), bboxD.min())); nbSplit = std::max((int)floor(.25*H/D),2); - printf("H=%g, D=%g H/4D=\n", H, D, nbSplit); + //printf("H=%g, D=%g H/4D=%d nbSplit=%d\n", H, D, (int)floor(.25*H/D), nbSplit); Msg::Info("Partition geometry in N=%d parts", nbSplit); paramOK = false; } else { - Msg::Info("Geometrical aspect ratio (1/area_2D=%g)", areaMax); + Msg::Info("Geometrical aspect ratio is OK :-)", areaMax); paramOK = true; } diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index 5a99beb3d4641b0607cb894228c7b202460fc40d..545b24549e8f32df10e0209187e43493a708f5dc 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -1177,7 +1177,7 @@ void GModel::createTopologyFromFaces(std::vector<discreteFace*> &discFaces) int numE = maxEdgeNum()+1; discreteEdge *e = new discreteEdge(this, numE, 0, 0); - printf("*** Created discreteEdge %d \n", numE); + //printf("*** Created discreteEdge %d \n", numE); add(e); discEdges.push_back(e); diff --git a/Geo/discreteEdge.cpp b/Geo/discreteEdge.cpp index d3d93f82acc5b1f2e2172fa215b8c17c6b506625..4100580492699e02033e0dfee575a302ade63358 100644 --- a/Geo/discreteEdge.cpp +++ b/Geo/discreteEdge.cpp @@ -163,7 +163,7 @@ void discreteEdge::setBoundVertices() } if(!existVertex){ GVertex *gvB = new discreteVertex(model(), model()->maxVertexNum()+1); - printf("*** Created discreteVertex %d\n", gvB->tag()); + //printf("*** Created discreteVertex %d\n", gvB->tag()); bound_vertices.push_back(gvB); vE->setEntity(gvB); gvB->mesh_vertices.push_back(vE); @@ -206,7 +206,7 @@ void discreteEdge::setBoundVertices() } if(!existVertex){ GVertex *gvB = new discreteVertex(model(), model()->maxVertexNum()+1); - printf("*** Created discreteVertex %d\n", gvB->tag()); + //printf("*** Created discreteVertex %d\n", gvB->tag()); bound_vertex = gvB; vE->setEntity(gvB); gvB->mesh_vertices.push_back(vE); diff --git a/Mesh/meshPartition.cpp b/Mesh/meshPartition.cpp index d751e32e11d89029be73ee69145ba19d23a08b8d..0ff65909b098d4956ae3f545aab10a8886775c18 100644 --- a/Mesh/meshPartition.cpp +++ b/Mesh/meshPartition.cpp @@ -191,7 +191,6 @@ int PartitionGraph(Graph &graph, meshPartitionOptions &options) } } // Ensure num_partitions reflects values used by Chaco - printf("global =%d archi=%d ndims_tot=%d mesh dim=%d\n", options.global_method, options.architecture, options.ndims_tot, options.mesh_dims[0]); switch(options.architecture) { case 0: options.num_partitions = 1 << options.ndims_tot; @@ -207,7 +206,6 @@ int PartitionGraph(Graph &graph, meshPartitionOptions &options) options.mesh_dims[0]*options.mesh_dims[1]*options.mesh_dims[2]; break; } - printf("partition in %d parts \n", options.num_partitions); try { const int iSec = 0; ier = interface