Added material name for 0D elements

This commit is contained in:
Michael Neunteufel 2018-12-07 13:47:35 +01:00
parent 7934a34872
commit 8665dea15e

View File

@ -63,6 +63,13 @@ NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<0> (size_t nr) const
ret.facets.num = 1;
ret.facets.base = 1;
ret.facets.ptr = (int*)&el.pnum;
if (mesh->GetDimension() == 1)
ret.mat = mesh->GetBCNamePtr(el.index-1);
else if (mesh->GetDimension() == 2)
ret.mat = mesh->GetCD2NamePtr(el.index-1);
else
ret.mat = mesh->GetCD3NamePtr(el.index-1);
return ret;
}