Ignore:
Timestamp:
06/27/12 18:25:24 (12 years ago)
Author:
ymipsl
Message:

Add zoom functionnality on vertical axis

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/grid.cpp

    r347 r351  
    101101   //--------------------------------------------------------------- 
    102102 
     103/* 
    103104   std::vector<StdSize> CGrid::getLocalShape(void) const 
    104105   { 
     
    107108      retvalue.push_back(domain->zoom_nj_loc.getValue()); 
    108109      if (this->withAxis) 
    109          retvalue.push_back(this->axis->size.getValue()); 
     110         retvalue.push_back(this->axis->zoom_size.getValue()); 
    110111      return (retvalue); 
    111112   } 
     113*/ 
    112114   //--------------------------------------------------------------- 
    113115    
     116/* 
    114117   StdSize CGrid::getLocalSize(void) const 
    115118   { 
     
    120123      return (retvalue); 
    121124   } 
    122     
    123    //--------------------------------------------------------------- 
    124  
     125*/ 
     126   //--------------------------------------------------------------- 
     127/* 
    125128   std::vector<StdSize> CGrid::getGlobalShape(void) const 
    126129   { 
     
    132135      return (retvalue); 
    133136   } 
    134    //--------------------------------------------------------------- 
    135     
     137*/ 
     138   //--------------------------------------------------------------- 
     139 
     140/*    
    136141   StdSize CGrid::getGlobalSize(void) const 
    137142   { 
     
    142147      return (retvalue); 
    143148   } 
    144  
     149*/ 
    145150   StdSize CGrid::getDataSize(void) const 
    146151   { 
     
    224229      const int ni   = domain->ni.getValue() , 
    225230                nj   = domain->nj.getValue() , 
    226                 size = (this->hasAxis()) ? axis->size.getValue() : 1 ; 
     231                size = (this->hasAxis()) ? axis->size.getValue() : 1 , 
     232                lbegin = (this->hasAxis()) ? axis->zoom_begin.getValue()-1 : 0 , 
     233                lend = (this->hasAxis()) ? axis->zoom_end.getValue()-1 : 0 ; 
    227234 
    228235 
     
    254261                                : (temp_j - 1) ; 
    255262 
    256             if ((i >= 0 && i < ni) && 
     263            if ((l >=lbegin && l<= lend) && 
     264                (i >= 0 && i < ni) && 
    257265                (j >= 0 && j < nj) && (*mask)[i][j]) 
    258266               indexCount++ ; 
     
    283291                                : (temp_j - 1) ; 
    284292 
    285             if ((i >= 0 && i < ni) && 
     293            if ((l >= lbegin && l <= lend) && 
     294                (i >= 0 && i < ni) && 
    286295                (j >= 0 && j < nj) && (*mask)[i][j]) 
    287296            { 
     
    294303               (*out_i_client)[indexCount]=i+domain->ibegin_client-1 ; 
    295304               (*out_j_client)[indexCount]=j+domain->jbegin_client-1 ; 
    296                (*out_l_client)[indexCount]=l ; 
     305               (*out_l_client)[indexCount]=l-lbegin ; 
    297306               indexCount++ ; 
    298307            } 
Note: See TracChangeset for help on using the changeset viewer.