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

temp fix for major performance regression

parent b91d9c42
No related branches found
No related tags found
No related merge requests found
......@@ -2934,6 +2934,10 @@ graphicWindow::~graphicWindow()
_tile->clear();
_win->clear();
Fl::delete_widget(_win);
if(_menuwin){
_menuwin->clear();
Fl::delete_widget(_menuwin);
}
}
void graphicWindow::setTitle(std::string str)
......
......@@ -700,7 +700,9 @@ static MTri3* search4Triangle (MTri3 *t, double pt[2],
if (inside) return t;
if (ITER++ > (int)AllTris.size()) break;
}
// return 0;
return 0; // FIXME: removing this leads to horrible performance
for(std::set<MTri3*,compareTri3Ptr>::iterator itx = AllTris.begin();
itx != AllTris.end();++itx){
if (!(*itx)->isDeleted()){
......@@ -768,12 +770,10 @@ static bool insertAPoint(GFace *gf, std::set<MTri3*,compareTri3Ptr>::iterator it
if(!p.succeeded() || !insertVertex
(false, gf, v, center, ptin, AllTris,ActiveTris, vSizes, vSizesBGM,vMetricsBGM,
Us, Vs, metric) ) {
// Msg::Debug("Point %g %g cannot be inserted because %d",
// center[0], center[1], p.succeeded() );
// printf("Point %g %g cannot be inserted because %d",
// center[0], center[1], p.succeeded() );
AllTris.erase(it);
worst->forceRadius(-1);
AllTris.insert(worst);
......@@ -782,16 +782,13 @@ static bool insertAPoint(GFace *gf, std::set<MTri3*,compareTri3Ptr>::iterator it
}
else {
// printf("done ! %d\n",AllTris.size());
gf->mesh_vertices.push_back(v);
return true;
}
}
else {
printf("NOT INSIDE\n");
/*
MTriangle *base = worst->tri();
Msg::Info("Point %g %g is outside (%g %g , %g %g , %g %g)",
Msg::Debug("Point %g %g is outside (%g %g , %g %g , %g %g)",
center[0], center[1],
Us[base->getVertex(0)->getIndex()],
Vs[base->getVertex(0)->getIndex()],
......@@ -799,7 +796,6 @@ static bool insertAPoint(GFace *gf, std::set<MTri3*,compareTri3Ptr>::iterator it
Vs[base->getVertex(1)->getIndex()],
Us[base->getVertex(2)->getIndex()],
Vs[base->getVertex(2)->getIndex()]);
*/
AllTris.erase(it);
worst->forceRadius(0);
AllTris.insert(worst);
......@@ -1613,7 +1609,7 @@ void bowyerWatsonParallelograms(GFace *gf)
buildMetric(gf, newPoint, metric);
bool success = insertAPoint(gf, AllTris.begin(), newPoint, metric, Us, Vs, vSizes,
vSizesBGM, vMetricsBGM, AllTris, 0, worst);
if (!success)printf("success %d %d\n",success,AllTris.size());
if (!success) printf("success %d %d\n", success, (int)AllTris.size());
i++;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment