Changeset 182 for XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.cpp
- Timestamp:
- 04/20/11 18:34:34 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.cpp
r181 r182 23 23 24 24 CGrid::~CGrid(void) 25 { /* Ne rien faire de plus */ } 25 { 26 this->axis.reset() ; 27 this->domain.reset() ; 28 29 for (StdSize i = 0; i < this->storeIndex.size(); i++) 30 { 31 this->storeIndex[i].reset(); 32 this->out_i_index[i].reset(); 33 this->out_j_index[i].reset(); 34 this->out_l_index[i].reset(); 35 } 36 } 26 37 27 38 ///--------------------------------------------------------------- … … 88 99 this->solveAxisRef() ; 89 100 if (this->storeIndex.size() == 1) 101 { 90 102 this->computeIndex() ; 103 } 104 else 105 { 106 this->computeIndexServer(); 107 } 91 108 this->isChecked = true; 92 109 } … … 303 320 this->out_l_index.push_back(out_l_index_); 304 321 } 322 323 //--------------------------------------------------------------- 324 325 void CGrid::computeIndexServer(void) 326 { 327 ARRAY(int, 1) storeIndex_srv = this->storeIndex[0]; 328 ARRAY(int, 1) out_i_index_srv = this->out_i_index[0]; 329 ARRAY(int, 1) out_j_index_srv = this->out_j_index[0]; 330 ARRAY(int, 1) out_l_index_srv = this->out_l_index[0]; 331 332 const std::vector<int> & ibegin = this->domain->getIBeginSub(); 333 const std::vector<int> & jbegin = this->domain->getJBeginSub(); 334 335 StdSize dn = 0; 336 for (StdSize j = 1; j < this->out_i_index.size(); j++) 337 dn += this->out_i_index[j]->size(); 338 339 ARRAY_ASSIGN(storeIndex_srv, int, 1, [dn]); 340 ARRAY_ASSIGN(out_i_index_srv, int, 1, [dn]); 341 ARRAY_ASSIGN(out_j_index_srv, int, 1, [dn]); 342 ARRAY_ASSIGN(out_l_index_srv, int, 1, [dn]); 343 344 for (StdSize i = 0, dn = 0; i < ibegin.size(); i++) 345 { 346 ARRAY(int, 1) storeIndex_cl = this->storeIndex[i+1]; 347 ARRAY(int, 1) out_i_index_cl = this->out_i_index[i+1]; 348 ARRAY(int, 1) out_j_index_cl = this->out_j_index[i+1]; 349 ARRAY(int, 1) out_l_index_cl = this->out_l_index[i+1]; 350 351 const int ibegin_cl = ibegin[i]; 352 const int jbegin_cl = jbegin[i]; 353 354 for (StdSize n = dn, m = 0; n < (dn + storeIndex_cl->size()); n++, m++) 355 { 356 (*storeIndex_srv)[n] = (*storeIndex_cl)[m] + dn; 357 (*out_i_index_srv)[n] = (*out_i_index_cl)[m] + ibegin_cl - 1; 358 (*out_j_index_srv)[n] = (*out_j_index_cl)[m] + jbegin_cl - 1; 359 (*out_l_index_srv)[n] = (*out_l_index_cl)[m]; 360 } 361 362 dn += storeIndex_cl->size(); 363 364 } 365 366 //~ StdOFStream ofs(this->getId().c_str()); 367 //~ for (StdSize h = 0; h < storeIndex_srv->size(); h++) 368 //~ { 369 //~ ofs << "(" << (*storeIndex_srv)[h] << ";" 370 //~ << (*out_i_index_srv)[h] << "," 371 //~ << (*out_j_index_srv)[h] << "," 372 //~ << (*out_l_index_srv)[h] << ")" << std::endl; 373 //~ } 374 //~ ofs.close(); 375 376 } 305 377 306 378 ///---------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.