From d801222dbf8dfb2336f4679a057afc43f33a0364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Wed, 23 Mar 2016 19:51:09 +0100 Subject: [PATCH] 1d fixes --- libsrc/interface/nginterface.cpp | 8 ++++++++ libsrc/interface/nginterface_v2.cpp | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/libsrc/interface/nginterface.cpp b/libsrc/interface/nginterface.cpp index 2ed31f5f..54df4ff1 100644 --- a/libsrc/interface/nginterface.cpp +++ b/libsrc/interface/nginterface.cpp @@ -1918,6 +1918,14 @@ int Ng_GetVertex_SurfaceElements( int vnr, int* elems ) elems[cnt++] = i+1; return cnt; } + case 1: + { + int cnt = 0; + for (int i = 0; i < mesh->pointelements.Size(); i++) + if (mesh->pointelements[i].pnum == vnr) + elems[cnt++] = i+1; + return cnt; + } } return 0; } diff --git a/libsrc/interface/nginterface_v2.cpp b/libsrc/interface/nginterface_v2.cpp index b1070839..5372bcd3 100644 --- a/libsrc/interface/nginterface_v2.cpp +++ b/libsrc/interface/nginterface_v2.cpp @@ -525,9 +525,10 @@ namespace netgen double * x, double * dxdxi) const { - PointIndex pnum = mesh->pointelements[elnr].pnum; + PointIndex pnum = mesh->pointelements[elnr-1].pnum; if (x) x[0] = (*mesh)[pnum](0); - if (dxdxi) dxdxi[0] = 0; + // if (dxdxi) dxdxi[0] = 0; + // Jacobi-matrix is 1 x 0 !!! }