fix 1d elementindex

This commit is contained in:
Christopher Lackner 2016-11-17 17:03:58 +01:00
parent 2bba0b58ed
commit e046452dfa

View File

@ -66,10 +66,10 @@ NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<1> (int nr) const
Ng_Element ret; Ng_Element ret;
ret.type = NG_ELEMENT_TYPE(el.GetType()); ret.type = NG_ELEMENT_TYPE(el.GetType());
if(mesh->GetDimension()==2) if(mesh->GetDimension()==3)
ret.index = el.si;
else
ret.index = el.edgenr; ret.index = el.edgenr;
else
ret.index = el.si;
if (mesh->GetDimension() == 2) if (mesh->GetDimension() == 2)
ret.mat = mesh->GetBCNamePtr(el.si-1); ret.mat = mesh->GetBCNamePtr(el.si-1);
else else