5 #ifndef _LINEARSYSTEMMERGER_H_
6 #define _LINEARSYSTEMMERGER_H_
20 class StorageSiteMerger;
22 class LinearSystemMerger
26 typedef shared_ptr< Array<double> > ArrayDblePtr;
27 typedef shared_ptr< Array<int> > ArrayIntPtr;
28 typedef map<int,ArrayIntPtr> ArrayIntPtrMap;
38 shared_ptr< LinearSystem > getLS() {
return _mergeLS;}
44 const map<int, ArrayIntPtr>& getLocalToGlobal()
const {
return _localToGlobal;}
45 const Array<int>& getGlobalToProc()
const {
return *_globalToProc;}
46 const Array<int>& getGlobalToLocal()
const {
return *_globalToLocal;}
47 const Array<int>& getSelfCounts()
const {
return *_selfCounts;}
49 const map<int, ArrayDblePtr>& getDiag()
const {
return _diag; }
50 const map<int, ArrayDblePtr>& getOffDiag()
const {
return _offDiag;}
51 const map< int, ArrayIntPtr >& getLocalConnRow()
const {
return _row;}
52 const map< int, ArrayIntPtr >& getLocalConnCol()
const {
return _col;}
53 const vector< map<int,int> >& getGatherIDsLocalToGlobal()
const {
return _gatherIDsLocalToGlobalMap; }
56 const MPI::Intracomm& getComm()
const {
return _comm;}
57 const set<int>& getGroup()
const {
return _group;}
64 void get_neigh_mesh_counts();
65 void get_scatter_cells();
66 void get_gather_cells();
67 void get_crconnectivity();
68 void get_local_to_global_map();
69 void set_merged_crconnectivity();
70 void update_gatherCells_from_scatterCells();
71 void set_ls_vectors();
77 const set<int>& _group;
80 shared_ptr<LinearSystem> _mergeLS;
85 int _totalScatterCells;
86 int _totalScatterCellsLocal;
87 int _totalGatherCells;
88 int _totalGatherCellsLocal;
92 ArrayIntPtr _neighMeshCounts;
93 map<int, ArrayIntPtr> _scatterInterfaceCounts;
94 ArrayIntPtr _scatterSize;
95 vector< map<int, ArrayIntPtr> > _scatterCells;
96 map<int, ArrayIntPtr> _scatterInterfaceIDs;
98 map<int, ArrayIntPtr> _gatherInterfaceCounts;
99 ArrayIntPtr _gatherSize;
100 vector< map<int, ArrayIntPtr> > _gatherCells;
101 map<int,ArrayIntPtr> _gatherInterfaceIDs;
102 vector< map<int,int> > _gatherIDsLocalToGlobalMap;
103 ArrayIntPtr _selfCounts;
105 ArrayIntPtr _rowLength;
106 ArrayIntPtr _colLength;
107 map< int, ArrayIntPtr > _row;
108 map< int, ArrayIntPtr > _col;
109 map< int, ArrayIntPtr > _colPos;
110 ArrayIntPtr _mergeColPos;
112 map< int, ArrayIntPtr > _localToGlobal;
113 ArrayIntPtr _globalToProc;
114 ArrayIntPtr _globalToLocal;
116 map<int, ArrayDblePtr > _diag;
117 map<int, ArrayDblePtr > _offDiag;
120 shared_ptr< StorageSite > _site;
121 shared_ptr< StorageSiteMerger > _siteMerger;
122 shared_ptr< CRConnectivity > _mergeCR;
125 MPI::Intracomm _comm;
friend class LinearSystemMerger