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

trying to fix compound surface meshing regression introduced by r18338

parent 109e7023
No related branches found
No related tags found
No related merge requests found
...@@ -1391,24 +1391,28 @@ bool meshGenerator(GFace *gf, int RECUR_ITER, ...@@ -1391,24 +1391,28 @@ bool meshGenerator(GFace *gf, int RECUR_ITER,
} }
//gf->triangles.clear(); //gf->triangles.clear();
//gf->quadrangles.clear(); //gf->quadrangles.clear();
gf->deleteMesh();
// only delete the mesh data stored in the base GFace class (calling
// gf->deleteMesh() would also destroy e.g. the data in a compound face, which
// we should not do)
gf->GFace::deleteMesh();
Msg::Debug("Starting to add internal points"); Msg::Debug("Starting to add internal points");
// start mesh generation // start mesh generation
if(!algoDelaunay2D(gf) && !onlyInitialMesh){ if(!algoDelaunay2D(gf) && !onlyInitialMesh){
// if(CTX::instance()->mesh.recombineAll || gf->meshAttributes.recombine || 1) { // if(CTX::instance()->mesh.recombineAll || gf->meshAttributes.recombine || 1) {
// backgroundMesh::unset(); // backgroundMesh::unset();
// buildBackGroundMesh (gf); // buildBackGroundMesh (gf);
// } // }
refineMeshBDS(gf, *m, CTX::instance()->mesh.refineSteps, true, refineMeshBDS(gf, *m, CTX::instance()->mesh.refineSteps, true,
&recoverMapInv); &recoverMapInv);
optimizeMeshBDS(gf, *m, 2); optimizeMeshBDS(gf, *m, 2);
refineMeshBDS(gf, *m, CTX::instance()->mesh.refineSteps, false, refineMeshBDS(gf, *m, CTX::instance()->mesh.refineSteps, false,
&recoverMapInv); &recoverMapInv);
optimizeMeshBDS(gf, *m, 2); optimizeMeshBDS(gf, *m, 2);
// if(CTX::instance()->mesh.recombineAll || gf->meshAttributes.recombine || 1) { // if(CTX::instance()->mesh.recombineAll || gf->meshAttributes.recombine || 1) {
// backgroundMesh::unset(); // backgroundMesh::unset();
// } // }
} }
/* /*
...@@ -1426,7 +1430,8 @@ bool meshGenerator(GFace *gf, int RECUR_ITER, ...@@ -1426,7 +1430,8 @@ bool meshGenerator(GFace *gf, int RECUR_ITER,
BDS2GMSH(m, gf, recoverMap); BDS2GMSH(m, gf, recoverMap);
bool infty = false; bool infty = false;
if (gf->getMeshingAlgo() == ALGO_2D_FRONTAL_QUAD || gf->getMeshingAlgo() == ALGO_2D_PACK_PRLGRMS) if (gf->getMeshingAlgo() == ALGO_2D_FRONTAL_QUAD ||
gf->getMeshingAlgo() == ALGO_2D_PACK_PRLGRMS)
infty = true; infty = true;
if (!onlyInitialMesh) { if (!onlyInitialMesh) {
if (infty) if (infty)
......
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