Ignore:
Timestamp:
12/06/20 22:14:56 (4 years ago)
Author:
ymipsl
Message:

intermediate commit for new tranformation engine?
YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/axis.cpp

    r1975 r1984  
    555555   * Go through the hierarchy to find the axis from which the transformations must be inherited 
    556556   */ 
    557   void CAxis::solveInheritanceTransformation() 
     557  void CAxis::solveInheritanceTransformation_old() 
    558558  TRY 
    559559  { 
     
    572572      for (size_t i = 0; i < refAxis.size(); ++i) 
    573573        refAxis[i]->setTransformations(axis->getAllTransformations()); 
     574  } 
     575  CATCH_DUMP_ATTR 
     576 
     577  void CAxis::solveInheritanceTransformation() 
     578  TRY 
     579  { 
     580    if (solveInheritanceTransformation_done_) return; 
     581    else solveInheritanceTransformation_done_=true ; 
     582 
     583    CAxis* axis = this; 
     584    std::list<CAxis*> refAxis; 
     585    bool out=false ; 
     586    vector<StdString> excludedAttr; 
     587    excludedAttr.push_back("axis_ref"); 
     588     
     589    refAxis.push_front(axis) ; 
     590    while (axis->hasDirectAxisReference() && !out) 
     591    { 
     592      CAxis* lastAxis=axis ; 
     593      axis = axis->getDirectAxisReference(); 
     594      axis->solveRefInheritance() ; 
     595      if (!axis->SuperClass::isEqual(lastAxis,excludedAttr)) out=true ; 
     596      refAxis.push_front(axis) ; 
     597    } 
     598 
     599    CTransformationPaths::TPath path ; 
     600    auto& pathList = std::get<2>(path) ; 
     601    std::get<0>(path) = EElement::AXIS ; 
     602    std::get<1>(path) = refAxis.front()->getId() ; 
     603    for (auto& axis : refAxis) 
     604    { 
     605      CAxis::TransMapTypes transformations = axis->getAllTransformations(); 
     606      for(auto& transformation : transformations) pathList.push_back({transformation.second->getTransformationType(),  
     607                                                                      transformation.second->getId()}) ; 
     608    } 
     609    transformationPaths_.addPath(path) ; 
     610 
    574611  } 
    575612  CATCH_DUMP_ATTR 
Note: See TracChangeset for help on using the changeset viewer.