- Timestamp:
- 08/24/15 14:53:36 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/transformation/domain_algorithm_transformation.cpp
r663 r668 32 32 \param[in] gridDestGlobalDim dimension size of destination grid (it should share the same size for all dimension, maybe except the domain on which transformation is performed) 33 33 \param[in] gridSrcGlobalDim dimension size of source grid (it should share the same size for all dimension, maybe except the domain on which transformation is performed) 34 \param[in] globalIndexGridDestSendToServer global index of destination grid which are to be sent to server(s) 34 \param[in] globalIndexGridDestSendToServer global index of destination grid which are to be sent to server(s), this array is already acsending sorted 35 35 \param[in/out] globalIndexDestGrid array of global index (for 2d grid, this array is a line, for 3d, this array represents a plan). It should be preallocated 36 36 \param[in/out] globalIndexSrcGrid array of global index of source grid (for 2d grid, this array is a line, for 3d, this array represents a plan). It should be preallocated … … 41 41 const std::vector<int>& gridDestGlobalDim, 42 42 const std::vector<int>& gridSrcGlobalDim, 43 const CArray<size_t,1>& globalIndexGridDestSendToServer,43 const std::vector<size_t>& globalIndexGridDestSendToServer, 44 44 CArray<size_t,1>& globalIndexDestGrid, 45 45 std::vector<std::vector<size_t> >& globalIndexSrcGrid) … … 78 78 for (int i = 0; i< numElement; ++i) ssize *= gridDomainGlobalDim[i]; 79 79 80 CArray<size_t,1>::const_iterator itbArr = globalIndexGridDestSendToServer.begin(), itArr,81 iteArr = globalIndexGridDestSendToServer.end();80 std::vector<size_t>::const_iterator itbArr = globalIndexGridDestSendToServer.begin(), itArr, 81 iteArr = globalIndexGridDestSendToServer.end(); 82 82 idx = 0; 83 83 while (idx < ssize) … … 111 111 } 112 112 113 itArr = std::find(itbArr, iteArr, globIndex); 114 if (iteArr != itArr) ++realGlobalIndexSize; 113 if (std::binary_search(itbArr, iteArr, globIndex)) ++realGlobalIndexSize; 115 114 ++idxLoop[0]; 116 115 ++idx; … … 158 157 } 159 158 160 itArr = std::find(itbArr, iteArr, globIndex); 161 if (iteArr != itArr) 159 if (std::binary_search(itbArr, iteArr, globIndex)) 162 160 { 163 161 globalIndexDestGrid(realGlobalIndex) = globIndex;
Note: See TracChangeset
for help on using the changeset viewer.