- Timestamp:
- 03/23/16 16:11:01 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/transformation/domain_algorithm_transformation.cpp
r827 r829 42 42 const std::vector<int>& gridDestGlobalDim, 43 43 const std::vector<int>& gridSrcGlobalDim, 44 const std::vector<size_t>& globalIndexGridDestSendToServer,45 CArray<size_t,1>& globalIndexDestGrid,44 const GlobalLocalMap& globalLocalIndexDestSendToServerMap, 45 std::vector<std::pair<size_t,int> >& globalLocalIndexDestMap, 46 46 std::vector<std::vector<size_t> >& globalIndexSrcGrid) 47 47 { … … 79 79 for (int i = 0; i< numElement; ++i) ssize *= gridDomainGlobalDim[i]; 80 80 81 std::vector<size_t>::const_iterator itbArr = globalIndexGridDestSendToServer.begin(), itArr,82 iteArr = globalIndexGridDestSendToServer.end(); 81 GlobalLocalMap::const_iterator iteArr = globalLocalIndexDestSendToServerMap.end(), it; 82 83 83 idx = 0; 84 84 while (idx < ssize) … … 112 112 } 113 113 114 if ( std::binary_search(itbArr, iteArr,globIndex)) ++realGlobalIndexSize;114 if (iteArr != globalLocalIndexDestSendToServerMap.find(globIndex)) ++realGlobalIndexSize; 115 115 ++idxLoop[0]; 116 116 ++idx; 117 117 } 118 118 119 if (global IndexDestGrid.numElements() != realGlobalIndexSize)120 global IndexDestGrid.resize(realGlobalIndexSize);119 if (globalLocalIndexDestMap.size() != realGlobalIndexSize) 120 globalLocalIndexDestMap.resize(realGlobalIndexSize); 121 121 122 122 if (realGlobalIndexSize != globalIndexSrcGrid.size()) globalIndexSrcGrid.resize(realGlobalIndexSize); … … 158 158 } 159 159 160 if (std::binary_search(itbArr, iteArr, globIndex)) 160 it = globalLocalIndexDestSendToServerMap.find(globIndex); 161 if (iteArr != it) 161 162 { 162 global IndexDestGrid(realGlobalIndex) = globIndex;163 globalLocalIndexDestMap[realGlobalIndex] = (std::make_pair(it->first,it->second)); 163 164 for (int i = 0; i < globalIndexSrcGrid[realGlobalIndex].size(); ++i) 164 165 {
Note: See TracChangeset
for help on using the changeset viewer.