Changeset 2023


Ignore:
Timestamp:
01/26/21 23:52:07 (8 months ago)
Author:
yushan
Message:

Graph intermediate commit to a tmp branch.

Location:
XIOS/dev/dev_trunk_graph/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_trunk_graph/src/filter/pass_through_filter.cpp

    r2021 r2023  
    3232        data[0]->graphPackage->fromFilter = -1; 
    3333      } 
     34 
     35      for(int i=0; i<this->graphPackage->filterId; i++) 
     36      { 
     37        if(  (*CWorkflowGraph::vectorOfNodes_)[i].label_field_id == this->label_field_id   
     38          && (*CWorkflowGraph::vectorOfNodes_)[i].timestamp == data[0]->timestamp 
     39          && CXios::isClient 
     40          && (*CWorkflowGraph::vectorOfNodes_)[i].filter_name == "Pass through filter" ) 
     41        { 
     42          data[0]->graphPackage->fromFilter = i; 
     43          return; 
     44        }   
     45      } 
    3446       
    3547      CWorkflowGraph::addNode("Pass through filter", 2, false, 1, data[0]); 
     48      if(CXios::isClient) (*CWorkflowGraph::vectorOfNodes_)[this->graphPackage->filterId].label_field_id = this->label_field_id; 
     49      CWorkflowGraph::addEdge(data[0]->graphPackage->fromFilter, this->graphPackage->filterId, data[0]); 
     50       
    3651      data[0]->graphPackage->currentField = this->graphPackage->inFields[0]; 
    3752      std::rotate(this->graphPackage->inFields.begin(), this->graphPackage->inFields.begin() + 1, this->graphPackage->inFields.end()); 
    3853       
    39       CWorkflowGraph::addEdge(data[0]->graphPackage->fromFilter, this->graphPackage->filterId, data[0]); 
     54       
    4055      data[0]->graphPackage->fromFilter = this->graphPackage->filterId; 
    4156         
  • XIOS/dev/dev_trunk_graph/src/filter/pass_through_filter.hpp

    r2019 r2023  
    2020      CPassThroughFilter(CGarbageCollector& gc); 
    2121 
     22      StdString label_field_id; 
     23 
    2224    protected: 
    2325      /*! 
  • XIOS/dev/dev_trunk_graph/src/filter/temporal_filter.cpp

    r2021 r2023  
    2727    , nbSamplingDates(0) 
    2828    , isFirstOperation(true) 
     29    , graphCycleCompleted(true) 
    2930  { 
    3031  } 
     
    3233  void CTemporalFilter::buildWorkflowGraph(std::vector<CDataPacketPtr> data) 
    3334  { 
    34     if(this->graphEnabled) 
     35    if(this->graphEnabled ) 
    3536    { 
    3637      if(!data[0]->graphPackage) 
     
    3940      } 
    4041       
    41       if(this->graphPackage->sourceFilterIds.size()==0) 
     42      //if(this->graphPackage->sourceFilterIds.size()==0) 
     43      if(graphCycleCompleted) 
    4244      {   
    4345        this->graphPackage->filterId = CWorkflowGraph::getNodeSize(); 
    4446        CWorkflowGraph::addNode("Temporal filter", 3, false, 0, data[0]); 
     47        graphCycleCompleted = false; 
    4548      } 
    4649       
     
    105108        isFirstOperation = false; 
    106109         
     110        graphCycleCompleted = true; 
    107111      } 
    108112    } 
  • XIOS/dev/dev_trunk_graph/src/filter/temporal_filter.hpp

    r2019 r2023  
    5454       */ 
    5555      bool virtual isDataExpected(const CDate& date) const; 
     56      bool graphCycleCompleted; 
    5657 
    5758    private: 
  • XIOS/dev/dev_trunk_graph/src/filter/transform_filter.cpp

    r2021 r2023  
    5151      packet->graphPackage->contextId = data[0]->graphPackage->contextId;           
    5252      packet->graphPackage->currentField = data[0]->graphPackage->currentField;//this->graphPackage->inFields[0]; 
    53       std::rotate(this->graphPackage->inFields.begin(), this->graphPackage->inFields.begin() + 1, this->graphPackage->inFields.end()); 
    5453     
    5554      CWorkflowGraph::addNode("Spatial transform filter "+algorithm->getAlgoName(), 4, false, 1, packet); 
    5655      CWorkflowGraph::addEdge(packet->graphPackage->fromFilter, this->graphPackage->filterId, packet); 
     56       
     57       
     58       
    5759      packet->graphPackage->fromFilter = this->graphPackage->filterId; 
    5860      packet->graphPackage->currentField = this->graphPackage->inFields[0]; 
     61      std::rotate(this->graphPackage->inFields.begin(), this->graphPackage->inFields.begin() + 1, this->graphPackage->inFields.end()); 
    5962    } 
    6063  } 
  • XIOS/dev/dev_trunk_graph/src/node/field.cpp

    r2021 r2023  
    569569      if(buildGraph_) 
    570570      { 
    571         (*fieldRef).build_workflow_graph.set(build_workflow_graph);   
     571        (*fieldRef).build_workflow_graph.set(build_workflow_graph);  
     572        inputFilter->label_field_id = fieldRef->getId();  
    572573      }     
    573574      else 
     
    653654         if (fileIn_->isClientSide()) fileIn_->readFieldAttributesMetaData(this); 
    654655         CGrid* newGrid ; 
    655          std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters = grid_->buildTransformationGraph(gc, true, nullptr, detectMissingValues, defaultValue, newGrid, buildGraph_) ; 
     656         std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters = grid_->buildTransformationGraph(gc, true, nullptr, detectMissingValues, defaultValue, newGrid, buildGraph_, this) ; 
    656657         grid_ = newGrid ; 
    657658         grid_ref=grid_->getId() ; // for server  
     
    672673        grid_->solveElementsRefInheritance() ; 
    673674        CGrid* newGrid ; 
    674         std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters = grid_->buildTransformationGraph(gc, true, nullptr, detectMissingValues, defaultValue, newGrid, buildGraph_) ; 
     675        std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters = grid_->buildTransformationGraph(gc, true, nullptr, detectMissingValues, defaultValue, newGrid, buildGraph_, this) ; 
    675676        newGrid->duplicateAttributes(grid_) ; // for grid attributes (mask) 
    676677        grid_ = newGrid ; 
  • XIOS/dev/dev_trunk_graph/src/node/grid.cpp

    r2021 r2023  
    17001700    std::shared_ptr<CFilter> inputFilter = std::shared_ptr<CPassThroughFilter>(new CPassThroughFilter(gc)); 
    17011701    std::shared_ptr<CFilter> outputFilter = inputFilter ; 
    1702  
    1703  
     1702    /*cout<<"***************CGrid::buildTransformationGraph***************"<<field->getId()<<" CGrid::buildTransformationGraph"<<endl; 
     1703    inputFilter->graphEnabled = true; 
     1704    inputFilter->graphPackage = new CGraphPackage; 
     1705    inputFilter->graphPackage->inFields.push_back(field); 
     1706*/ 
    17041707    string newId ; 
    17051708    if (gridSrc!=nullptr) newId = gridSrc->getId() + " --> " + this->getId()  ; 
  • XIOS/dev/dev_trunk_graph/src/transformation/domain_algorithm/domain_algorithm_reorder.hpp

    r2019 r2023  
    2626 
    2727      static bool registerTrans(); 
     28      virtual StdString getAlgoName() {return "\\nreorder_domain";} 
    2829 
    2930   
  • XIOS/dev/dev_trunk_graph/src/transformation/generic_algorithm_transformation.hpp

    r2021 r2023  
    4242    virtual bool isGenerateTransformation(void) { return false ;} 
    4343     
    44     virtual StdString getAlgoName() { return "Generic algorithm transformation";} 
     44    virtual StdString getAlgoName() { return "\\nGeneric algorithm transformation";} 
    4545 
    4646    virtual vector<string> getAuxFieldId(void) ; 
  • XIOS/dev/dev_trunk_graph/src/workflow_graph.hpp

    r2019 r2023  
    6666    StdString context_id; 
    6767    int context; 
     68    StdString label_field_id; 
    6869  }; 
    6970 
Note: See TracChangeset for help on using the changeset viewer.