Skip to content
Snippets Groups Projects
Commit 7fd21fd0 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

store partition number as a short (instead of a full integer)
parent 51569e8f
No related branches found
No related tags found
No related merge requests found
...@@ -46,12 +46,13 @@ class MElement ...@@ -46,12 +46,13 @@ class MElement
{ {
private: private:
static int _globalNum; static int _globalNum;
int _num, _partition; int _num;
short _partition;
char _visible; char _visible;
public : public :
MElement(int num=0, int part=0) MElement(int num=0, int part=0)
: _partition(part), _visible(true) : _visible(true)
{ {
if(num){ if(num){
_num = num; _num = num;
...@@ -60,6 +61,7 @@ class MElement ...@@ -60,6 +61,7 @@ class MElement
else{ else{
_num = ++_globalNum; _num = ++_globalNum;
} }
_partition = (short)part;
} }
virtual ~MElement(){} virtual ~MElement(){}
...@@ -77,7 +79,7 @@ class MElement ...@@ -77,7 +79,7 @@ class MElement
// get/set the partition to which the element belongs // get/set the partition to which the element belongs
virtual int getPartition(){ return _partition; } virtual int getPartition(){ return _partition; }
virtual void setPartition(int num){ _partition = num; } virtual void setPartition(int num){ _partition = (short)num; }
// get/set the visibility flag // get/set the visibility flag
virtual char getVisibility(){ return _visible; } virtual char getVisibility(){ return _visible; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment