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

fix 2

parent afce5285
No related branches found
No related tags found
No related merge requests found
......@@ -577,6 +577,7 @@ bool PViewDataList::writeMSH(const std::string &fileName, double version, bool b
if(!pos.insert(vertices[i]))
unique.push_back(vertices[i]);
}
vertices.clear();
std::map<MVertex *, nodeData> vertexData;
......@@ -654,9 +655,8 @@ bool PViewDataList::writeMSH(const std::string &fileName, double version, bool b
fprintf(fp, "3\n%d\n%d\n%d\n", ts, numComponents, size);
if(forceNodeData){
for(unsigned int i = 0; i < vertices.size(); i++){
MVertex *v = vertices[i];
if(v->getIndex() > 0){
for(unsigned int i = 0; i < unique.size(); i++){
MVertex *v = unique[i];
fprintf(fp, "%d", v->getIndex());
int nbnod = vertexData[v].nbnod;
int nod = vertexData[v].nod;
......@@ -666,7 +666,6 @@ bool PViewDataList::writeMSH(const std::string &fileName, double version, bool b
d[numComponents * nbnod * ts + numComponents * nod + j]);
fprintf(fp, "\n");
}
}
fprintf(fp, "$EndNodeData\n");
}
else{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment