Changeset 2340


Ignore:
Timestamp:
06/28/22 17:08:49 (2 years ago)
Author:
jderouillat
Message:

Fix some transformations for nemo domain decomposition

Location:
XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_extract_domain.cpp

    r2270 r2340  
    130130      { 
    131131        axisDest_->index(countDest) = sourceGlobalIdx(countSrc)/domainSource->ni_glo; 
    132         int iIdxSrc2 = (countSrc+IdxMin)%domainSource->ni_glo; 
    133         int jIdxSrc2 = (countSrc+IdxMin)/domainSource->ni_glo; 
     132        int iIdxSrc2 = (countSrc%domainSource->ni)+(IdxMin)%domainSource->ni_glo; 
     133        int jIdxSrc2 = (countSrc/domainSource->ni)+(IdxMin)/domainSource->ni_glo; 
    134134        int convert_locally_global_idx = (jIdxSrc2-jIdxSrcMin)*domainSource->ni + (iIdxSrc2-iIdxSrcMin) ; 
    135135        bool concerned_by_WF(false); 
     
    159159      { 
    160160        axisDest_->index(countDest) = sourceGlobalIdx(countSrc)%domainSource->ni_glo; 
    161         int iIdxSrc2 = (countSrc+IdxMin)%domainSource->ni_glo; 
    162         int jIdxSrc2 = (countSrc+IdxMin)/domainSource->ni_glo; 
     161        int iIdxSrc2 = (countSrc%domainSource->ni)+(IdxMin)%domainSource->ni_glo; 
     162        int jIdxSrc2 = (countSrc/domainSource->ni)+(IdxMin)/domainSource->ni_glo; 
    163163        int convert_locally_global_idx = (jIdxSrc2-jIdxSrcMin)*domainSource->ni + (iIdxSrc2-iIdxSrcMin) ; 
    164164        bool concerned_by_WF(false); 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_extract.cpp

    r2322 r2340  
    200200      IdxMin = sourceGlobalIdx(countSrc); 
    201201  } 
    202    
    203202  int countDest(0); // increment of the position in destination domain  
    204203  for (int countSrc = 0; countSrc < indexSize ; ++countSrc) 
     
    217216      // countSrc+IdxMin is the global position (not index) considering the distributed memory 
    218217      //     - can be compared to the workflow view 
    219       int iIdxSrc2 = (countSrc+IdxMin)%domainSource->ni_glo; 
    220       int jIdxSrc2 = (countSrc+IdxMin)/domainSource->ni_glo; 
     218      int iIdxSrc2 = (countSrc%domainSource->ni)+(IdxMin)%domainSource->ni_glo; 
     219      int jIdxSrc2 = (countSrc/domainSource->ni)+(IdxMin)/domainSource->ni_glo; 
    221220      int convert_locally_global_idx = (jIdxSrc2-jIdxSrcMin)*domainSource->ni + (iIdxSrc2-iIdxSrcMin) ; 
    222221      bool concerned_by_WF(false); 
Note: See TracChangeset for help on using the changeset viewer.