diff --git a/Mesh/2D_DivAndConq.cpp b/Mesh/2D_DivAndConq.cpp index 0c614165532b8271f2c8a4ab6915dc027846ce61..c8dbfb2a96a69a913e03adbf94352454f55c793b 100644 --- a/Mesh/2D_DivAndConq.cpp +++ b/Mesh/2D_DivAndConq.cpp @@ -1,4 +1,4 @@ -/* $Id: 2D_DivAndConq.cpp,v 1.6 2000-11-28 11:28:31 geuzaine Exp $ */ +/* $Id: 2D_DivAndConq.cpp,v 1.7 2000-11-28 12:59:24 geuzaine Exp $ */ /* A L G O R I T H M E D I V I D E A N D C O N Q U E R @@ -341,7 +341,7 @@ int CircumCircle(double x1,double y1,double x2,double y2,double x3,double y3, d = 2. * (double)(y1*(x2-x3)+y2*(x3-x1)+y3*(x1-x2)); if (d == 0.0){ - Msg(WARNING, "Points Colinear in CircumCircle"); + Msg(WARNING, "Colinear Points in CircumCircle"); *xc = *yc = -99999.; return(0); } diff --git a/Mesh/3D_Mesh.cpp b/Mesh/3D_Mesh.cpp index e524d0966f097e0178a4deb36cb0b3a489604282..6fd0ba042c11065ed72ab2ce0fe1188f804fed23 100644 --- a/Mesh/3D_Mesh.cpp +++ b/Mesh/3D_Mesh.cpp @@ -1,4 +1,4 @@ -/* $Id: 3D_Mesh.cpp,v 1.8 2000-11-27 17:13:49 geuzaine Exp $ */ +/* $Id: 3D_Mesh.cpp,v 1.9 2000-11-28 12:59:24 geuzaine Exp $ */ /* J-F Remacle 1995 @@ -156,9 +156,9 @@ int Pt_In_Circum (Simplex * s, Vertex * v){ DSQR (v->Pos.Z - s->Center.Z)); eps = fabs (d1 - d2) / (d1 + d2); - + if (eps < 1.e-12){ - return (0); /* c'etait 1! GEUZ ????*/ + return (1); } if (d2 < d1) @@ -456,6 +456,7 @@ int recur_bowyer (Simplex * s){ } else{ if (s->iEnt != s->S[i]->iEnt){ + //Msg(WARNING, "Point Scabreux %d", s->S[i]->Num); Alerte_Point_Scabreux = 1; } Tree_Insert (Sim_Sur_Le_Bord, &s->S[i]); @@ -534,7 +535,7 @@ bool Bowyer_Watson (Mesh * m, Vertex * v, Simplex * S, int force){ List_Reset (Simplexes_New); Tree_Delete (Sim_Sur_Le_Bord); Tree_Delete (Tsd); - //printf(" %22.15E %22.15E\n",volumeold,volumenew); + printf(" Aie Aie Aie volume changed %g -> %g\n",volumeold,volumenew); return false; } } @@ -565,7 +566,7 @@ bool Bowyer_Watson (Mesh * m, Vertex * v, Simplex * S, int force){ } double rand_sign(){ - return (rand() % 2 == 0)?-1.0:1.0; + return (rand()/RAND_MAX < 0.5)?-1.0:1.0; } void Convex_Hull_Mesh (List_T * Points, Mesh * m){ @@ -613,6 +614,8 @@ void Convex_Hull_Mesh (List_T * Points, Mesh * m){ bool ca_marche = Bowyer_Watson (m, THEV, THES, 1); int count = 0; while(!ca_marche){ + Msg(INFOS, "Unable to Add Point %d (%g,%g,%g)", + THEV->Num, THEV->Pos.X,THEV->Pos.Y,THEV->Pos.Z ); count ++; double dx = rand_sign() * 10 * CTX.mesh.rand_factor * LC3D * rand()/RAND_MAX; double dy = rand_sign() * 10 * CTX.mesh.rand_factor * LC3D * rand()/RAND_MAX; diff --git a/Mesh/Simplex.cpp b/Mesh/Simplex.cpp index 75b88e87c43f768abaa8df6988af2dc407ac8601..c95ebb92648ec799810b419c5c87a0ed74cd04e5 100644 --- a/Mesh/Simplex.cpp +++ b/Mesh/Simplex.cpp @@ -1,4 +1,4 @@ -/* $Id: Simplex.cpp,v 1.7 2000-11-26 15:43:47 geuzaine Exp $ */ +/* $Id: Simplex.cpp,v 1.8 2000-11-28 12:59:24 geuzaine Exp $ */ #include "Gmsh.h" #include "Const.h" @@ -161,11 +161,11 @@ void Simplex::center_tet (double X[4], double Y[4], double Z[4], double res[3]){ mat[2][1] = Y[3] - Y[2]; mat[2][2] = Z[3] - Z[2]; - if (!sys3x3 (mat, b, res, &dum)) - { - res[0] = res[1] = res[2] = 10.0e10; - } - + if (!sys3x3 (mat, b, res, &dum)){ + Msg(WARNING, "Coplanar Points in CircumCircle"); + res[0] = res[1] = res[2] = 10.0e10; + } + } double Simplex::matsimpl (double mat[3][3]){ diff --git a/demos/ex02.geo b/demos/ex02.geo index bf88a91f98aee0ea9b84a418e16fee0ff28f669b..43b7246ad48c1214d36773f0d50a1883d3715541 100644 --- a/demos/ex02.geo +++ b/demos/ex02.geo @@ -6,6 +6,8 @@ All important comments are marked with "README" */ +// -clscale 0.2 ==> 169932 Nodes, 1005779 Elements in 1095.95 s + lcar1 = .1; lcar2 = .0005;