Skip to content
Snippets Groups Projects
Commit 4ba3f610 authored by Emilie Sauvage's avatar Emilie Sauvage
Browse files

Print coordinates in distance.pos with a higher precision

parent 5a746e91
No related branches found
No related tags found
No related merge requests found
...@@ -136,8 +136,8 @@ void GMSH_DistancePlugin::printView(std::vector<GEntity*> _entities, ...@@ -136,8 +136,8 @@ void GMSH_DistancePlugin::printView(std::vector<GEntity*> _entities,
std::vector<double> dist; std::vector<double> dist;
for(int j = 0; j < numNodes; j++) { for(int j = 0; j < numNodes; j++) {
MVertex *v = e->getVertex(j); MVertex *v = e->getVertex(j);
if(j) fprintf(fName,",%g,%g,%g",v->x(),v->y(), v->z()); if(j) fprintf(fName,",%.16g,%.16g,%.16g",v->x(),v->y(), v->z());
else fprintf(fName,"%g,%g,%g", v->x(),v->y(), v->z()); else fprintf(fName,"%.16g,%.16g,%.16g", v->x(),v->y(), v->z());
std::map<MVertex*, double>::iterator it = _distance_map.find(v); std::map<MVertex*, double>::iterator it = _distance_map.find(v);
dist.push_back(it->second); dist.push_back(it->second);
} }
...@@ -148,8 +148,8 @@ void GMSH_DistancePlugin::printView(std::vector<GEntity*> _entities, ...@@ -148,8 +148,8 @@ void GMSH_DistancePlugin::printView(std::vector<GEntity*> _entities,
else if (_minScale > 0 && _maxScale < 0) else if (_minScale > 0 && _maxScale < 0)
dist[i]=_minScale+dist[i]; dist[i]=_minScale+dist[i];
out->push_back(dist[i]); out->push_back(dist[i]);
if (i) fprintf(fName,",%g", dist[i]); if (i) fprintf(fName,",%.16g", dist[i]);
else fprintf(fName,"%g", dist[i]); else fprintf(fName,"%.16g", dist[i]);
} }
fprintf(fName,"};\n"); fprintf(fName,"};\n");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment