GetIndex - 0-based

This commit is contained in:
Joachim Schoeberl 2015-01-10 14:48:49 +00:00
parent 325e1e315c
commit 1ebe4a3f6b
3 changed files with 9 additions and 2 deletions

View File

@ -76,7 +76,7 @@ namespace netgen
int index; // material / boundary condition
NG_ELEMENT_TYPE GetType() const { return type; }
int GetIndex() const { return index; }
int GetIndex() const { return index-1; }
Ng_Points points; // all points
Ng_Vertices vertices;
Ng_Edges edges;

View File

@ -4,6 +4,12 @@ NGX_INLINE DLL_HEADER Ng_Point Ngx_Mesh :: GetPoint (int nr) const
}
template <>
NGX_INLINE DLL_HEADER int Ngx_Mesh :: GetElementIndex<0> (int nr) const
{
return 0;
}
template <>
NGX_INLINE DLL_HEADER int Ngx_Mesh :: GetElementIndex<1> (int nr) const
{

View File

@ -226,13 +226,14 @@ namespace netgen
}
*/
/*
template <>
DLL_HEADER int Ngx_Mesh :: GetElementIndex<0> (int nr) const
{
return 0;
}
/*
template <>
DLL_HEADER int Ngx_Mesh :: GetElementIndex<1> (int nr) const
{