9 #ifndef _fei_VectorSpace_hpp_
10 #define _fei_VectorSpace_hpp_
12 #include <fei_macros.hpp>
13 #include <fei_constants.hpp>
14 #include <fei_fwd.hpp>
15 #include <fei_SharedPtr.hpp>
16 #include <fei_Logger.hpp>
17 #include <fei_utils.hpp>
18 #include <fei_CommUtils.hpp>
19 #include <fei_FieldDofMap.hpp>
20 #include <fei_ctg_set.hpp>
21 #include <snl_fei_RaggedTable.hpp>
27 template<
typename GlobalIDType>
class Record;
28 template<
typename GlobalIDType>
class Record_Operator;
29 template<
typename GlobalIDType>
class SharedIDs;
80 VectorSpace(MPI_Comm comm,
const char* name = NULL);
107 const int* fieldSizes,
108 const int* fieldTypes = NULL);
122 void setIDMap(
int idType,
123 const int* localIDs_begin,
const int* localIDs_end,
124 const int* globalIDs_begin,
const int* globalIDs_end);
188 const int* sharedIDs,
189 const int* numSharingProcsPerID,
190 const int* sharingProcs);
213 const int* sharedIDs,
214 const int* numSharingProcsPerID,
215 const int*
const* sharingProcs);
217 int setOwners(
int numShared,
int idType,
const int* sharedIDs,
const int* owners);
277 int whichComponentOfField,
320 int& globalBlkIndex);
384 int* globalBlkIndices);
451 void getFields(std::vector<int>& fieldIDs);
469 void getFields(
int idType,
int ID, std::vector<int>& fieldIDs);
480 void getIDTypes(std::vector<int>& idTypes)
const;
518 bool isLocal(
int idType,
int ID);
542 int& numOwnedAndSharedIDs);
588 int* globalBlkIndices,
607 int getIndices_Owned(
int lenIndices,
int* globalIndices,
int& numIndices)
const;
627 int* globalBlkIndices,
667 std::vector<int>& indices);
671 std::vector<int>& indices);
675 std::vector<int>& indices);
685 void getGlobalIndicesL(
int numRecords,
696 const int* numFieldsPerID,
698 const int* fieldSizes,
703 void getGlobalIndicesL(
int numRecords,
706 const int* numFieldsPerID,
708 const int* fieldSizes,
719 void getGlobalBlkIndicesL(
int numRecords,
737 std::vector<fei::FieldMask*> fieldMasks_;
739 void getSendProcs(std::vector<int>& sendProcs)
const;
750 void compute_shared_ids(
const std::vector<int>& global_min,
const std::vector<int>& global_max);
754 void setOwners_shared();
756 int calculateGlobalIndices();
762 int synchronizeSharedRecords();
764 int setLocalEqnNumbers();
766 int exchangeGlobalIndices();
771 std::vector<fei::FieldMask*>& fieldMasks);
773 void setName(
const char* name);
778 std::vector<int> idTypes_;
779 std::map<int,unsigned> fieldDatabase_;
782 std::vector<snl_fei::RecordCollection*> recordCollections_;
784 std::map<int, fei::SharedIDs<int> > sharedIDTables_;
785 std::map<int, fei::comm_map*> ownerPatterns_;
786 std::map<int, fei::comm_map*> sharerPatterns_;
788 bool sharedRecordsSynchronized_;
792 std::vector<int> globalOffsets_;
793 std::vector<int> globalIDOffsets_;
797 int firstLocalOffset_, lastLocalOffset_;
799 std::vector<int> eqnNumbers_;
802 bool initCompleteAlreadyCalled_;
805 std::string dbgprefix_;
806 bool checkSharedIDs_;
811 return( eqnNumbers_ );
816 return( eqnNumbers_ );
831 #endif // _fei_VectorSpace_hpp_
int getGlobalNumBlkIndices() const
MPI_Comm getCommunicator() const
int getGlobalIndicesLocalIDs(int numIDs, const int *localIDs, int idType, int fieldID, int *globalIndices)
int initSharedIDs(int numShared, int idType, const int *sharedIDs, const int *numSharingProcsPerID, const int *sharingProcs)
int getBlkIndices_Owned(int lenBlkIndices, int *globalBlkIndices, int *blkSizes, int &numBlkIndices)
VectorSpace(MPI_Comm comm, const char *name=NULL)
int getGlobalNumIndices() const
int getIndices_SharedAndOwned(std::vector< int > &globalIndices) const
int getOwnedIDs(int idtype, int lenList, int *IDs, int &numLocalIDs)
void defineFields(int numFields, const int *fieldIDs, const int *fieldSizes, const int *fieldTypes=NULL)
int addDOFs(int fieldID, int idType, int numIDs, const int *IDs)
int getBlkIndices_SharedAndOwned(int lenBlkIndices, int *globalBlkIndices, int *blkSizes, int &numBlkIndices)
void setParameters(const fei::ParameterSet ¶mset)
int addVectorSpace(fei::VectorSpace *inputSpace)
int getGlobalIndex(int idType, int ID, int fieldID, int fieldOffset, int whichComponentOfField, int &globalIndex)
void getIDTypes(std::vector< int > &idTypes) const
int getGlobalIndices(int numIDs, const int *IDs, int idType, int fieldID, int *globalIndices)
int getOwnedAndSharedIDs(int idtype, int lenList, int *IDs, int &numOwnedAndSharedIDs)
int getNumOwnedIDs(int idType)
int getOwnerProcBlkIndex(int globalIndex)
int getNumBlkIndices_SharedAndOwned(int &numBlkIndices) const
void defineIDTypes(int numIDTypes, const int *idTypes)
bool isLocallyOwned(int idType, int ID)
int getOwnerProcPtIndex(int globalIndex)
void getGlobalBlkIndexOffsets(std::vector< int > &globalBlkOffsets) const
int getNumSharedIDs(int idType, int &numShared)
bool initCompleteAlreadyCalled() const
int getGlobalBlkIndex(int idType, int ID, int &globalBlkIndex)
int getIndices_Owned(std::vector< int > &globalIndices) const
snl_fei::PointBlockMap * getPointBlockMap()
void getFields(std::vector< int > &fieldIDs)
void getGlobalIndexOffsets(std::vector< int > &globalOffsets) const
int getNumBlkIndices_Owned() const
int getNumOwnedAndSharedIDs(int idType)
int getNumIndices_SharedAndOwned() const
unsigned getFieldSize(int fieldID)
int getNumDegreesOfFreedom(int idType, int ID)
int getRecordCollection(int idType, snl_fei::RecordCollection *&records)
int getGlobalBlkIndices(int numIDs, const int *IDs, int idType, int *globalBlkIndices)
std::vector< int > & getEqnNumbers()
int getNumIndices_Owned() const
bool isLocal(int idType, int ID)