9 #ifndef _snl_fei_RecordCollection_hpp_
10 #define _snl_fei_RecordCollection_hpp_
12 #include <fei_iosfwd.hpp>
13 #include <fei_Pool_alloc.hpp>
14 #include <fei_FieldMask.hpp>
15 #include <fei_Record.hpp>
21 #define fei_file "snl_fei_RecordCollection.hpp"
23 #include <fei_ErrMacros.hpp>
26 template<
typename T>
class SharedIDs;
43 void setIDMap(
const int* localIDs_begin,
const int* localIDs_end,
44 const int* globalIDs_begin,
const int* globalIDs_end);
49 std::vector<fei::FieldMask*>& fieldMasks,
50 int* recordLocalIDs=NULL);
57 std::vector<fei::FieldMask*>& fieldMasks,
58 int* recordLocalIDs=NULL);
63 void setOwners_local();
68 return( m_records.size() );
73 {
return m_global_to_local; }
76 {
return m_global_to_local; }
97 {
return &m_records[lid]; }
100 {
return &m_records[lid]; }
102 int getLocalID(
int global_id)
const
104 std::map<int,int>::const_iterator iter = m_global_to_local.find(global_id);
105 if (iter == m_global_to_local.end()) {
116 int whichComponentOfField,
117 const int* eqnNumbers);
124 int whichComponentOfField,
125 const int* eqnNumbers);
137 int getMinID()
const {
return m_minID; }
138 int getMaxID()
const {
return m_maxID; }
142 std::vector<fei::Record<int> > m_records;
143 std::map<int,int> m_global_to_local;
145 int m_minID, m_maxID;
150 FEI_OSTREAM* dbgOut_;
157 #endif // _snl_fei_RecordCollection_hpp_
const std::vector< fei::Record< int > > & getRecords() const
void setDebugOutput(FEI_OSTREAM *dbgOut)
void setOwners_lowestSharing(fei::SharedIDs< int > &sharedIDs)
std::vector< fei::Record< int > > & getRecords()
size_t getNumRecords() const
int getGlobalIndex(int ID, int fieldID, int fieldSize, int fieldOffset, int whichComponentOfField, const int *eqnNumbers)
RecordCollection(int localProc)
virtual ~RecordCollection()
std::map< int, int > & getGlobalToLocalMap()
void initRecords(int numIDs, const int *IDs, std::vector< fei::FieldMask * > &fieldMasks, int *recordLocalIDs=NULL)
int getGlobalBlkIndex(int ID, int &globalBlkIndex)
fei::Record< int > * getRecordWithID(int ID)
int getGlobalIndexLocalID(int localID, int fieldID, int fieldSize, int fieldOffset, int whichComponentOfField, const int *eqnNumbers)