From 794d1b6598767f367e94c4aa4c1627d45478b2f4 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Thu, 30 Mar 2017 15:22:19 +0200 Subject: [PATCH] fix el.mat for bbnd elements in 3D --- libsrc/include/nginterface_v2_impl.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libsrc/include/nginterface_v2_impl.hpp b/libsrc/include/nginterface_v2_impl.hpp index 8d27049d..53147aca 100644 --- a/libsrc/include/nginterface_v2_impl.hpp +++ b/libsrc/include/nginterface_v2_impl.hpp @@ -73,7 +73,14 @@ NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<1> (size_t nr) const if (mesh->GetDimension() == 2) ret.mat = mesh->GetBCNamePtr(el.si-1); else - ret.mat = nullptr; + { + if (mesh->GetDimension() == 3){ + ret.mat = &mesh->GetCD2Name(el.edgenr-1); + } + else + ret.mat = nullptr; + } + ret.points.num = el.GetNP(); ret.points.ptr = (int*)&(el[0]);