- Timestamp:
- 08/24/15 14:53:36 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/transformation/axis_algorithm_transformation.cpp
r666 r668 39 39 \param[in] axisPositionInGrid position of the axis in the grid 40 40 \param[in] gridDestGlobalDim dimension size of destination grid (it should share the same size for all dimension, maybe except the axis on which transformation is performed) 41 \param[in] globalIndexGridDestSendToServer global index of destination grid which are to be sent to server(s) 41 \param[in] globalIndexGridDestSendToServer global index of destination grid which are to be sent to server(s), this array is already acsending sorted 42 42 \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 43 43 \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 … … 48 48 const std::vector<int>& gridDestGlobalDim, 49 49 const std::vector<int>& gridSrcGlobalDim, 50 const CArray<size_t,1>& globalIndexGridDestSendToServer,50 const std::vector<size_t>& globalIndexGridDestSendToServer, 51 51 CArray<size_t,1>& globalIndexDestGrid, 52 52 std::vector<std::vector<size_t> >& globalIndexSrcGrid) … … 66 66 } 67 67 68 CArray<size_t,1>::const_iterator itbArr = globalIndexGridDestSendToServer.begin(), itArr,69 iteArr = globalIndexGridDestSendToServer.end();68 std::vector<size_t>::const_iterator itbArr = globalIndexGridDestSendToServer.begin(), itArr, 69 iteArr = globalIndexGridDestSendToServer.end(); 70 70 71 71 while (idx < ssize) … … 91 91 } 92 92 93 itArr = std::find(itbArr, iteArr, globIndex); 94 if (iteArr != itArr) ++realGlobalIndexSize; 93 if (std::binary_search(itbArr, iteArr, globIndex)) ++realGlobalIndexSize; 95 94 ++idxLoop[0]; 96 95 ++idx; … … 130 129 } 131 130 132 itArr = std::find(itbArr, iteArr, globIndex); 133 if (iteArr != itArr) 131 if (std::binary_search(itbArr, iteArr, globIndex)) 134 132 { 135 133 globalIndexDestGrid(realGlobalIndex) = globIndex;
Note: See TracChangeset
for help on using the changeset viewer.