FEI Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
fei_Record.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 _fei_Record_hpp_
10#define _fei_Record_hpp_
11
12#include <fei_macros.hpp>
13
14namespace fei {
15class FieldMask;
16
19template<typename GlobalIDType>
20class Record {
21public:
23 Record();
24
27 : ID_(src.ID_),
28 number_(src.number_),
34 {}
35
37 virtual ~Record();
38
40 void setID(const GlobalIDType& ID)
41 {
42 ID_ = ID;
43 }
44
46 GlobalIDType getID() const
47 {
48 return(ID_);
49 }
50
52 void setNumber(const GlobalIDType& num)
53 {
54 number_ = num;
55 }
56
58 GlobalIDType getNumber() const
59 {
60 return(number_);
61 }
62
64 bool operator==(const Record<GlobalIDType>& rcd) const
65 {
66 return( ID_ == rcd.ID_ );
67 }
68
70 bool operator!=(const Record<GlobalIDType>& rcd) const
71 {
72 return( ID_ != rcd.ID_ );
73 }
74
76 bool operator<(const Record<GlobalIDType>& rcd) const
77 {
78 return( ID_ < rcd.ID_ );
79 }
80
82 bool operator>(const Record<GlobalIDType>& rcd) const
83 {
84 return( ID_ > rcd.ID_ );
85 }
86
88 void setOwnerProc(int owner)
89 {
90 ownerProc_ = owner;
91 }
92
94 int getOwnerProc() const
95 {
96 return(ownerProc_);
97 }
98
101 {
102 fieldMask_ = fm;
103 }
104
107 {
108 return( fieldMask_ );
109 }
110
113 {
114 return( fieldMask_ );
115 }
116
119 void setOffsetIntoEqnNumbers(int offset)
120 {
121 offsetIntoEqnNumbers_ = offset;
122 }
123
127 {
128 return(offsetIntoEqnNumbers_);
129 }
130
131 bool hasSlaveDof() const
132 { return( hasSlaveDof_ ); }
133
134 void hasSlaveDof(bool flag)
135 { hasSlaveDof_ = flag; }
136
138 {
139 ID_ = src.ID_;
140 number_ = src.number_;
146 return *this;
147 }
148
149private:
150
151 GlobalIDType ID_;
152 GlobalIDType number_;
153
155
157
159
160public:
163
164private:
166};
167
169template<class GlobalIDType>
171 public:
174
176 virtual void operator()(Record<GlobalIDType>& record) = 0;
177
178};//class Record_Operator
179
180template<class GlobalIDType>
182 : ID_(-1),
183 number_(-1),
184 fieldMask_(NULL),
185 offsetIntoEqnNumbers_(0),
186 ownerProc_(-1),
187 isInLocalSubdomain_(false),
188 hasSlaveDof_(false)
189{
190}
191
192template<class GlobalIDType>
194{
195}
196
197
198} //namespace fei
199
200#endif // _fei_Record_hpp_
201
virtual void operator()(Record< GlobalIDType > &record)=0
virtual ~Record_Operator()
Definition: fei_Record.hpp:173
GlobalIDType ID_
Definition: fei_Record.hpp:151
void setID(const GlobalIDType &ID)
Definition: fei_Record.hpp:40
bool hasSlaveDof_
Definition: fei_Record.hpp:165
fei::FieldMask * getFieldMask()
Definition: fei_Record.hpp:106
GlobalIDType number_
Definition: fei_Record.hpp:152
int offsetIntoEqnNumbers_
Definition: fei_Record.hpp:156
fei::FieldMask * fieldMask_
Definition: fei_Record.hpp:154
GlobalIDType getID() const
Definition: fei_Record.hpp:46
Record< GlobalIDType > & operator=(const Record< GlobalIDType > &src)
Definition: fei_Record.hpp:137
bool isInLocalSubdomain_
Definition: fei_Record.hpp:162
int getOffsetIntoEqnNumbers() const
Definition: fei_Record.hpp:126
void setNumber(const GlobalIDType &num)
Definition: fei_Record.hpp:52
void setOffsetIntoEqnNumbers(int offset)
Definition: fei_Record.hpp:119
Record(const Record< GlobalIDType > &src)
Definition: fei_Record.hpp:26
bool operator>(const Record< GlobalIDType > &rcd) const
Definition: fei_Record.hpp:82
void setOwnerProc(int owner)
Definition: fei_Record.hpp:88
const fei::FieldMask * getFieldMask() const
Definition: fei_Record.hpp:112
bool operator==(const Record< GlobalIDType > &rcd) const
Definition: fei_Record.hpp:64
void hasSlaveDof(bool flag)
Definition: fei_Record.hpp:134
bool operator<(const Record< GlobalIDType > &rcd) const
Definition: fei_Record.hpp:76
bool hasSlaveDof() const
Definition: fei_Record.hpp:131
virtual ~Record()
Definition: fei_Record.hpp:193
bool operator!=(const Record< GlobalIDType > &rcd) const
Definition: fei_Record.hpp:70
void setFieldMask(fei::FieldMask *fm)
Definition: fei_Record.hpp:100
GlobalIDType getNumber() const
Definition: fei_Record.hpp:58
int getOwnerProc() const
Definition: fei_Record.hpp:94