Ignore:
Timestamp:
08/06/18 17:41:50 (2 years ago)
Author:
oabramkina
Message:

Bugfix for masked distributed axis.

Previously mask wasn't working at all, an exception was thrown.

File:
1 edited

Legend:

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

    r1421 r1566  
    12831283    globalLocalIndexMap_.rehash(std::ceil(index.numElements()/globalLocalIndexMap_.max_load_factor())); 
    12841284    nbIndexGlob = 0; 
     1285    int nbIndLoc = 0; 
    12851286    for (idx = 0; idx < nbReceived; ++idx) 
    12861287    { 
     
    12891290      { 
    12901291         gloInd = tmp(ind); 
     1292         nbIndLoc = (gloInd % n_glo) - begin; 
    12911293         if (0 == globalLocalIndexMap_.count(gloInd)) 
    12921294         { 
    1293            index(nbIndexGlob) = gloInd % n_glo;            
    1294            globalLocalIndexMap_[gloInd] = nbIndexGlob 
     1295           index(nbIndLoc) = gloInd % n_glo;            
     1296           globalLocalIndexMap_[gloInd] = nbIndLoc 
    12951297           ++nbIndexGlob; 
    12961298         }  
Note: See TracChangeset for help on using the changeset viewer.