Ignore:
Timestamp:
06/04/21 11:55:52 (6 months ago)
Author:
yushan
Message:

Big commit on graph functionality. Enable the workflow graph when going through field dependency graph

File:
1 edited

Legend:

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

    r2128 r2144  
    16401640 
    16411641  std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> >  
    1642   CGrid::buildTransformationGraph(CGarbageCollector& gc, bool isSource, CGrid* gridSrc, double detectMissingValues, double defaultValue, CGrid*& newGrid) 
    1643   TRY 
    1644   { 
     1642  CGrid::buildTransformationGraph(CGarbageCollector& gc, bool isSource, CGrid* gridSrc, double detectMissingValues, double defaultValue, CGrid*& newGrid, bool graphEnabled, CField* field) 
     1643  TRY 
     1644  { 
     1645    static bool transformationGoing = false; 
    16451646    registerAlgorithmTransformation() ; // needed to enable self-registration of the transformations 
    16461647                                        // big mystery why it doesn't work witout that... 
     
    19361937        shared_ptr<CTransformFilter> transformFilter = shared_ptr<CTransformFilter>(gridAlgorithm->createTransformFilter(gc, detectMissingValues, defaultValue)) ; 
    19371938        outputFilter->connectOutput(transformFilter,0) ; 
     1939        if(graphEnabled) 
     1940        { 
     1941          transformFilter->graphEnabled=true; 
     1942          transformFilter->graphPackage = new CGraphPackage; 
     1943          transformFilter->graphPackage->inFields.push_back(field); 
     1944          transformFilter->graphPackage->show = !transformationGoing; 
     1945        } 
     1946         
    19381947        vector<string> auxFieldId = algo->getAuxFieldId() ; // better to do that at transformation not algo ?? 
    19391948        int i=1;  
     
    19501959      if (hasRemainTransform) 
    19511960      { 
     1961        transformationGoing = true; 
    19521962        gridSrc=newGrid ; 
    1953         pair<shared_ptr<CFilter>, shared_ptr<CFilter> > filters = this->buildTransformationGraph(gc, isSource, gridSrc, detectMissingValues, defaultValue, newGrid) ; 
     1963        CField *field_bis = field; 
     1964        pair<shared_ptr<CFilter>, shared_ptr<CFilter> > filters = this->buildTransformationGraph(gc, isSource, gridSrc, detectMissingValues, defaultValue, newGrid, graphEnabled, field_bis) ; 
    19541965        outputFilter->connectOutput(filters.first,0) ; 
    19551966        outputFilter=filters.second ; 
    19561967      } 
     1968      transformationGoing = false; 
    19571969    } 
    19581970      
Note: See TracChangeset for help on using the changeset viewer.