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

Implementing generic transformation algorithm (local commit)

+) Implement 3 important classes:

-gridTransformation to read transformation info from grid and interface with the rest of XIOS
-transformationMapping to be in charge of sending/receiving transformation info among clients
-transformationAlgorithm to represent various algorithms

+) Make some change on field to use the new classes

Test
+) Only test_new_features with inversed axis

File:
1 edited

Legend:

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

    r619 r620  
    8585      } 
    8686      else this->ni.setValue(size); 
    87  
     87      std::cout <<  "value " <<  value <<  std::endl; 
    8888      StdSize true_size = value.numElements(); 
    8989      if (this->ni.getValue() != true_size) 
     
    311311  } 
    312312 
    313   void CAxis::setTransformations(const std::vector<ETransformationType>& transformations) 
     313  void CAxis::setTransformations(const std::vector<CTransformation*>& transformations) 
    314314  { 
    315315    transformations_ = transformations; 
     316  } 
     317 
     318  std::vector<CTransformation*> CAxis::getAllTransformations(void) 
     319  { 
     320    if (!hasTransformation()) 
     321      setTransformations(this->getVirtualTransformationGroup()->getAllChildren()); 
     322 
     323    return transformations_; 
    316324  } 
    317325 
     
    333341    if (refer_ptr->hasTransformation()) 
    334342      for (int idx = 0; idx < refAxis.size(); ++idx) 
    335         refAxis[idx]->setTransformations(refer_ptr->getTransformations()); 
     343        refAxis[idx]->setTransformations(refer_ptr->getAllTransformations()); 
    336344  } 
    337345 
     
    347355        if (node.getElementName() == tranformation) { 
    348356           this->getVirtualTransformationGroup()->parseChild(node); 
    349            transformations_.push_back(eInverse); 
    350357        } 
    351358      } while (node.goToNextElement()) ; 
    352359      node.goToParentElement(); 
    353360    } 
    354   } 
    355  
    356   const std::vector<ETransformationType>& CAxis::getTransformations() 
    357   { 
    358     return transformations_; 
    359   } 
    360  
    361    DEFINE_REF_FUNC(Axis,axis) 
     361    setTransformations(this->getVirtualTransformationGroup()->getAllChildren()); 
     362  } 
     363 
     364  DEFINE_REF_FUNC(Axis,axis) 
    362365 
    363366   ///--------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.