Skip to content
Snippets Groups Projects
Commit 93e04cb0 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix regression with extrusions of many surfaces: order faces by tag - this...

fix regression with extrusions of many surfaces: order faces by tag - this allows to minimize the number of passes necessary to resolve dependencies (otherwise 10 passes is not enough!)
parent 232b75ae
No related branches found
No related tags found
No related merge requests found
......@@ -467,7 +467,7 @@ static void Mesh2D(GModel *m)
// and curve meshes) is global as it depends on a smooth normal
// field generated from the surface mesh of the source surfaces
if(!Mesh2DWithBoundaryLayers(m)){
std::set<GFace*> cf, f;
std::set<GFace*, GEntityLessThan> cf, f;
for(GModel::fiter it = m->firstFace(); it != m->lastFace(); ++it)
if ((*it)->geomType() == GEntity::CompoundSurface)
cf.insert(*it);
......@@ -479,14 +479,15 @@ static void Mesh2D(GModel *m)
int nIter = 0, nTot = m->getNumFaces();
while(1){
int nPending = 0;
std::vector<GFace*> _temp; _temp.insert(_temp.begin(), f.begin(), f.end());
std::vector<GFace*> temp;
temp.insert(temp.begin(), f.begin(), f.end());
#if defined(_OPENMP)
#pragma omp parallel for schedule (dynamic)
#endif
for(size_t K = 0 ; K < _temp.size() ; K++){
if (_temp[K]->meshStatistics.status == GFace::PENDING){
meshGFace mesher (true, CTX::instance()->mesh.multiplePasses);
mesher(_temp[K]);
for(size_t K = 0 ; K < temp.size() ; K++){
if (temp[K]->meshStatistics.status == GFace::PENDING){
meshGFace mesher(true, CTX::instance()->mesh.multiplePasses);
mesher(temp[K]);
#if defined(_OPENMP)
#pragma omp critical
#endif
......@@ -499,9 +500,10 @@ static void Mesh2D(GModel *m)
#if defined(_OPENMP)
#pragma omp master
#endif
for(std::set<GFace*>::iterator it = cf.begin(); it != cf.end(); ++it){
for(std::set<GFace*, GEntityLessThan>::iterator it = cf.begin();
it != cf.end(); ++it){
if ((*it)->meshStatistics.status == GFace::PENDING){
meshGFace mesher (true, CTX::instance()->mesh.multiplePasses);
meshGFace mesher(true, CTX::instance()->mesh.multiplePasses);
mesher(*it);
nPending++;
}
......@@ -520,7 +522,8 @@ static void Mesh2D(GModel *m)
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);
//int rec = 1;//(CTX::instance()->mesh.recombineAll ||
// (*it)->meshAttributes.recombine);
m->writeMSH("afterLLoyd.msh");
//if(rec) recombineIntoQuads(*it);
//m->writeMSH("afterRecombine.msh");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment