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

Merge branch 'Bug_msh4_high_order' into 'master'

vertices vector of size 'nbrVertices' not 'nbrVertices+1'

See merge request !187
parents 503a1374 b2b57fc7
No related branches found
No related tags found
No related merge requests found
...@@ -747,7 +747,7 @@ readMSH4Elements(GModel *const model, FILE *fp, bool binary, bool &dense, ...@@ -747,7 +747,7 @@ readMSH4Elements(GModel *const model, FILE *fp, bool binary, bool &dense,
if(swap) if(swap)
SwapBytes((char *)data, sizeof(int), numElements * (nbrVertices + 1)); SwapBytes((char *)data, sizeof(int), numElements * (nbrVertices + 1));
std::vector<MVertex *> vertices(nbrVertices + 1, (MVertex *)0); std::vector<MVertex *> vertices(nbrVertices, (MVertex *)0);
for(unsigned int j = 0; j < numElements * (nbrVertices + 1); for(unsigned int j = 0; j < numElements * (nbrVertices + 1);
j += (nbrVertices + 1)) { j += (nbrVertices + 1)) {
for(int k = 0; k < nbrVertices; k++) { for(int k = 0; k < nbrVertices; k++) {
...@@ -793,7 +793,7 @@ readMSH4Elements(GModel *const model, FILE *fp, bool binary, bool &dense, ...@@ -793,7 +793,7 @@ readMSH4Elements(GModel *const model, FILE *fp, bool binary, bool &dense,
return 0; return 0;
} }
std::vector<MVertex *> vertices(nbrVertices + 1, (MVertex *)0); std::vector<MVertex *> vertices(nbrVertices, (MVertex *)0);
for(int k = 0; k < nbrVertices; k++) { for(int k = 0; k < nbrVertices; k++) {
int vertexTag = 0; int vertexTag = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment