Ignore:
Timestamp:
07/07/15 10:46:33 (9 years ago)
Author:
mhnguyen
Message:

Implementing zooming on a domain

+) Add algorithm to do zooming on a domain
+) Remove some redundant codes

Test
+) On Curie
+) test_complete and test_client are correct

File:
1 edited

Legend:

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

    r630 r631  
    104104//               << "The array \'value\' of axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] has a different size that the one defined by the \'size\' attribute"); 
    105105 
    106       if (0 == global_zoom_size) global_zoom_size = size; 
     106 
    107107      this->checkData(); 
    108108      this->checkMask(); 
    109 //      this->checkZoom(); 
     109      this->checkZoom(); 
    110110 
    111111      if (!bounds.isEmpty()) 
     
    138138   } 
    139139 
    140 //   void CAxis::checkZoom(void) 
    141 //   { 
    142 //      StdSize zoom_begin,zoom_end, zoom_size, axisSize; 
    143 // 
    144 //      zoom_begin = (this->zoom_begin.isEmpty()) ?  0 : this->zoom_begin.getValue() ; 
    145 //      zoom_size  = (this->zoom_size.isEmpty()) ?  size.getValue() : this->zoom_size.getValue() ; 
    146 //      zoom_end   = (this->zoom_end.isEmpty()) ?  (size.getValue() - 1) : this->zoom_end.getValue() ; 
    147 // 
    148 //      if (this->zoom_begin.isEmpty()) zoom_begin=zoom_end-zoom_size+1 ; 
    149 //      if (this->zoom_end.isEmpty()) zoom_end=zoom_begin+zoom_size-1 ; 
    150 //      if (this->zoom_size.isEmpty()) zoom_size=zoom_end-zoom_begin+1 ; 
    151 //      axisSize = size.getValue(); 
    152 // 
    153 //      if ( (zoom_begin < 0) || (zoom_begin > axisSize-1) || (zoom_end<0) || (zoom_end>axisSize-1) || (zoom_size<1) || (zoom_size>axisSize) || (zoom_begin>zoom_end)) 
    154 //        ERROR("CAxis::checkAttributes(void)", 
    155 //              << "One or more attributes among <zoom_begin>, <zoom_end>, <zoom_size> of axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] are not well specified"); 
    156 // 
    157 //      this->zoom_begin.setValue(zoom_begin) ; 
    158 //      this->zoom_end.setValue(zoom_end) ; 
    159 //      this->zoom_size.setValue(zoom_size) ; 
    160 //   } 
     140   void CAxis::checkZoom(void) 
     141   { 
     142     if (0 == global_zoom_size) global_zoom_size = this->size.getValue(); 
     143   } 
    161144 
    162145   void CAxis::checkMask() 
Note: See TracChangeset for help on using the changeset viewer.