Hello,<br><br>Here is the piece of original code from gmsh in BDS.cpp. Although I am not quite sure, but<br>feel that there might be some unintentional problems with the code.<br><br>(1) Problem #1:     find_edge is a query function and it has created temporary instance of<br>
                           BDS_Edge. When created, it changes the structure ( i.e. add edge to the<br>                           point). Since there are no destructor in the BDS_Edge those change may<br>                           persist forever.<br>
<br>(2) Problem #2:     Looks like the edges are undirectional. Why the reverse edge points <br>                           are not checked ? There are some cases, where I found that we query<br>                           for {p1,p2} and in the triangle reverse edge ( p2,p1) is available.<br>
<br><br>BDS_Edge *BDS_Mesh::find_edge(BDS_Point *p1, BDS_Point *p2, BDS_Face *t) const<br>{<br>  BDS_Point P1(p1->iD);<br>  BDS_Point P2(p2->iD);<br><br>  BDS_Edge E(&P1, &P2);<br><br>  if(t->e1->p1->iD == E.p1->iD && t->e1->p2->iD == E.p2->iD)<br>
    return t->e1;<br>  if(t->e2->p1->iD == E.p1->iD && t->e2->p2->iD == E.p2->iD)<br>    return t->e2;<br>  if(t->e3->p1->iD == E.p1->iD && t->e3->p2->iD == E.p2->iD)<br>
    return t->e3;<br>  return 0;<br>}<br><br>Can someone clarify my doubts ?<br><br>Thanks.<br><br>Chaman Singh Verma<br><br>Poona, India<br><br>