Changeset 1099 for XIOS/dev/dev_olga/src/distribution_server.cpp
- Timestamp:
- 04/14/17 16:53:56 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_olga/src/distribution_server.cpp
r1030 r1099 175 175 void CDistributionServer::computeLocalIndex(CArray<size_t,1>& globalIndex) 176 176 { 177 int ssize = globalIndex.numElements(); 178 CArray<size_t,1> localIndex(ssize); 177 size_t ssize = globalIndex.numElements(); 178 size_t localIndexSize = std::min(globalIndex_.numElements(), ssize); 179 CArray<size_t,1> localIndex(localIndexSize); 179 180 GlobalLocalMap::const_iterator ite = globalLocalIndexMap_.end(), it; 180 for (int idx = 0; idx < ssize; ++idx) 181 int i = 0; 182 for (size_t idx = 0; idx < ssize; ++idx) 181 183 { 182 184 it = globalLocalIndexMap_.find(globalIndex(idx)); 183 185 if (ite != it) 184 localIndex(idx) = it->second; 186 { 187 localIndex(i) = it->second; 188 ++i; 189 } 185 190 } 186 191 … … 201 206 } 202 207 208 /*! 209 Get the size of grid index in server (e.x: sizeGrid *= size of each dimensiion) 210 */ 211 int CDistributionServer::getGridSize() const 212 { 213 return globalLocalIndexMap_.size(); 214 } 203 215 204 216 const std::vector<int>& CDistributionServer::getZoomBeginGlobal() const
Note: See TracChangeset
for help on using the changeset viewer.