Merge branch 'fix_el_mat_bbnd' into 'master'

fix el.mat for bbnd elements in 3D

See merge request !40
This commit is contained in:
Joachim Schöberl 2017-03-30 15:37:35 +02:00
commit 8e7c043ef4

View File

@ -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]);