Skip to content
Snippets Groups Projects
Commit d18829a5 authored by Jean-François Remacle's avatar Jean-François Remacle
Browse files

*** empty log message ***

parent e8d8852b
No related branches found
No related tags found
No related merge requests found
// $Id: BDS.cpp,v 1.75 2007-04-12 13:09:09 remacle Exp $ // $Id: BDS.cpp,v 1.76 2007-04-13 12:49:52 remacle Exp $
// //
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
// //
...@@ -893,8 +893,8 @@ bool BDS_Mesh::collapse_edge_parametric(BDS_Edge * e, BDS_Point * p) ...@@ -893,8 +893,8 @@ bool BDS_Mesh::collapse_edge_parametric(BDS_Edge * e, BDS_Point * p)
std::list < BDS_Face * >t; std::list < BDS_Face * >t;
BDS_Point *o = e->othervertex(p); BDS_Point *o = e->othervertex(p);
if(o->g != p->g) // if(o->g != p->g)
return false; // return false;
// printf("collapsing an edge :"); // printf("collapsing an edge :");
// print_edge(e); // print_edge(e);
......
// $Id: meshGFace.cpp,v 1.71 2007-04-12 13:13:55 remacle Exp $ // $Id: meshGFace.cpp,v 1.72 2007-04-13 12:49:52 remacle Exp $
// //
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
// //
...@@ -270,7 +270,7 @@ void OptimizeMesh(GFace *gf, BDS_Mesh &m, const int NIT) ...@@ -270,7 +270,7 @@ void OptimizeMesh(GFace *gf, BDS_Mesh &m, const int NIT)
++itp; ++itp;
} }
} }
if(0){ for (int KK=0;KK<4;KK++){
// swap edges that provide a better configuration // swap edges that provide a better configuration
int NN1 = m.edges.size(); int NN1 = m.edges.size();
int NN2 = 0; int NN2 = 0;
...@@ -278,32 +278,19 @@ void OptimizeMesh(GFace *gf, BDS_Mesh &m, const int NIT) ...@@ -278,32 +278,19 @@ void OptimizeMesh(GFace *gf, BDS_Mesh &m, const int NIT)
while (1) while (1)
{ {
if (NN2++ >= NN1)break; if (NN2++ >= NN1)break;
if (!(*it)->deleted && (*it)->numfaces() == 2) if (!(*it)->deleted)
{ {
int result = edgeSwapTestQuality(*it,5);
BDS_Point *op[2]; if (result >= 0)
(*it)->oppositeof(op); if(edgeSwapTestDelaunay(*it,gf) || result > 0)
BDS_Point *p1 = (*it)->p1;
BDS_Point *p2 = (*it)->p2;
std::list < BDS_Face * >t1,t2,to1,to2;
p1->getTriangles(t1);
p2->getTriangles(t2);
op[0]->getTriangles(to1);
op[1]->getTriangles(to2);
if (t1.size() == 7 && t2.size() == 7 && to1.size() == 5 && to2.size() == 5)
m.swap_edge ( *it , BDS_SwapEdgeTestParametric());
else if (t1.size() == 5 && t2.size() == 5 && to1.size() == 7 && to2.size() == 7)
m.swap_edge ( *it , BDS_SwapEdgeTestParametric()); m.swap_edge ( *it , BDS_SwapEdgeTestParametric());
// else if ( edgeSwapTestQuality(*it) == 1)
// m.swap_edge ( *it , BDS_SwapEdgeTestParametric());
} }
++it; ++it;
} }
}
m.cleanup(); m.cleanup();
} }
} }
}
void RefineMesh ( GFace *gf, BDS_Mesh &m , const int NIT) void RefineMesh ( GFace *gf, BDS_Mesh &m , const int NIT)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment