Skip to content
Snippets Groups Projects
Commit b36ee4ac authored by Amaury Johnen's avatar Amaury Johnen
Browse files

cleanup

parent e56cbb7f
No related branches found
No related tags found
No related merge requests found
...@@ -657,15 +657,12 @@ static void modifyInitialMeshForTakingIntoAccountBoundaryLayers(GFace *gf, ...@@ -657,15 +657,12 @@ static void modifyInitialMeshForTakingIntoAccountBoundaryLayers(GFace *gf,
std::set<MEdge,Less_Edge> bedges; std::set<MEdge,Less_Edge> bedges;
std::set<MEdge,Less_Edge> removed; std::set<MEdge,Less_Edge> removed;
// std::vector<MQuadrangle*> blQuads;
// std::vector<MTriangle*> blTris;
std::list<GEdge*> edges = gf->edges(); std::list<GEdge*> edges = gf->edges();
std::list<GEdge*> embedded_edges = gf->embeddedEdges(); std::list<GEdge*> embedded_edges = gf->embeddedEdges();
edges.insert(edges.begin(), embedded_edges.begin(),embedded_edges.end()); edges.insert(edges.begin(), embedded_edges.begin(),embedded_edges.end());
std::list<GEdge*>::iterator ite = edges.begin(); std::list<GEdge*>::iterator ite = edges.begin();
FILE *ff2 = Fopen ("tato.pos","w"); FILE *ff2 = Fopen ("tato.pos","w");
if(ff2) fprintf(ff2,"View \" \"{\n"); if(ff2) fprintf(ff2,"View \" \"{\n");
// std::set<MVertex*> verts;
std::vector<MLine*> _lines; std::vector<MLine*> _lines;
...@@ -827,10 +824,6 @@ static void modifyInitialMeshForTakingIntoAccountBoundaryLayers(GFace *gf, ...@@ -827,10 +824,6 @@ static void modifyInitialMeshForTakingIntoAccountBoundaryLayers(GFace *gf,
deMeshGFace kil_; deMeshGFace kil_;
kil_(gf); kil_(gf);
meshGenerator(gf, 0, 0, true , false, &hop); meshGenerator(gf, 0, 0, true , false, &hop);
// gf->quadrangles = blQuads;
// gf->triangles.insert(gf->triangles.begin(),blTris.begin(),blTris.end());
// gf->mesh_vertices.insert(gf->mesh_vertices.begin(),verts.begin(),verts.end());
} }
static bool inside_domain(MElementOctree* octree,double x,double y) static bool inside_domain(MElementOctree* octree,double x,double y)
...@@ -1611,8 +1604,6 @@ bool meshGenerator(GFace *gf, int RECUR_ITER, ...@@ -1611,8 +1604,6 @@ bool meshGenerator(GFace *gf, int RECUR_ITER,
gf->triangles.insert(gf->triangles.begin(),blTris.begin(),blTris.end()); gf->triangles.insert(gf->triangles.begin(),blTris.begin(),blTris.end());
gf->mesh_vertices.insert(gf->mesh_vertices.begin(),verts.begin(),verts.end()); gf->mesh_vertices.insert(gf->mesh_vertices.begin(),verts.begin(),verts.end());
gf->model()->writeMSH("AAA.msh");
if((CTX::instance()->mesh.recombineAll || gf->meshAttributes.recombine) && if((CTX::instance()->mesh.recombineAll || gf->meshAttributes.recombine) &&
!CTX::instance()->mesh.optimizeLloyd && !onlyInitialMesh && CTX::instance()->mesh.algoRecombine != 2) !CTX::instance()->mesh.optimizeLloyd && !onlyInitialMesh && CTX::instance()->mesh.algoRecombine != 2)
......
...@@ -496,19 +496,12 @@ static int _removeTwoQuadsNodes(GFace *gf) ...@@ -496,19 +496,12 @@ static int _removeTwoQuadsNodes(GFace *gf)
MVertex *v2 = q1->getVertex((comm+2)%4); MVertex *v2 = q1->getVertex((comm+2)%4);
MVertex *v3 = q1->getVertex((comm+3)%4); MVertex *v3 = q1->getVertex((comm+3)%4);
MVertex *v4 = 0; MVertex *v4 = 0;
int cnt = 0;
for (int i=0;i<4;i++){ for (int i=0;i<4;i++){
if (q2->getVertex(i) != v1 && q2->getVertex(i) != v3 && if (q2->getVertex(i) != v1 && q2->getVertex(i) != v3 &&
q2->getVertex(i) != v){ q2->getVertex(i) != v){
v4 = q2->getVertex(i); v4 = q2->getVertex(i);
++cnt; break;
}
} }
if (cnt != 1) {
// The two quads do not actually share two edges. This can happen if the
// boundary layer mesh inserted to the surface only after this routine
++it;
continue;
} }
if (!v4){ if (!v4){
Msg::Error("BUG DISCOVERED IN _removeTwoQuadsNodes ,%p,%p,%p",v1,v2,v3); Msg::Error("BUG DISCOVERED IN _removeTwoQuadsNodes ,%p,%p,%p",v1,v2,v3);
...@@ -1247,9 +1240,7 @@ static int _recombineIntoQuads(GFace *gf, double minqual, bool cubicGraph = 1) ...@@ -1247,9 +1240,7 @@ static int _recombineIntoQuads(GFace *gf, double minqual, bool cubicGraph = 1)
sprintf(MATCHFILE,".face.match"); sprintf(MATCHFILE,".face.match");
if(perfect_match(ncount, NULL, ecount, &elist, &elen, NULL, MATCHFILE, if(perfect_match(ncount, NULL, ecount, &elist, &elen, NULL, MATCHFILE,
0, 0, 0, 0, &matzeit)){ 0, 0, 0, 0, &matzeit)){
printf("coucou x\n");
Msg::Error("Perfect Match failed in Quadrangulation, try something else"); Msg::Error("Perfect Match failed in Quadrangulation, try something else");
printf("coucou x\n");
free(elist); free(elist);
pairs.clear(); pairs.clear();
} }
...@@ -1433,7 +1424,6 @@ void recombineIntoQuads(GFace *gf, ...@@ -1433,7 +1424,6 @@ void recombineIntoQuads(GFace *gf,
// simple recombination algo // simple recombination algo
for (int IT=0;IT<2;IT++){ for (int IT=0;IT<2;IT++){
_recombineIntoQuads(gf, 0); _recombineIntoQuads(gf, 0);
printf("done\n");
if(haveParam) RelocateVertices (gf,CTX::instance()->mesh.nbSmoothing); if(haveParam) RelocateVertices (gf,CTX::instance()->mesh.nbSmoothing);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment