- Timestamp:
- 01/31/19 12:12:52 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_trunk_omp/src/transformation/grid_transformation.cpp
r1601 r1646 38 38 */ 39 39 void CGridTransformation::selectScalarAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) 40 TRY 40 41 { 41 42 std::vector<CScalar*> scaListDestP = gridDestination_->getScalars(); … … 59 60 algoTransformation_.push_back(algo); 60 61 } 62 CATCH 61 63 62 64 /*! … … 67 69 */ 68 70 void CGridTransformation::selectAxisAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) 71 TRY 69 72 { 70 73 std::vector<CAxis*> axisListDestP = gridDestination_->getAxis(); … … 88 91 algoTransformation_.push_back(algo); 89 92 } 93 CATCH 90 94 91 95 /*! … … 96 100 */ 97 101 void CGridTransformation::selectDomainAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) 102 TRY 98 103 { 99 104 std::vector<CDomain*> domainListDestP = gridDestination_->getDomains(); … … 117 122 algoTransformation_.push_back(algo); 118 123 } 124 CATCH 119 125 120 126 /*! … … 123 129 */ 124 130 std::map<int,std::pair<int,int> > CGridTransformation::getElementPosition(CGrid* grid) 131 TRY 125 132 { 126 133 std::vector<CScalar*> scalarListP = grid->getScalars(); … … 155 162 return elementPosition; 156 163 } 164 CATCH 157 165 158 166 /*! … … 163 171 */ 164 172 void CGridTransformation::setUpGridDestination(int elementPositionInGrid, ETranformationType transType) 173 TRY 165 174 { 166 175 if (isSpecialTransformation(transType)) return; … … 240 249 tempGridDests_.push_back(tmpGridDestination_); 241 250 } 251 CATCH 242 252 243 253 /*! … … 249 259 */ 250 260 void CGridTransformation::setUpGridSource(int elementPositionInGrid) 261 TRY 251 262 { 252 263 if (!tempGridSrcs_.empty() && (getNbAlgo()-1) == tempGridSrcs_.size()) … … 326 337 tempGridSrcs_.push_back(gridSource_); 327 338 } 339 CATCH 328 340 329 341 /*! … … 336 348 */ 337 349 void CGridTransformation::computeAll(const std::vector<CArray<double,1>* >& dataAuxInputs, Time timeStamp) 350 TRY 338 351 { 339 352 if (nbNormalAlgos_ < 1) return; … … 346 359 std::list<RecvIndexGridDestinationMap>().swap(localIndexToReceiveOnGridDest_); 347 360 std::list<size_t>().swap(nbLocalIndexOnGridDest_); 348 std::list<std::vector<bool> >().swap(localMaskOnGridDest_);349 361 } 350 362 else … … 399 411 vector<int> localDst ; 400 412 vector<double> weight ; 401 localMaskOnGridDest_.push_back(vector<bool>());413 int nbLocalIndexOnGridDest; 402 414 CTimer::get("computeTransformationMappingNonDistributed").resume(); 403 415 algo->computeTransformationMappingNonDistributed(elementPosition, gridSource_, tmpGridDestination_, 404 localSrc, localDst, weight, localMaskOnGridDest_.back()) ;416 localSrc, localDst, weight, nbLocalIndexOnGridDest) ; 405 417 CTimer::get("computeTransformationMappingNonDistributed").suspend(); 406 418 407 419 CTimer::get("computeTransformationMappingConvert").resume(); 408 nbLocalIndexOnGridDest_.push_back( localMaskOnGridDest_.back().size()) ;420 nbLocalIndexOnGridDest_.push_back(nbLocalIndexOnGridDest) ; 409 421 int clientRank=client->clientRank ; 410 422 { … … 453 465 } 454 466 } 467 CATCH 455 468 456 469 /*! … … 459 472 */ 460 473 void CGridTransformation::computeTransformationMapping(const SourceDestinationIndexMap& globaIndexWeightFromSrcToDst) 474 TRY 461 475 { 462 476 CContext* context = CContext::getCurrent(); … … 472 486 size_t nbLocalIndex = globalLocalIndexGridDestSendToServer.size(); 473 487 nbLocalIndexOnGridDest_.push_back(nbLocalIndex); 474 localMaskOnGridDest_.push_back(std::vector<bool>());475 std::vector<bool>& tmpMask = localMaskOnGridDest_.back();476 tmpMask.resize(nbLocalIndex,false);488 // localMaskOnGridDest_.push_back(std::vector<bool>()); 489 // std::vector<bool>& tmpMask = localMaskOnGridDest_.back(); 490 // tmpMask.resize(nbLocalIndex,false); 477 491 478 492 // Find out number of index sent from grid source and number of index received on grid destination … … 653 667 recvTmp[recvRank][realRecvSize].first = globalLocalIndexGridDestSendToServer[recvIndexDst(idx)]; 654 668 recvTmp[recvRank][realRecvSize].second = recvWeightDst(idx); 655 tmpMask[globalLocalIndexGridDestSendToServer[recvIndexDst(idx)]] = true;656 669 ++realRecvSize; 657 670 } … … 678 691 679 692 } 693 CATCH 680 694 681 695 /*! … … 684 698 */ 685 699 const std::list<CGridTransformation::SendingIndexGridSourceMap>& CGridTransformation::getLocalIndexToSendFromGridSource() const 700 TRY 686 701 { 687 702 return localIndexToSendFromGridSource_; 688 703 } 704 CATCH 689 705 690 706 /*! … … 693 709 */ 694 710 const std::list<CGridTransformation::RecvIndexGridDestinationMap>& CGridTransformation::getLocalIndexToReceiveOnGridDest() const 711 TRY 695 712 { 696 713 return localIndexToReceiveOnGridDest_; 697 714 } 715 CATCH 698 716 699 717 /*! … … 702 720 */ 703 721 const std::list<size_t>& CGridTransformation::getNbLocalIndexToReceiveOnGridDest() const 722 TRY 704 723 { 705 724 return nbLocalIndexOnGridDest_; 706 725 } 707 708 /*! 709 Local mask of data which will be received on the grid destination 710 \return local mask of data 711 */ 712 const std::list<std::vector<bool> >& CGridTransformation::getLocalMaskIndexOnGridDest() const 713 { 714 return localMaskOnGridDest_; 715 } 716 717 } 726 CATCH 727 728 }
Note: See TracChangeset
for help on using the changeset viewer.