diff --git a/Geo/GEdge.cpp b/Geo/GEdge.cpp index 4c4606cafcdf59af4f1064758ffa522bbb0c63e1..a495a7027741e7c98e6533b750857c0cbe09f81d 100644 --- a/Geo/GEdge.cpp +++ b/Geo/GEdge.cpp @@ -279,7 +279,7 @@ double GEdge::length(const double &u0, const double &u1, const int nbQuadPoints) */ -const double GOLDEN = (1. + sqrt(5)) / 2.; +const double GOLDEN = (1. + sqrt(5.)) / 2.; const double GOLDEN2 = 2 - GOLDEN; // x1 and x3 are the current bounds; the minimum is between them. diff --git a/Mesh/meshGFaceDelaunayInsertion.cpp b/Mesh/meshGFaceDelaunayInsertion.cpp index 18b4b799db30e226d1ca50b72cc9ff2c37d15d92..4824297c274a2564224b375802ac3be4f0762ff5 100644 --- a/Mesh/meshGFaceDelaunayInsertion.cpp +++ b/Mesh/meshGFaceDelaunayInsertion.cpp @@ -1138,7 +1138,7 @@ void optimalPointFrontalQuad (GFace *gf, const double rhoM = Extend1dMeshIn2dSurfaces() ? std::min(rhoM1, rhoM2) : rhoM2; const double rhoM_hat = std::min(std::max(rhoM, p), (p * p + q * q) / (2 * q)); - const double factor = (rhoM_hat + sqrt (rhoM_hat * rhoM_hat - p * p)) /(sqrt(3)*p); + const double factor = (rhoM_hat + sqrt (rhoM_hat * rhoM_hat - p * p)) /(sqrt(3.)*p); double npx,npy; if (xp*yp > 0){ @@ -1197,7 +1197,7 @@ void bowyerWatsonFrontalLayers(GFace *gf, bool quad) } if (quad){ - LIMIT_ = sqrt(2)*.99; + LIMIT_ = sqrt(2.) * .99; MTri3::radiusNorm =-1; } diff --git a/Mesh/meshGFaceLloyd.cpp b/Mesh/meshGFaceLloyd.cpp index b06f3a2b1e475967630b97294dd7bd3e342532b2..8b7de441c243883d9893ba16acaa7279bf3bf241 100644 --- a/Mesh/meshGFaceLloyd.cpp +++ b/Mesh/meshGFaceLloyd.cpp @@ -283,7 +283,7 @@ void smoothing::optimize_face(GFace* gf){ double epsf; double epsx; lpcvt obj; - double initial_conditions[2*triangulator.numPoints]; + std::vector<double> initial_conditions(2*triangulator.numPoints); alglib::ae_int_t maxits; alglib::minlbfgsstate state; alglib::minlbfgsreport rep; @@ -313,7 +313,7 @@ void smoothing::optimize_face(GFace* gf){ } } - x.setcontent(2*num_interior,initial_conditions); + x.setcontent(2*num_interior, &initial_conditions[0]); octree = backgroundMesh::current()->get_octree(); diff --git a/Mesh/meshGRegionDelaunayInsertion.cpp b/Mesh/meshGRegionDelaunayInsertion.cpp index 9eb2efa6bd2e7d1a8124d1307198e7dc5b7acf74..8d52c8cb5f6e529aee1839403693c84231f0b6af 100644 --- a/Mesh/meshGRegionDelaunayInsertion.cpp +++ b/Mesh/meshGRegionDelaunayInsertion.cpp @@ -190,7 +190,7 @@ bool insertVertex(MVertex *v, ++ittet; } - MTet4** newTets = new MTet4*[shell.size()];; + MTet4** newTets = new MTet4*[shell.size()]; int k = 0; std::list<faceXtet>::iterator it = shell.begin(); @@ -966,7 +966,7 @@ void bowyerWatsonFrontalLayers(GRegion *gr, bool hex) } if (hex){ - LIMIT_ = sqrt(2)*.99; + LIMIT_ = sqrt(2.) * .99; MTet4::radiusNorm =-1; } diff --git a/Mesh/meshGRegionDelaunayInsertion.h b/Mesh/meshGRegionDelaunayInsertion.h index cdd9b581a303ca77e6ff31658352e7fd9890daf5..96201ffc66db8eda29d73cc360e75b1ecd277265 100644 --- a/Mesh/meshGRegionDelaunayInsertion.h +++ b/Mesh/meshGRegionDelaunayInsertion.h @@ -176,7 +176,7 @@ void bowyerWatsonFrontalLayers(GRegion *gr, bool hex); class compareTet4Ptr { public: - inline bool operator () (const MTet4 *a, const MTet4 *b) + inline bool operator () (const MTet4 *a, const MTet4 *b) const { if (a->getRadius() > b->getRadius()) return true; if (a->getRadius() < b->getRadius()) return false; diff --git a/Plugin/Distance.cpp b/Plugin/Distance.cpp index 345e74b4a927e3bdd9e2b4775bf31b7c2e4413bd..5a2922bafc2b29ae09dd8617ea7ee2b91ea8e3b5 100644 --- a/Plugin/Distance.cpp +++ b/Plugin/Distance.cpp @@ -261,7 +261,7 @@ PView *GMSH_DistancePlugin::execute(PView *v) if((e->getNumVertices() == 2 && order==1) || (e->getNumVertices() == 3 && order==2)){ signedDistancesPointsLine(iDistances, iClosePts, pts, p1,p2); } - else if((e->getNumVertices() == 3 and order==1) or (e->getNumVertices() == 6 and order==2)){ + else if((e->getNumVertices() == 3 && order == 1) || (e->getNumVertices() == 6 && order==2)){ MVertex *v3 = e->getVertex(2); SPoint3 p3 (v3->x(),v3->y(),v3->z()); signedDistancesPointsTriangle(iDistances, iClosePts, pts, p1, p2, p3); diff --git a/contrib/mmg3d/build/sources/analarcutting.c b/contrib/mmg3d/build/sources/analarcutting.c index e36ca1413466ddd2ce0daf96a7ce343d8ce8c019..a2f6bef29ec59c553c08af78bf057797174f7b37 100644 --- a/contrib/mmg3d/build/sources/analarcutting.c +++ b/contrib/mmg3d/build/sources/analarcutting.c @@ -307,8 +307,9 @@ int MMG_analarcutting(pMesh mesh,pSol sol,pHedge hash,int *alert,double* lmoy,do printf("6 cut : %8d\n",n6); printf("---------------------------\n"); */ if ( !na ) return(na); +#if !defined(_MSC_VER) #warning check memory allocation - +#endif //printf("%d cut init --- nb tet %d\n",na,mesh->ne); return(na); } diff --git a/contrib/mmg3d/build/sources/delaunay.c b/contrib/mmg3d/build/sources/delaunay.c index e53a0e6a0cd32127f9633bda8eeab7cda24dd9e4..581df424adf7ad650905cd4f86fafe1db9e072fa 100644 --- a/contrib/mmg3d/build/sources/delaunay.c +++ b/contrib/mmg3d/build/sources/delaunay.c @@ -728,7 +728,9 @@ int MMG_cavity_iso(pMesh mesh,pSol sol,int iel,int ip,pList list,int lon) { if ( ppt->tag & M_UNUSED ) return(0); tref = mesh->tetra[list->tetra[1]/6].ref; +#if !defined(_MSC_VER) #warning remove this test +#endif for (k=1; k<=lon; k++) if(tref!=mesh->tetra[list->tetra[k]/6].ref) printf("pbs coquil %d %d tet %d\n",tref,mesh->tetra[list->tetra[k]/6].ref,list->tetra[k]/6); diff --git a/contrib/mmg3d/build/sources/mesh.h b/contrib/mmg3d/build/sources/mesh.h index efa8ae9ccff11a20258510b1cef4d492e3fb7f7f..9324545c23121c34656e447d032968130ebd3329 100644 --- a/contrib/mmg3d/build/sources/mesh.h +++ b/contrib/mmg3d/build/sources/mesh.h @@ -111,7 +111,10 @@ along with MMG3D. If not, see <http://www.gnu.org/licenses/>. #undef INT_MAX #undef SHORT_MAX #endif -*/#define INT_MAX 0x7fffffff +*/ +#ifndef INT_MAX +#define INT_MAX 0x7fffffff +#endif #define SHORT_MAX 0x7fff diff --git a/contrib/mmg3d/build/sources/quality.c b/contrib/mmg3d/build/sources/quality.c index 7a78991ac0f4f6ec3c5c6c4788653ea05ed761a2..c8f93d7b09946e09680d4079f2850571bc8a8a91 100644 --- a/contrib/mmg3d/build/sources/quality.c +++ b/contrib/mmg3d/build/sources/quality.c @@ -479,7 +479,7 @@ double MMG_calte1_ani(pMesh mesh,pSol sol,int iel) { double h1,h2,h3,h4,h5,h6,rapmax,vol,det,v1,v2,v3; double air,dd,num; double *a,*b,*c,*d; - double *ma,*mb,*mc,*md,mm[6];; + double *ma,*mb,*mc,*md,mm[6]; int j,ia,ib,ic,id,iadr; pt = &mesh->tetra[iel]; @@ -1479,7 +1479,7 @@ double MMG_calte3_ani(pMesh mesh,pSol sol,int iel) { double cal,ab[3],ac[3],ad[3],bc[3],bd[3],cd[3]; double vol,det,v1,v2,v3,air,dd; double *a,*b,*c,*d; - double *ma,*mb,*mc,*md,mm[6];; + double *ma,*mb,*mc,*md,mm[6]; int j,ia,ib,ic,id,iadr; static double id3[6] ={1.0,0.,0.,1.,0.,1.}; diff --git a/contrib/mmg3d/build/sources/simu44.c b/contrib/mmg3d/build/sources/simu44.c index c8a20c9e49e33756c4775e3bc33c597c61dc4aaf..fd459a25c53b3e1d896b723e0d11b675699b0496 100644 --- a/contrib/mmg3d/build/sources/simu44.c +++ b/contrib/mmg3d/build/sources/simu44.c @@ -47,7 +47,7 @@ along with MMG3D. If not, see <http://www.gnu.org/licenses/>. /* return 41-42 for config */ int MMG_simu44(pMesh mesh,pSol sol,pList list,double crit) { - pTetra pt,pt1;; + pTetra pt,pt1; double caltab[2]; int ia,ib,s1,s2,s3,s4,iadr,*adja,k,adj,iel,iar; short voy;