From a78125045c2d9b03d780893a64612a98e1db491b Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Wed, 3 Feb 2016 16:58:34 +0000 Subject: [PATCH] fix regression --- Mesh/Field.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Mesh/Field.cpp b/Mesh/Field.cpp index cef89a811a..43a18d0835 100644 --- a/Mesh/Field.cpp +++ b/Mesh/Field.cpp @@ -1905,6 +1905,7 @@ class AttractorField : public Field } count++; } + else{ for(int i = 0; i < n_nodes_by_edge; i++) { for(int j = 0; j < n_nodes_by_edge; j++) { @@ -1930,6 +1931,13 @@ class AttractorField : public Field } int totpoints = px.size(); + if(!totpoints){ // for backward compatibility + totpoints = 1; + px.push_back(0.); + py.push_back(0.); + pz.push_back(0.); + } + zeronodes = annAllocPts(totpoints, 3); for(int i = 0; i < totpoints; i++){ zeronodes[i][0] = px[i]; -- GitLab