Ignore:
Timestamp:
01/12/18 10:12:25 (4 years ago)
Author:
ymipsl
Message:

Fix problem for spatial transformation for distributed element when there is grid overlap.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/transformation/generic_algorithm_transformation.cpp

    r1400 r1402  
    696696  for (int idx = 0; idx < nIndexSize; ++idx) 
    697697  { 
    698     globalIndex = axisSrc->index(idx); 
    699     globalIndex2ProcRank[globalIndex].push_back(clientRank); 
     698    if (axisSrc->mask(idx)) 
     699    { 
     700      globalIndex = axisSrc->index(idx); 
     701      globalIndex2ProcRank[globalIndex].push_back(clientRank); 
     702    } 
    700703  } 
    701704 
     
    763766  CClientClientDHTInt::Index2VectorInfoTypeMap globalIndex2ProcRank; 
    764767  globalIndex2ProcRank.rehash(std::ceil(nIndexSize/globalIndex2ProcRank.max_load_factor())); 
     768   
    765769  if (destGlobalIndexPositionInGrid.isEmpty()) 
    766770  { 
     
    770774      j_ind=domainSrc->j_index(idx) ; 
    771775 
    772       globalIndex = i_ind + j_ind * niGlobSrc; 
    773       globalIndex2ProcRank[globalIndex].resize(1); 
    774       globalIndex2ProcRank[globalIndex][0] = clientRank; 
     776      if (domainSrc->localMask(idx)) 
     777      { 
     778        globalIndex = i_ind + j_ind * niGlobSrc; 
     779        globalIndex2ProcRank[globalIndex].resize(1); 
     780        globalIndex2ProcRank[globalIndex][0] = clientRank; 
     781      } 
    775782    } 
    776783  } 
     
    779786    for (int idx = 0; idx < nIndexSize; ++idx) 
    780787    { 
    781       globalIndex2ProcRank[destGlobalIndexPositionInGrid(idx)].push_back(clientRank); 
     788//      if (domainSrc->localMask(idx)) -> not necessairy, mask seem to be included in  destGlobalIndexPositionInGrid(idx)    (ym) 
     789        globalIndex2ProcRank[destGlobalIndexPositionInGrid(idx)].push_back(clientRank); 
    782790    } 
    783791  } 
Note: See TracChangeset for help on using the changeset viewer.