Ignore:
Timestamp:
01/22/21 18:35:44 (3 years ago)
Author:
yushan
Message:

Graph intermediate commit to a tmp branch.

Location:
XIOS/dev/dev_trunk_graph/src/node
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_trunk_graph/src/node/field.cpp

    r2019 r2021  
    614614        // new 
    615615         
    616         std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters = grid->buildTransformationGraph(gc, false,  gridSrc, detectMissingValues, defaultValue, newGrid, buildGraph_) ; 
     616        std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters = grid->buildTransformationGraph(gc, false,  gridSrc, detectMissingValues, defaultValue, newGrid, buildGraph_, this) ; 
    617617        lastFilter->connectOutput(filters.first, 0); 
    618         if(buildGraph_) 
     618        /*if(buildGraph_) 
    619619        { 
    620620          std::cout<<"============== field "<<this->getId()<<" calls a transformation filter 1 ============== "<<lastFilter<<" _ "<<filters.first<<" ***** "<<CXios::isClient<<std::endl; 
     
    622622          filters.first->graphPackage = new CGraphPackage; 
    623623          filters.first->graphPackage->inFields.push_back(this); 
    624         } 
     624        }*/ 
    625625        lastFilter = filters.second; 
    626626        gridSrc = newGrid ; 
  • XIOS/dev/dev_trunk_graph/src/node/grid.cpp

    r2019 r2021  
    16911691 
    16921692  std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> >  
    1693   CGrid::buildTransformationGraph(CGarbageCollector& gc, bool isSource, CGrid* gridSrc, double detectMissingValues, double defaultValue, CGrid*& newGrid, bool graphEnabled) 
     1693  CGrid::buildTransformationGraph(CGarbageCollector& gc, bool isSource, CGrid* gridSrc, double detectMissingValues, double defaultValue, CGrid*& newGrid, bool graphEnabled, CField* field) 
    16941694  TRY 
    16951695  { 
     
    17141714    else   
    17151715    { 
    1716       cout<<"Create new grid : "<<newId<<endl ; 
     1716      StdString role = CXios::isClient? "Client ": "Server "; 
     1717      cout<<role<<"Create new grid : "<<newId<<endl ; 
    17171718      newGrid = CGrid::create(newId) ; 
    17181719      isNewGrid = true ; 
     
    19861987        shared_ptr<CTransformFilter> transformFilter = shared_ptr<CTransformFilter>(gridAlgorithm->createTransformFilter(gc, detectMissingValues, defaultValue)) ; 
    19871988        outputFilter->connectOutput(transformFilter,0) ; 
     1989        if(graphEnabled) 
     1990        { 
     1991          transformFilter->graphEnabled=true; 
     1992          transformFilter->graphPackage = new CGraphPackage; 
     1993          transformFilter->graphPackage->inFields.push_back(field); 
     1994        } 
     1995         
    19881996        vector<string> auxFieldId = algo->getAuxFieldId() ; // better to do that at transformation not algo ?? 
    19891997        int i=1;  
     
    19942002          auxField->getInstantDataFilter()->connectOutput(transformFilter,i) ; 
    19952003          i++ ; 
     2004           
    19962005        } 
    19972006        outputFilter = transformFilter ; 
  • XIOS/dev/dev_trunk_graph/src/node/grid.hpp

    r2019 r2021  
    215215      public: 
    216216         pair<shared_ptr<CFilter>, shared_ptr<CFilter> > buildTransformationGraph(CGarbageCollector& gc, bool isSource, CGrid* gridSrc, double detectMissingValues, 
    217                                                                                   double defaultValue, CGrid*& newGrid, bool graphEnabled=false) ; 
     217                                                                                  double defaultValue, CGrid*& newGrid, bool graphEnabled=false, CField* field=nullptr) ; 
    218218      private: 
    219219        CGridAlgorithm* gridAlgorithm_ = nullptr ; 
Note: See TracChangeset for help on using the changeset viewer.