get surface element from face

This commit is contained in:
Joachim Schöberl 2017-05-10 17:41:44 +02:00
parent 2b0d3f02ba
commit 2da1465d52
2 changed files with 2 additions and 0 deletions

View File

@ -184,6 +184,7 @@ namespace netgen
public:
Ng_Vertices vertices;
Ng_Edges edges;
int surface_el; // -1 if face not on surface
};

View File

@ -274,6 +274,7 @@ template <> NGX_INLINE DLL_HEADER const Ng_Node<2> Ngx_Mesh :: GetNode<2> (int n
Ng_Node<2> node;
node.vertices.ptr = mesh->GetTopology().GetFaceVerticesPtr(nr);
node.vertices.nv = (node.vertices.ptr[3] == 0) ? 3 : 4;
node.surface_el = mesh->GetTopology().GetFace2SurfaceElement (nr+1)-1;
return node;
}