Ignore:
Timestamp:
09/11/19 10:22:09 (5 years ago)
Author:
yushan
Message:

Introducing the new graph functionality. Attribute build_workflow_graph=.TRUE. is used in the field definition section in the xml file to enable the workflow graph of the field and other fields referecing to it. A more detailed document will be available soon on the graph fuctionality.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/filter/source_filter.cpp

    r1637 r1704  
    44#include "calendar_util.hpp" 
    55#include <limits>  
     6#include "workflow_graph.hpp" 
    67 
    78namespace xios 
     
    2324            "Impossible to construct a source filter without providing a grid."); 
    2425  } 
     26 
     27  void CSourceFilter::buildGraph(CDataPacketPtr packet) 
     28  { 
     29    bool building_graph = this->tag ? packet->timestamp >= this->field->field_graph_start && packet->timestamp <= this->field->field_graph_end : false; 
     30    if(building_graph) 
     31    { 
     32      this->filterID = InvalidableObject::filterIdGenerator++;   
     33      packet->src_filterID=this->filterID; 
     34      packet->field = this->field; 
     35      packet->distance = 1; 
     36       
     37     
     38      CWorkflowGraph::allocNodeEdge(); 
     39 
     40      CWorkflowGraph::addNode(this->filterID, "Source Filter ", 1, 1, 0, packet); 
     41      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 
     42      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].field_id = this->field->getId(); 
     43      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = 1; 
     44 
     45      CWorkflowGraph::build_begin = true; 
     46    } 
     47 
     48  } 
     49 
    2550 
    2651  template <int N> 
     
    5984      } 
    6085    } 
     86 
     87    if(CXios::isClient) buildGraph(packet); 
     88     
     89 
    6190 
    6291    onOutputReady(packet); 
Note: See TracChangeset for help on using the changeset viewer.