1 #ifndef _SlaveVariable_hpp_
2 #define _SlaveVariable_hpp_
20 : nodeID_(-1), fieldID_(-1), offset_(0){
21 masterNodes_ =
new std::vector<GlobalID>; masterFields_ =
new std::vector<int>;
22 weights_ =
new std::vector<double>;
26 ~SlaveVariable() {
delete masterNodes_;
delete masterFields_;
delete weights_;}
28 GlobalID getNodeID() {
return(nodeID_);}
29 void setNodeID(GlobalID nid) {nodeID_ = nid;}
31 int getFieldID() {
return(fieldID_);}
32 void setFieldID(
int fid) {fieldID_ = fid;}
34 int getFieldOffset() {
return(offset_);}
35 void setFieldOffset(
int foff) {offset_ = foff;}
37 const std::vector<GlobalID>* getMasterNodeIDs() {
return(masterNodes_);}
38 const std::vector<int>* getMasterFields() {
return(masterFields_);}
39 const std::vector<double>* getWeights() {
return(weights_);}
41 void addMasterNodeID(GlobalID masterNode)
42 {masterNodes_->push_back(masterNode);}
44 void addMasterField(
int masterField)
45 {masterFields_->push_back(masterField);}
47 void addWeight(
double weight)
48 {weights_->push_back(weight);}
55 std::vector<GlobalID>* masterNodes_;
56 std::vector<int>* masterFields_;
57 std::vector<double>* weights_;