FEI Version of the Day
fei_SlaveVariable.hpp
00001 #ifndef _SlaveVariable_hpp_
00002 #define _SlaveVariable_hpp_
00003 
00004 /*--------------------------------------------------------------------*/
00005 /*    Copyright 2005 Sandia Corporation.                              */
00006 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00007 /*    non-exclusive license for use of this work by or on behalf      */
00008 /*    of the U.S. Government.  Export of this program may require     */
00009 /*    a license from the United States Government.                    */
00010 /*--------------------------------------------------------------------*/
00011 
00016 class SlaveVariable {
00017  public:
00019   SlaveVariable()
00020     : nodeID_(-1), fieldID_(-1), offset_(0){
00021     masterNodes_ = new std::vector<GlobalID>; masterFields_ = new std::vector<int>;
00022     weights_ = new std::vector<double>;
00023   }
00024 
00026   ~SlaveVariable() {delete masterNodes_; delete masterFields_; delete weights_;}
00027 
00028   GlobalID getNodeID() {return(nodeID_);}
00029   void setNodeID(GlobalID nid) {nodeID_ = nid;}
00030 
00031   int getFieldID() {return(fieldID_);}
00032   void setFieldID(int fid) {fieldID_ = fid;}
00033 
00034   int getFieldOffset() {return(offset_);}
00035   void setFieldOffset(int foff) {offset_ = foff;}
00036 
00037   const std::vector<GlobalID>* getMasterNodeIDs() {return(masterNodes_);}
00038   const std::vector<int>* getMasterFields() {return(masterFields_);}
00039   const std::vector<double>* getWeights() {return(weights_);}
00040 
00041   void addMasterNodeID(GlobalID masterNode) 
00042     {masterNodes_->push_back(masterNode);}
00043 
00044   void addMasterField(int masterField)
00045     {masterFields_->push_back(masterField);}
00046 
00047   void addWeight(double weight)
00048     {weights_->push_back(weight);}
00049 
00050  private:
00051   GlobalID nodeID_;
00052   int fieldID_;
00053   int offset_;
00054 
00055   std::vector<GlobalID>* masterNodes_;
00056   std::vector<int>* masterFields_;
00057   std::vector<double>* weights_;
00058 };
00059 
00060 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends