FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
snl_fei_PointBlockMap.hpp
Go to the documentation of this file.
1 /*--------------------------------------------------------------------*/
2 /* Copyright 2005 Sandia Corporation. */
3 /* Under the terms of Contract DE-AC04-94AL85000, there is a */
4 /* non-exclusive license for use of this work by or on behalf */
5 /* of the U.S. Government. Export of this program may require */
6 /* a license from the United States Government. */
7 /*--------------------------------------------------------------------*/
8 
9 #ifndef _snl_fei_PointBlockMap_hpp_
10 #define _snl_fei_PointBlockMap_hpp_
11 
12 #include <fei_macros.hpp>
13 
14 #include <map>
15 
16 namespace snl_fei {
23  class PointBlockMap {
24  public:
26  PointBlockMap();
27 
29  virtual ~PointBlockMap();
30 
36  void setPtEqualBlk();
37 
40  bool ptEqualBlk() { return( ptEqualBlk_ ); }
41 
47  int setEqn(int ptEqn, int blkEqn);
48 
55  int setEqn(int ptEqn, int blkEqn, int blkSize);
56 
61  int setBlkEqnSize(int blkEqn, int size);
62 
64  int getBlkEqnSize(int blkEqn);
65 
68  int getMaxBlkEqnSize() { return( maxSize_ ); }
69 
72  void setMaxBlkEqnSize(int sz) { maxSize_ = sz; }
73 
79  int eqnToBlkEqn(int eqn) const;
80 
86  int blkEqnToPtEqn(int blkEqn) const;
87 
93  int getBlkEqnInfo(int blkEqn, int& ptEqn, int& blkSize);
94 
99  int getPtEqnInfo(int ptEqn, int& blkEqn, int& blkOffset);
100 
106  int getBlkEqnOffset(int blkEqn, int ptEqn);
107 
111  bool isExactlyBlkEqn(int ptEqn);
112 
115  std::map<int,int>* getPtEqns()
116  {
117  return( ptEqns_ );
118  }
119 
122  std::map<int,std::pair<int,int> >* getBlkEqns()
123  {
124  return( blkEqns_ );
125  }
126 
127  private:
129  PointBlockMap(const PointBlockMap& src);
130 
132 
133  std::map<int,int>* ptEqns_; //ptEqns_ maps point-equations to block-equations
134 
135  std::map<int,std::pair<int,int> >* blkEqns_;
136  //blkEqns_ maps block-equations to point-equations and block-sizes
137  //(the point-equation stored is the first or smallest point-equation that is
138  //associated with the block-equation)
139 
140  int maxSize_;
141 
142  bool ptEqualBlk_; //if this is true, then all blkSizes are 1
143  };//class PointBlockMap
144 }//namespace snl_fei
145 #endif // _snl_fei_PointBlockMap_hpp_
146 
std::map< int, int > * ptEqns_
int setBlkEqnSize(int blkEqn, int size)
int getBlkEqnOffset(int blkEqn, int ptEqn)
int setEqn(int ptEqn, int blkEqn)
int eqnToBlkEqn(int eqn) const
std::map< int, std::pair< int, int > > * getBlkEqns()
std::map< int, std::pair< int, int > > * blkEqns_
std::map< int, int > * getPtEqns()
int getPtEqnInfo(int ptEqn, int &blkEqn, int &blkOffset)
PointBlockMap & operator=(const PointBlockMap &src)
int blkEqnToPtEqn(int blkEqn) const
int getBlkEqnInfo(int blkEqn, int &ptEqn, int &blkSize)