diff --git a/Mesh/BDS.cpp b/Mesh/BDS.cpp index 107586b149c268302cae6f165bedfcc999ceed82..1d4fc36ac928ad07fd1be88cbd464d8d0a1be201 100644 --- a/Mesh/BDS.cpp +++ b/Mesh/BDS.cpp @@ -1,4 +1,4 @@ -// $Id: BDS.cpp,v 1.87 2008-01-14 21:29:13 remacle Exp $ +// $Id: BDS.cpp,v 1.88 2008-01-15 19:50:58 remacle Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -1308,21 +1308,25 @@ bool BDS_Mesh::smooth_point_centroid(BDS_Point * p, GFace *gf) const double oldY = p->Y; const double oldZ = p->Z; - double oldU=U; - double oldV=V; + double oldU=p->u; + double oldV=p->v; it = ts.begin(); double s1=0,s2=0; while(it != ite) { - BDS_Face *t = *it; + BDS_Face *t = *it; BDS_Point *n[4]; t->getNodes(n); p->u = U; p->v = V; - s1 += fabs(surface_triangle_param(n[0],n[1],n[2])); + double snew = fabs(surface_triangle_param(n[0],n[1],n[2])); + s1 += snew; p->u = oldU; p->v = oldV; - s2 += fabs(surface_triangle_param(n[0],n[1],n[2])); + double sold = fabs(surface_triangle_param(n[0],n[1],n[2])); + s2 += sold; + // printf("%22.15E %22.15E\n",snew,sold); + // if ( snew < .1 * sold) return false; // if (!test_move_point_parametric_triangle ( p, U, V, t)){ // return false; @@ -1338,7 +1342,9 @@ bool BDS_Mesh::smooth_point_centroid(BDS_Point * p, GFace *gf) ++it; } - if (fabs(s2-s1) > 1.e-10 * (s2+s1))return false; + // printf("%22.15E %22.15E %22.15E\n",s1,s2,fabs(s2-s1)); + if (fabs(s2-s1) > 1.e-14 * (s2+s1))return false; + // if (newWorst < 1.e-2) // { diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp index 9358f946223df3c789e776d9745b3a886f92aa79..74e28e80d91b5f152ff1f3a069a8699f8d514230 100644 --- a/Mesh/meshGFace.cpp +++ b/Mesh/meshGFace.cpp @@ -1,4 +1,4 @@ -// $Id: meshGFace.cpp,v 1.104 2008-01-14 21:29:14 remacle Exp $ +// $Id: meshGFace.cpp,v 1.105 2008-01-15 19:50:58 remacle Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -2253,7 +2253,7 @@ void meshGFace::operator() (GFace *gf) { Msg(DEBUG1, "Generating the mesh"); if(noseam (gf) || gf->getNativeType() == GEntity::GmshModel || gf->edgeLoops.empty()){ - // gmsh2DMeshGenerator(gf,0, true); + //gmsh2DMeshGenerator(gf,0, true); gmsh2DMeshGenerator(gf,0, false); } else{ diff --git a/Mesh/meshGRegionDelaunayInsertion.cpp b/Mesh/meshGRegionDelaunayInsertion.cpp index d78c2e2104c7b07aff09072c8d418dd0fd8a7bcc..f73352931215afc60bce440764febb55f6ce8295 100644 --- a/Mesh/meshGRegionDelaunayInsertion.cpp +++ b/Mesh/meshGRegionDelaunayInsertion.cpp @@ -1,4 +1,4 @@ -// $Id: meshGRegionDelaunayInsertion.cpp,v 1.26 2008-01-14 21:29:14 remacle Exp $ +// $Id: meshGRegionDelaunayInsertion.cpp,v 1.27 2008-01-15 19:50:58 remacle Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -662,7 +662,7 @@ void gmshOptimizeMesh (GRegion *gr, const gmshQualityMeasure4Tet &qm) } } - if (!newTets.size()){ + if (0 && !newTets.size()){ int nbSlivers = 0; int nbSliversWeCanDoSomething = 0; for (int i=0;i<illegals.size();i++)