Ignore:
Timestamp:
11/05/18 13:57:52 (6 years ago)
Author:
oabramkina
Message:

Backporting r1578 and r1586 to dev, cleaning the code before merging it to XIOS 2.5.

File:
1 edited

Legend:

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

    r1584 r1589  
    846846                                                                                 vector<int>& localSrc, vector<int>& localDst, vector<double>& weight, 
    847847                                                                                 int nlocalIndexDest) 
    848  
    849 //void CGenericAlgorithmTransformation::computeTransformationMappingNonDistributed(int elementPositionInGrid, CGrid* gridSrc, CGrid* gridDst, 
    850 //                                                                                 vector<int>& localSrc, vector<int>& localDst, vector<double>& weight, 
    851 //                                                                                 vector<bool>& localMaskOnGridDest) 
    852848{ 
    853849 
     
    985981  } 
    986982 
    987 // just get the local src mask 
    988 //  CArray<bool,1> localMaskOnSrcGrid; 
    989 //  gridSrc->getLocalMask(localMaskOnSrcGrid) ; 
    990 // intermediate grid, mask is not initialized => set up mask to true 
    991 //  if (localMaskOnSrcGrid.isEmpty()) 
    992 //  { 
    993 //    localMaskOnSrcGrid.resize(nlocalIndexSrc) ; 
    994 //    localMaskOnSrcGrid=true ; 
    995 //  } 
    996    
    997  
    998 //  localMaskOnGridDest.resize(nlocalIndexDest,false) ; 
    999  
    1000983  vector<vector<vector<pair<int,double> > > > dstIndWeight(transformationMapping_.size()) ; 
    1001984    
     
    10381021                                                                   int& t, vector<vector<vector<pair<int,double> > > >& dstIndWeight, int currentInd, 
    10391022                                                                   vector<int>& localSrc, vector<int>& localDst, vector<double>& weight) 
    1040 //                                                                   CArray<bool,1>& localMaskOnGridSrc 
    1041 //                                                                   , vector<bool>& localMaskOnGridDest ) 
    10421023{ 
    10431024  int masked_ ; 
     
    10521033        masked_=masked ; 
    10531034        if (!mask(i)) masked_=false ; 
    1054 //        nonDistributedrecursiveFunct(currentPos-1, masked_, elementPositionInGrid, maskSrc, maskDst, srcInd, srcIndCompressed, nIndexSrc, t, dstIndWeight, currentInd, localSrc, localDst, weight, localMaskOnGridSrc, localMaskOnGridDest) ; 
    10551035        nonDistributedrecursiveFunct(currentPos-1, masked_, elementPositionInGrid, maskSrc, maskDst, srcInd, srcIndCompressed, nIndexSrc, t, 
    1056                                      dstIndWeight, currentInd, localSrc, localDst, weight);//, localMaskOnGridDest) ; 
     1036                                     dstIndWeight, currentInd, localSrc, localDst, weight); 
    10571037      } 
    10581038    } 
     
    10681048            for(vector<pair<int,double> >::iterator it = dstIndWeight[t][currentInd].begin(); it!=dstIndWeight[t][currentInd].end(); ++it) 
    10691049            { 
    1070 //              if (localMaskOnGridSrc(srcInd)) 
    1071               { 
    1072                 localSrc.push_back(srcIndCompressed) ; 
    1073                 localDst.push_back(it->first) ; 
    1074                 weight.push_back(it->second) ; 
    1075 //                localMaskOnGridDest[it->first]=true ; 
    1076               } 
     1050              localSrc.push_back(srcIndCompressed) ; 
     1051              localDst.push_back(it->first) ; 
     1052              weight.push_back(it->second) ; 
    10771053              (it->first)++ ; 
    10781054            } 
    10791055          } 
    10801056          if (t < dstIndWeight.size()-1) t++ ; 
    1081 //          if (localMaskOnGridSrc(srcInd)) 
    10821057            srcIndCompressed ++ ; 
    10831058        } 
     
    11001075        nonDistributedrecursiveFunct(currentPos-1, masked_, elementPositionInGrid, maskSrc, maskDst, srcInd, 
    11011076                                     srcIndCompressed, nIndexSrc, t, dstIndWeight , i,  localSrc, localDst, weight); 
    1102 //                                     localMaskOnGridSrc, 
    1103 //                                     localMaskOnGridDest) ; 
    11041077      } 
    11051078    } 
     
    11151088            for(vector<pair<int,double> >::iterator it = dstIndWeight[t][i].begin(); it!=dstIndWeight[t][i].end(); ++it) 
    11161089            { 
    1117 //              if (localMaskOnGridSrc(srcInd)) 
    1118               { 
    1119                 localSrc.push_back(srcIndCompressed) ; 
    1120                 localDst.push_back(it->first) ; 
    1121                 weight.push_back(it->second) ; 
    1122 //                localMaskOnGridDest[it->first]=true ; 
    1123               } 
     1090              localSrc.push_back(srcIndCompressed) ; 
     1091              localDst.push_back(it->first) ; 
     1092              weight.push_back(it->second) ; 
    11241093              (it->first)++ ; 
    11251094            } 
    11261095           } 
    11271096          if (t < dstIndWeight.size()-1) t++ ; 
    1128 //          if (localMaskOnGridSrc(srcInd)) 
    1129             srcIndCompressed ++ ; 
     1097          srcIndCompressed ++ ; 
    11301098        } 
    11311099        srcInd++ ; 
     
    11351103 
    11361104} 
    1137  
    1138  
    1139  
    1140  
    1141  
    1142  
    1143  
    1144  
    1145  
    1146  
    11471105 
    11481106/*! 
Note: See TracChangeset for help on using the changeset viewer.