diff --git a/Geo/GFaceCompound.cpp b/Geo/GFaceCompound.cpp index 935ff58135bf3d47b1ae3b63140bec8127274f2d..c2f7e79a8fca51301a7da7c80dab6f6332386968 100644 --- a/Geo/GFaceCompound.cpp +++ b/Geo/GFaceCompound.cpp @@ -427,7 +427,7 @@ void GFaceCompound::fillNeumannBCS() const } //printing - if(!CTX::instance()->mesh.saveAll){ + if(CTX::instance()->mesh.saveAll){ if (fillTris.size() > 0){ char name[256]; std::list<GFace*>::const_iterator itf = _compound.begin(); @@ -2071,8 +2071,8 @@ int GFaceCompound::genusGeom() const void GFaceCompound::printStuff(int iNewton) const { - //if( !CTX::instance()->mesh.saveAll) return; - + if( !CTX::instance()->mesh.saveAll) return; + std::list<GFace*>::const_iterator it = _compound.begin(); char name0[256], name1[256], name2[256], name3[256]; diff --git a/Geo/GRbf.cpp b/Geo/GRbf.cpp index b7dce8a7fd3dba6eb87262cb159c497c6603bea9..e921d4a7d79fef4582a2aa61d2d22d182a30375c 100644 --- a/Geo/GRbf.cpp +++ b/Geo/GRbf.cpp @@ -220,7 +220,7 @@ void GRbf::buildOctree(double radius){ //compute curvature from level set void GRbf::curvatureRBF(const fullMatrix<double> &cntrs, - fullMatrix<double> &curvature){ + fullMatrix<double> &curvature){ fullMatrix<double> extX, surf, sx,sy,sz, sxx,syy,szz, sxy,sxz,syz,sLap; setup_level_set(cntrs,normals,extX, surf); diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp index e3bb665277eaef17df2190eceecc30be5cf8923e..f747fe2ee10f502a3b1377f4a41ec10782eb60de 100644 --- a/Mesh/meshGFace.cpp +++ b/Mesh/meshGFace.cpp @@ -1597,12 +1597,14 @@ void meshGFace::operator() (GFace *gf) if (backgroundMesh::current()){ backgroundMesh::unset(); } - backgroundMesh::set(gf); - char name[256]; - sprintf(name,"bgm-%d.pos",gf->tag()); - backgroundMesh::current()->print(name,gf); - sprintf(name,"cross-%d.pos",gf->tag()); - backgroundMesh::current()->print(name,gf,1); + if (CTX::instance()->mesh.saveAll){ + backgroundMesh::set(gf); + char name[256]; + sprintf(name,"bgm-%d.pos",gf->tag()); + backgroundMesh::current()->print(name,gf); + sprintf(name,"cross-%d.pos",gf->tag()); + backgroundMesh::current()->print(name,gf,1); + } (*this)(gf); } diff --git a/Mesh/meshGFaceDelaunayInsertion.cpp b/Mesh/meshGFaceDelaunayInsertion.cpp index 4b8c37725f66336d74c19be6bc0628e8bd023cee..1c09478da741d8001a79496d4c222b8f908d086b 100644 --- a/Mesh/meshGFaceDelaunayInsertion.cpp +++ b/Mesh/meshGFaceDelaunayInsertion.cpp @@ -1185,10 +1185,12 @@ void bowyerWatsonFrontalLayers(GFace *gf, bool quad) CTX::instance()->mesh.lcFromCurvature = CurvControl; backgroundMesh::set(gf); char name[256]; - sprintf(name,"bgm-%d.pos",gf->tag()); - backgroundMesh::current()->print(name,gf); - sprintf(name,"cross-%d.pos",gf->tag()); - backgroundMesh::current()->print(name,gf,1); + if (CTX::instance()->mesh.saveAll){ + sprintf(name,"bgm-%d.pos",gf->tag()); + backgroundMesh::current()->print(name,gf); + sprintf(name,"cross-%d.pos",gf->tag()); + backgroundMesh::current()->print(name,gf,1); + } // FIXME DELETE CURRENT MESH gf->triangles = TR; } diff --git a/Mesh/meshGFaceOptimize.cpp b/Mesh/meshGFaceOptimize.cpp index e1c4131aaa15941f75fadff03c5df082d48fe180..2ce231bbfbe443527c8b91515c0e8b1d348b6c4b 100644 --- a/Mesh/meshGFaceOptimize.cpp +++ b/Mesh/meshGFaceOptimize.cpp @@ -1872,18 +1872,19 @@ void recombineIntoQuads(GFace *gf, double t1 = Cpu(); bool haveParam = true; + bool saveAll = CTX::instance()->mesh.saveAll; if(gf->geomType() == GEntity::DiscreteSurface && !gf->getCompound()) haveParam = false; if(haveParam && topologicalOpti) removeFourTrianglesNodes(gf, false); - gf->model()->writeMSH("before.msh"); + if (saveAll) gf->model()->writeMSH("before.msh"); int success = _recombineIntoQuads(gf, 0); // gf->addLayersOfQuads(1, 0); - gf->model()->writeMSH("raw.msh"); + if (saveAll) gf->model()->writeMSH("raw.msh"); if(haveParam && nodeRepositioning) laplaceSmoothing(gf, CTX::instance()->mesh.nbSmoothing); @@ -1891,17 +1892,18 @@ void recombineIntoQuads(GFace *gf, if(success && CTX::instance()->mesh.algoRecombine == 1){ if(topologicalOpti){ if(haveParam){ - gf->model()->writeMSH("smoothed.msh"); + if (saveAll) gf->model()->writeMSH("smoothed.msh"); int COUNT = 0; char NAME[256]; + while(1){ int x = removeTwoQuadsNodes(gf); - if(x){ sprintf(NAME,"iter%dTQ.msh",COUNT++); gf->model()->writeMSH(NAME);} + if(x && saveAll){ sprintf(NAME,"iter%dTQ.msh",COUNT++); gf->model()->writeMSH(NAME);} int y = removeDiamonds(gf); - if(y){ sprintf(NAME,"iter%dD.msh",COUNT++); gf->model()->writeMSH(NAME); } + if(y && saveAll){ sprintf(NAME,"iter%dD.msh",COUNT++); gf->model()->writeMSH(NAME); } laplaceSmoothing(gf); int z = 0; //edgeSwapQuadsForBetterQuality(gf); - if(z){ sprintf(NAME,"iter%dS.msh",COUNT++); gf->model()->writeMSH(NAME); } + if(z && saveAll){ sprintf(NAME,"iter%dS.msh",COUNT++); gf->model()->writeMSH(NAME); } if (!(x+y+z)) break; } } @@ -1920,7 +1922,7 @@ void recombineIntoQuads(GFace *gf, _recombineIntoQuads(gf, 0); if(haveParam) laplaceSmoothing(gf, CTX::instance()->mesh.nbSmoothing); - // gf->model()->writeMSH("after.msh"); + if (saveAll) gf->model()->writeMSH("after.msh"); double t2 = Cpu(); Msg::Info("Simple recombination algorithm completed (%g s)", t2 - t1);