Ignore:
Timestamp:
10/24/17 11:03:29 (4 years ago)
Author:
ymipsl
Message:

Fix conflict between for domain mask_1d and mask_2d when inheritance is done after transformation. Now class attribute "domainMask" is fill either by mask_1d or mask_2d and will be used instead of mask_1d in code.
This is a temporary fix which will solve later by reconstructing a cleanear grid graph.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/domain.cpp

    r1305 r1311  
    10401040      if (!mask_2d.isEmpty()) 
    10411041      { 
    1042         mask_1d.resize(mask_2d.extent(0) * mask_2d.extent(1)); 
     1042        domainMask.resize(mask_2d.extent(0) * mask_2d.extent(1)); 
    10431043        for (int j = 0; j < nj; ++j) 
    1044           for (int i = 0; i < ni; ++i) mask_1d(i+j*ni) = mask_2d(i,j); 
    1045         mask_2d.reset(); 
     1044          for (int i = 0; i < ni; ++i) domainMask(i+j*ni) = mask_2d(i,j); 
     1045//        mask_2d.reset(); 
    10461046      } 
    10471047      else if (mask_1d.isEmpty()) 
    10481048      { 
    1049         mask_1d.resize(i_index.numElements()); 
    1050         for (int i = 0; i < i_index.numElements(); ++i) mask_1d(i) = true; 
     1049        domainMask.resize(i_index.numElements()); 
     1050        for (int i = 0; i < i_index.numElements(); ++i) domainMask(i) = true; 
    10511051      } 
    10521052   } 
     
    11971197         { 
    11981198           ind=i+ni*j ; 
    1199            localMask(ind)=mask_1d(ind) ; 
     1199           localMask(ind)=domainMask(ind) ; 
    12001200         } 
    12011201     } 
     
    21862186        { 
    21872187          idx = static_cast<int>(it->second[n]); 
    2188           list_mask.back()(n) = mask_1d(globalLocalIndexMap_[idx]); 
     2188          list_mask.back()(n) = domainMask(globalLocalIndexMap_[idx]); 
    21892189        } 
    21902190 
     
    26602660    nbMaskInd = globalLocalIndexMap_.size(); 
    26612661    mask_1d.resize(nbMaskInd); 
     2662    domainMask.resize(nbMaskInd); 
    26622663    mask_1d = false; 
    26632664     
     
    26722673          mask_1d(lInd) = tmp(ind); 
    26732674      } 
    2674     }     
     2675    } 
     2676    domainMask=mask_1d ; 
    26752677  } 
    26762678 
     
    30123014         dataJIndex(lInd) = (-1 == dataJIndex(lInd)) ? tmpJ(ind) : dataJIndex(lInd);   
    30133015 
    3014          if (!mask_1d(lInd))   // Include mask info into data index on the RECEIVE getServerDimensionSizes     
     3016         if (!domainMask(lInd))   // Include mask info into data index on the RECEIVE getServerDimensionSizes     
    30153017         { 
    30163018           dataIIndex(lInd) = dataJIndex(lInd) = -1; 
Note: See TracChangeset for help on using the changeset viewer.