- Timestamp:
- 07/11/16 17:36:01 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/transformation/axis_algorithm_transformation.cpp
r888 r895 19 19 20 20 CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(CAxis* axisDestination, CAxis* axisSource) 21 : CGenericAlgorithmTransformation(), axisDest_(axisDestination), axisSrc_(axisSource) 21 : CGenericAlgorithmTransformation(), axisDest_(axisDestination), axisSrc_(axisSource), domainSrc_(0) 22 { 23 axisDestGlobalSize_ = axisDestination->n_glo.getValue(); 24 int niDest = axisDestination->n.getValue(); 25 int ibeginDest = axisDestination->begin.getValue(); 26 27 for (int idx = 0; idx < niDest; ++idx) 28 if ((axisDestination->mask)(idx)) axisDestGlobalIndex_.push_back(ibeginDest+idx); 29 } 30 31 CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(CAxis* axisDestination, CDomain* domainSource) 32 : CGenericAlgorithmTransformation(), axisDest_(axisDestination), axisSrc_(0), domainSrc_(domainSource) 22 33 { 23 34 axisDestGlobalSize_ = axisDestination->n_glo.getValue(); … … 51 62 int clientSize = client->clientSize; 52 63 53 54 64 size_t globalIndex; 55 int nIndexSize = axisSrc_->index.numElements(); 65 int nIndexSize = 0; 66 if (2 == elementType) nIndexSize = domainSrc_->i_index.numElements(); 67 else if (1 == elementType) nIndexSize = axisSrc_->index.numElements(); 56 68 CClientClientDHTInt::Index2VectorInfoTypeMap globalIndex2ProcRank; 57 69 globalIndex2ProcRank.rehash(std::ceil(nIndexSize/globalIndex2ProcRank.max_load_factor())); 58 70 for (int idx = 0; idx < nIndexSize; ++idx) 59 71 { 60 globalIndex = axisSrc_->index(idx); 72 if (2 == elementType) 73 { 74 globalIndex = domainSrc_->i_index(idx) + domainSrc_->j_index(idx) * domainSrc_->ni_glo; 75 } 76 else if (1 == elementType) 77 { 78 globalIndex = axisSrc_->index(idx); 79 } 80 61 81 globalIndex2ProcRank[globalIndex].resize(1); 62 82 globalIndex2ProcRank[globalIndex][0] = clientRank;
Note: See TracChangeset
for help on using the changeset viewer.