diff --git a/Mesh/meshGFaceLloyd.cpp b/Mesh/meshGFaceLloyd.cpp index dfc8eaafbca990882903ca792bf26ad2a423d31c..4d10a5ce58b04e4fe34ab2006071f870a8ad58d5 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); }