From fd87cc1a93ba94c97347ec252938b98c642645b4 Mon Sep 17 00:00:00 2001 From: Tristan Carrier Baudouin <tristan.carrier@uclouvain.be> Date: Fri, 16 Aug 2013 10:29:47 +0000 Subject: [PATCH] correction --- Mesh/Generator.cpp | 58 ++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/Mesh/Generator.cpp b/Mesh/Generator.cpp index b4d81d767e..254bf5afb8 100644 --- a/Mesh/Generator.cpp +++ b/Mesh/Generator.cpp @@ -495,20 +495,21 @@ static void Mesh2D(GModel *m) mesher(temp[K]); #if defined(HAVE_BFGS) - if (temp[K]->geomType()==GEntity::CompoundSurface || - temp[K]->geomType()==GEntity::Plane) { - if (temp[K]->meshAttributes.method != MESH_TRANSFINITE && !temp[K]->meshAttributes.extrude) { - smoothing smm(CTX::instance()->mesh.optimizeLloyd,6); - //m->writeMSH("beforeLLoyd.msh"); - smm.optimize_face(temp[K]); - int rec = ((CTX::instance()->mesh.recombineAll || - temp[K]->meshAttributes.recombine) && - !CTX::instance()->mesh.recombine3DAll); - //m->writeMSH("afterLLoyd.msh"); - if (rec) recombineIntoQuads(temp[K]); - //m->writeMSH("afterRecombine.msh"); - } - } + if(CTX::instance()->mesh.optimizeLloyd){ + if (temp[K]->geomType()==GEntity::CompoundSurface || temp[K]->geomType()==GEntity::Plane) { + if (temp[K]->meshAttributes.method != MESH_TRANSFINITE && !temp[K]->meshAttributes.extrude) { + smoothing smm(CTX::instance()->mesh.optimizeLloyd,6); + //m->writeMSH("beforeLLoyd.msh"); + smm.optimize_face(temp[K]); + int rec = ((CTX::instance()->mesh.recombineAll || + temp[K]->meshAttributes.recombine) && + !CTX::instance()->mesh.recombine3DAll); + //m->writeMSH("afterLLoyd.msh"); + if (rec) recombineIntoQuads(temp[K]); + //m->writeMSH("afterRecombine.msh"); + } + } + } #endif #if defined(_OPENMP) @@ -530,20 +531,21 @@ static void Mesh2D(GModel *m) mesher(*it); #if defined(HAVE_BFGS) - if ((*it)->geomType()==GEntity::CompoundSurface || - (*it)->geomType()==GEntity::Plane) { - if ((*it)->meshAttributes.method != MESH_TRANSFINITE && !(*it)->meshAttributes.extrude) { - smoothing smm(CTX::instance()->mesh.optimizeLloyd,6); - //m->writeMSH("beforeLLoyd.msh"); - smm.optimize_face(*it); - int rec = ((CTX::instance()->mesh.recombineAll || - (*it)->meshAttributes.recombine) && - !CTX::instance()->mesh.recombine3DAll); - //m->writeMSH("afterLLoyd.msh"); - if (rec) recombineIntoQuads(*it); - //m->writeMSH("afterRecombine.msh"); - } - } + if(CTX::instance()->mesh.optimizeLloyd){ + if ((*it)->geomType()==GEntity::CompoundSurface || (*it)->geomType()==GEntity::Plane) { + if ((*it)->meshAttributes.method != MESH_TRANSFINITE && !(*it)->meshAttributes.extrude) { + smoothing smm(CTX::instance()->mesh.optimizeLloyd,6); + //m->writeMSH("beforeLLoyd.msh"); + smm.optimize_face(*it); + int rec = ((CTX::instance()->mesh.recombineAll || + (*it)->meshAttributes.recombine) && + !CTX::instance()->mesh.recombine3DAll); + //m->writeMSH("afterLLoyd.msh"); + if (rec) recombineIntoQuads(*it); + //m->writeMSH("afterRecombine.msh"); + } + } + } #endif nPending++; -- GitLab