Skip to content
Snippets Groups Projects
Commit ddf33280 authored by Tristan Carrier Baudouin's avatar Tristan Carrier Baudouin
Browse files

Lloyd's algorithm corrections

parent 70b4acff
No related branches found
No related tags found
No related merge requests found
......@@ -520,20 +520,21 @@ static void Mesh2D(GModel *m)
}
#if defined(HAVE_BFGS)
// lloyd optimization
if (CTX::instance()->mesh.optimizeLloyd){
//lloyd optimization
if(CTX::instance()->mesh.optimizeLloyd){
for(GModel::fiter it = m->firstFace(); it != m->lastFace(); ++it){
if((*it)->geomType()==GEntity::CompoundSurface || (*it)->geomType()==GEntity::Plane){
smoothing smm(CTX::instance()->mesh.optimizeLloyd,6);
m->writeMSH("beforeLLoyd.msh");
smm.optimize_face(*it);
//int rec = 1;//(CTX::instance()->mesh.recombineAll ||
// (*it)->meshAttributes.recombine);
m->writeMSH("afterLLoyd.msh");
//if(rec) recombineIntoQuads(*it);
//m->writeMSH("afterRecombine.msh");
}
}
if((*it)->geomType()==GEntity::CompoundSurface || (*it)->geomType()==GEntity::Plane){
if((*it)->meshAttributes.method != MESH_TRANSFINITE){
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");
}
}
}
/*
for(GModel::fiter it = m->firstFace(); it != m->lastFace(); ++it){
GFace *gf = *it;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment