FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fei_SlaveVariable.hpp
Go to the documentation of this file.
1 #ifndef _SlaveVariable_hpp_
2 #define _SlaveVariable_hpp_
3 
4 /*--------------------------------------------------------------------*/
5 /* Copyright 2005 Sandia Corporation. */
6 /* Under the terms of Contract DE-AC04-94AL85000, there is a */
7 /* non-exclusive license for use of this work by or on behalf */
8 /* of the U.S. Government. Export of this program may require */
9 /* a license from the United States Government. */
10 /*--------------------------------------------------------------------*/
11 
17  public:
20  : nodeID_(-1), fieldID_(-1), offset_(0){
21  masterNodes_ = new std::vector<GlobalID>; masterFields_ = new std::vector<int>;
22  weights_ = new std::vector<double>;
23  }
24 
26  ~SlaveVariable() {delete masterNodes_; delete masterFields_; delete weights_;}
27 
28  GlobalID getNodeID() {return(nodeID_);}
29  void setNodeID(GlobalID nid) {nodeID_ = nid;}
30 
31  int getFieldID() {return(fieldID_);}
32  void setFieldID(int fid) {fieldID_ = fid;}
33 
34  int getFieldOffset() {return(offset_);}
35  void setFieldOffset(int foff) {offset_ = foff;}
36 
37  const std::vector<GlobalID>* getMasterNodeIDs() {return(masterNodes_);}
38  const std::vector<int>* getMasterFields() {return(masterFields_);}
39  const std::vector<double>* getWeights() {return(weights_);}
40 
41  void addMasterNodeID(GlobalID masterNode)
42  {masterNodes_->push_back(masterNode);}
43 
44  void addMasterField(int masterField)
45  {masterFields_->push_back(masterField);}
46 
47  void addWeight(double weight)
48  {weights_->push_back(weight);}
49 
50  private:
52  int fieldID_;
53  int offset_;
54 
55  std::vector<GlobalID>* masterNodes_;
56  std::vector<int>* masterFields_;
57  std::vector<double>* weights_;
58 };
59 
60 #endif
void addMasterField(int masterField)
void addWeight(double weight)
int GlobalID
Definition: fei_defs.h:60
const std::vector< GlobalID > * getMasterNodeIDs()
std::vector< int > * masterFields_
std::vector< GlobalID > * masterNodes_
const std::vector< double > * getWeights()
void setFieldID(int fid)
const std::vector< int > * getMasterFields()
void setFieldOffset(int foff)
std::vector< double > * weights_
void addMasterNodeID(GlobalID masterNode)
void setNodeID(GlobalID nid)
GlobalID getNodeID()