Merge branch 'fix_1d_elementindex' into 'master'

fix 1d elementindex

index was wrong for 1d elements

See merge request !17
This commit is contained in:
Joachim Schöberl 2016-11-17 18:46:09 +01:00
commit 615575f5cf

View File

@ -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