From e046452dfac6c84dcbc42432549fcd82b7dbb7b0 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Thu, 17 Nov 2016 17:03:58 +0100 Subject: [PATCH] fix 1d elementindex --- libsrc/include/nginterface_v2_impl.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libsrc/include/nginterface_v2_impl.hpp b/libsrc/include/nginterface_v2_impl.hpp index ca272439..dfdaf46b 100644 --- a/libsrc/include/nginterface_v2_impl.hpp +++ b/libsrc/include/nginterface_v2_impl.hpp @@ -66,10 +66,10 @@ NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<1> (int nr) const Ng_Element ret; ret.type = NG_ELEMENT_TYPE(el.GetType()); - if(mesh->GetDimension()==2) - ret.index = el.si; - else + if(mesh->GetDimension()==3) ret.index = el.edgenr; + else + ret.index = el.si; if (mesh->GetDimension() == 2) ret.mat = mesh->GetBCNamePtr(el.si-1); else