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/grid.cpp

    r1294 r1311  
    362362 
    363363      std::vector<CArray<bool,1>* > domainMasks(domainP.size()); 
    364       for (int i = 0; i < domainMasks.size(); ++i) domainMasks[i] = &(domainP[i]->mask_1d); 
     364      for (int i = 0; i < domainMasks.size(); ++i) domainMasks[i] = &(domainP[i]->domainMask); 
    365365      std::vector<CArray<bool,1>* > axisMasks(axisP.size()); 
    366366      for (int i = 0; i < axisMasks.size(); ++i) axisMasks[i] = &(axisP[i]->mask); 
     
    404404 
    405405      std::vector<CArray<bool,1>* > domainMasks(domainP.size()); 
    406       for (int i = 0; i < domainMasks.size(); ++i) domainMasks[i] = &(domainP[i]->mask_1d); 
     406      for (int i = 0; i < domainMasks.size(); ++i) domainMasks[i] = &(domainP[i]->domainMask); 
    407407      std::vector<CArray<bool,1>* > axisMasks(axisP.size()); 
    408408      for (int i = 0; i < axisMasks.size(); ++i) axisMasks[i] = &(axisP[i]->mask); 
     
    17751775                                        const CArray<int,1>& axisDomainOrder) 
    17761776  { 
    1777     globalDim.resize(domains.size()*2+axis.size()+scalars.size()); 
     1777 //   globalDim.resize(domains.size()*2+axis.size()+scalars.size()); 
     1778    globalDim.resize(domains.size()*2+axis.size()); 
    17781779    int positionDimensionDistributed = 1; 
    17791780    int idx = 0, idxDomain = 0, idxAxis = 0, idxScalar = 0; 
     
    18051806      else 
    18061807      { 
    1807         globalDim[idx] = 1; 
     1808//        globalDim[idx] = 1; 
    18081809        ++idxScalar; 
    1809         ++idx; 
     1810//        ++idx; 
    18101811      } 
    18111812    } 
Note: See TracChangeset for help on using the changeset viewer.