Ignore:
Timestamp:
06/22/15 13:36:37 (9 years ago)
Author:
mhnguyen
Message:

Final tests of zoom and inverse on axis

+) Modify test_client and test_complete to work with new grid definition
+) Correct some bugs causing memory leak
+) Clean abundant code
+) Add more comments to new files

Test
+) On Curie
+) test_client and test_complete pass with correct results

File:
1 edited

Legend:

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

    r623 r624  
    9595      } 
    9696      else this->ni.setValue(size); 
    97       std::cout <<  "value " <<  value <<  std::endl; 
     97 
    9898//      StdSize true_size = value.numElements(); 
    9999//      if (this->ni.getValue() != true_size) 
     
    135135   } 
    136136 
    137    void CAxis::checkZoom(void) 
    138    { 
    139       StdSize zoom_begin,zoom_end, zoom_size, axisSize; 
    140  
    141       zoom_begin = this->zoom_begin.isEmpty() ? 0 : this->zoom_begin.getValue(); 
    142       zoom_size  = this->zoom_size.isEmpty() ? size.getValue() : this->zoom_size.getValue(); 
    143       zoom_end   = this->zoom_end.isEmpty() ? (size.getValue() - 1) : this->zoom_end.getValue(); 
    144  
    145       if (this->zoom_begin.isEmpty()) zoom_begin = zoom_end - zoom_size + 1; 
    146       if (this->zoom_end.isEmpty()) zoom_end = zoom_begin + zoom_size - 1; 
    147       if (this->zoom_size.isEmpty()) zoom_size = zoom_end - zoom_begin + 1; 
    148       axisSize = size.getValue(); 
    149  
    150       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)) 
    151         ERROR("CAxis::checkAttributes(void)", 
    152               << "One or more attributes among <zoom_begin>, <zoom_end>, <zoom_size> of axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] are not well specified"); 
    153  
    154       this->zoom_begin.setValue(zoom_begin); 
    155       this->zoom_end.setValue(zoom_end); 
    156       this->zoom_size.setValue(zoom_size); 
    157    } 
     137//   void CAxis::checkZoom(void) 
     138//   { 
     139//      StdSize zoom_begin,zoom_end, zoom_size, axisSize; 
     140// 
     141//      zoom_begin = (this->zoom_begin.isEmpty()) ?  0 : this->zoom_begin.getValue() ; 
     142//      zoom_size  = (this->zoom_size.isEmpty()) ?  size.getValue() : this->zoom_size.getValue() ; 
     143//      zoom_end   = (this->zoom_end.isEmpty()) ?  (size.getValue() - 1) : this->zoom_end.getValue() ; 
     144// 
     145//      if (this->zoom_begin.isEmpty()) zoom_begin=zoom_end-zoom_size+1 ; 
     146//      if (this->zoom_end.isEmpty()) zoom_end=zoom_begin+zoom_size-1 ; 
     147//      if (this->zoom_size.isEmpty()) zoom_size=zoom_end-zoom_begin+1 ; 
     148//      axisSize = size.getValue(); 
     149// 
     150//      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)) 
     151//        ERROR("CAxis::checkAttributes(void)", 
     152//              << "One or more attributes among <zoom_begin>, <zoom_end>, <zoom_size> of axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] are not well specified"); 
     153// 
     154//      this->zoom_begin.setValue(zoom_begin) ; 
     155//      this->zoom_end.setValue(zoom_end) ; 
     156//      this->zoom_size.setValue(zoom_size) ; 
     157//   } 
    158158 
    159159   void CAxis::checkMask() 
Note: See TracChangeset for help on using the changeset viewer.