diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp index 17c2385f5a54a44faafec735b40e1471820d4203..6799ec9e7e1fd8a4cbfa7789dea4899e38e47102 100644 --- a/Geo/MElement.cpp +++ b/Geo/MElement.cpp @@ -122,11 +122,12 @@ void MElement::scaledJacRange(double &jmin, double &jmax, GEntity *ge) getNodesCoord(nodesXYZ); fullVector<double> SJi(numJacNodes), Bi(numJacNodes); jac->getScaledJacobian(nodesXYZ,SJi); - if (ge && (ge->dim() == 2) && ge->haveParametrization()) { // If parametrized surface entity provided... - SVector3 geoNorm(0.,0.,0.); // ... correct Jacobian sign with geometrical normal + if (ge && (ge->dim() == 2) && ge->haveParametrization()) { + // If parametrized surface entity provided... + SVector3 geoNorm(0.,0.,0.); + // ... correct Jacobian sign with geometrical normal for (int i=0; i<jac->getNumPrimMapNodes(); i++) { MVertex *vert = getVertex(i); - GEntity *vge = vert->onWhat(); if (vert->onWhat() == ge) { double u, v; vert->getParameter(0,u); @@ -134,13 +135,15 @@ void MElement::scaledJacRange(double &jmin, double &jmax, GEntity *ge) geoNorm += ((GFace*)ge)->normal(SPoint2(u,v)); } } - if (geoNorm.normSq() == 0.) { // If no vertex on surface or average is zero, take normal at barycenter + if (geoNorm.normSq() == 0.) { + // If no vertex on surface or average is zero, take normal at barycenter SPoint2 param = ((GFace*)ge)->parFromPoint(barycenter(true),false); geoNorm = ((GFace*)ge)->normal(param); } fullMatrix<double> elNorm(1,3); jac->getPrimNormal2D(nodesXYZ,elNorm); - const double scal = geoNorm(0)*elNorm(0,0)+geoNorm(1)*elNorm(0,1)+geoNorm(2)*elNorm(0,2); + const double scal = geoNorm(0) * elNorm(0,0) + geoNorm(1) * elNorm(0,1) + + geoNorm(2) * elNorm(0,2); if (scal < 0.) SJi.scale(-1.); } jac->lag2Bez(SJi,Bi); diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp index bb3f229211fdaca1381c5779df3cb6f91e240bc4..5eb70430af6039ac8d2319304bca8d89eba3885d 100644 --- a/Mesh/Generator.cpp +++ b/Mesh/Generator.cpp @@ -580,9 +580,9 @@ static void FindConnectedRegions(std::vector<GRegion*> &delaunay, if (!nbVolumes)return; while (delaunay.size()){ std::set<GRegion*> oneDomain; - std::stack<GRegion*> _stack; + std::stack<GRegion*> _stack; GRegion *r = delaunay[0]; - _stack.push(r); + _stack.push(r); while(!_stack.empty()){ r = _stack.top(); _stack.pop(); @@ -605,7 +605,7 @@ static void FindConnectedRegions(std::vector<GRegion*> &delaunay, delaunay=temp1; } Msg::Info("Delaunay Meshing %d volumes with %d connected components", - nbVolumes,connected.size()); + nbVolumes,connected.size()); } static void Mesh3D(GModel *m) @@ -635,7 +635,7 @@ static void Mesh3D(GModel *m) FindConnectedRegions(delaunay, connected); // remove quads elements for volumes that are recombined - // pragma OMP ICI ?? + // pragma OMP ICI ?? for(unsigned int i = 0; i < connected.size(); i++){ for(unsigned j=0;j<connected[i].size();j++){ GRegion *gr = connected[i][j]; @@ -647,7 +647,7 @@ static void Mesh3D(GModel *m) } } - // pragma OMP ICI ?? + // pragma OMP ICI ?? for(unsigned int i = 0; i < connected.size(); i++){ MeshDelaunayVolume(connected[i]); @@ -808,6 +808,7 @@ void GenerateMesh(GModel *m, int ask) p.BARRIER_MIN = CTX::instance()->mesh.hoThresholdMin; p.BARRIER_MAX = CTX::instance()->mesh.hoThresholdMax; p.dim = GModel::current()->getDim(); + //p.optPrimSurfMesh = true; HighOrderMeshOptimizer(GModel::current(), p); } #else