mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
element index
This commit is contained in:
parent
8f13c6828e
commit
b611150ed3
@ -73,8 +73,10 @@ namespace netgen
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
NG_ELEMENT_TYPE type;
|
NG_ELEMENT_TYPE type;
|
||||||
NG_ELEMENT_TYPE GetType() const { return type; }
|
int index; // material / boundary condition
|
||||||
|
|
||||||
|
NG_ELEMENT_TYPE GetType() const { return type; }
|
||||||
|
int GetIndex() const { return index; }
|
||||||
Ng_Points points; // all points
|
Ng_Points points; // all points
|
||||||
Ng_Vertices vertices;
|
Ng_Vertices vertices;
|
||||||
Ng_Edges edges;
|
Ng_Edges edges;
|
||||||
|
@ -30,7 +30,7 @@ NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<1> (int nr) const
|
|||||||
|
|
||||||
Ng_Element ret;
|
Ng_Element ret;
|
||||||
ret.type = NG_ELEMENT_TYPE(el.GetType());
|
ret.type = NG_ELEMENT_TYPE(el.GetType());
|
||||||
|
ret.index = el.si;
|
||||||
ret.points.num = el.GetNP();
|
ret.points.num = el.GetNP();
|
||||||
ret.points.ptr = (int*)&(el[0]);
|
ret.points.ptr = (int*)&(el[0]);
|
||||||
|
|
||||||
@ -53,6 +53,7 @@ NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<2> (int nr) const
|
|||||||
|
|
||||||
Ng_Element ret;
|
Ng_Element ret;
|
||||||
ret.type = NG_ELEMENT_TYPE(el.GetType());
|
ret.type = NG_ELEMENT_TYPE(el.GetType());
|
||||||
|
ret.index = mesh->GetFaceDescriptor(el.GetIndex()).BCProperty();
|
||||||
ret.points.num = el.GetNP();
|
ret.points.num = el.GetNP();
|
||||||
ret.points.ptr = (int*)&el[0];
|
ret.points.ptr = (int*)&el[0];
|
||||||
|
|
||||||
@ -75,6 +76,7 @@ NGX_INLINE DLL_HEADER Ng_Element Ngx_Mesh :: GetElement<3> (int nr) const
|
|||||||
|
|
||||||
Ng_Element ret;
|
Ng_Element ret;
|
||||||
ret.type = NG_ELEMENT_TYPE(el.GetType());
|
ret.type = NG_ELEMENT_TYPE(el.GetType());
|
||||||
|
ret.index = el.GetIndex();
|
||||||
ret.points.num = el.GetNP();
|
ret.points.num = el.GetNP();
|
||||||
ret.points.ptr = (int*)&el[0];
|
ret.points.ptr = (int*)&el[0];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user