Commit da7a206e authored by Christophe Geuzaine's avatar Christophe Geuzaine

Merge branch 'FixingNonDeterministicBehaviourInLaplaceSmoothing' into 'master'

Fixing non-deterministic behavior caused by different order of nodes considered… See merge request !117
parents e28ad586 f058b85a
Pipeline #1663 passed with stage
in 63 minutes 10 seconds
......@@ -854,7 +854,7 @@ void _relocateVertex(GFace *gf, MVertex *ver,
ver->getParameter(1, initv);
// compute the vertices connected to that one
std::map<MVertex*,SPoint2> pts;
std::map<MVertex*,SPoint2,MVertexLessThanNum> pts;
for(unsigned int i = 0; i < lt.size(); i++){
for (int j=0;j<lt[i]->getNumEdges();j++){
MEdge e = lt[i]->getEdge(j);
......@@ -875,7 +875,7 @@ void _relocateVertex(GFace *gf, MVertex *ver,
SPoint2 after(0,0);
double COUNT = 0.0;
// printf("weights :");
for(std::map<MVertex*,SPoint2>::iterator it = pts.begin(); it != pts.end() ; ++it) {
for(std::map<MVertex*,SPoint2,MVertexLessThanNum>::iterator it = pts.begin(); it != pts.end() ; ++it) {
SPoint2 adj = it->second;
SVector3 d(adj.x() - before.x(), adj.y() - before.y(), 0.0);
d.normalize();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment