From f7eeeb37619e34400745043fac0ed14e8babd23d Mon Sep 17 00:00:00 2001 From: Tristan Carrier Baudouin <tristan.carrier@uclouvain.be> Date: Tue, 16 Oct 2012 09:00:54 +0000 Subject: [PATCH] Lloyd 2D meshing --- Mesh/meshGFaceLloyd.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Mesh/meshGFaceLloyd.cpp b/Mesh/meshGFaceLloyd.cpp index dfc8eaafbc..4d10a5ce58 100644 --- a/Mesh/meshGFaceLloyd.cpp +++ b/Mesh/meshGFaceLloyd.cpp @@ -524,24 +524,22 @@ void smoothing::optimize_face(GFace* gf){ } } - // destroy the mesh deMeshGFace killer; killer(gf); - // put all additional vertices in the list of - // vertices + int option; + option = gf->getMeshingAlgo(); + gf->setMeshingAlgo(ALGO_2D_MESHADAPT); + gf->additionalVertices = mesh_vertices; - // remesh the face with all those vertices in - Msg::Info("Lloyd remeshing of face %d ", gf->tag()); meshGFace mesher; mesher(gf); - // assign those vertices to the face internal vertices - gf->mesh_vertices.insert(gf->mesh_vertices.begin(), - gf->additionalVertices.begin(), - gf->additionalVertices.end()); - // clear the list of additional vertices + + gf->mesh_vertices.insert(gf->mesh_vertices.begin(),gf->additionalVertices.begin(),gf->additionalVertices.end()); //? gf->additionalVertices.clear(); + gf->setMeshingAlgo(option); + free(initial_conditions); free(variables_scales); } -- GitLab