Changeset 1688


Ignore:
Timestamp:
08/06/19 12:58:44 (5 years ago)
Author:
yushan
Message:

dev for trunk with graph. trunk at r1684

Location:
XIOS/dev/dev_trunk_graph
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_trunk_graph/inputs/vis2.html

    r1686 r1688  
    216216 
    217217                nodes.update(allNode); 
     218 
     219                node = nodes.get(nodeSelected); 
     220                connectedEdgeArray = edges.get(network.getConnectedEdges(node.id)); 
     221                for (j = 0; j < connectedEdgeArray.length; j++) { 
     222                    var edge = connectedEdgeArray[j]; 
     223                    if (edge.from == node.id) { 
     224                        edge.hidden = false; 
     225                    } 
     226 
     227                } 
     228                edges.update(connectedEdgeArray); 
    218229 
    219230                allNode = nodes.get(); 
     
    895906                                }, 
    896907 
    897                                 joinCondition: function(nodeOptions) { 
    898                                     return nodeOptions.cid === 2; 
    899  
    900                                 } 
    901  
    902908 
    903909                            }; 
  • XIOS/dev/dev_trunk_graph/src/filter/file_writer_filter.cpp

    r1686 r1688  
    3636      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 
    3737      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].clusterID =1; 
    38       (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = ++(data[0]->distance); 
     38      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 
    3939 
    4040      if(CXios::isClient && CWorkflowGraph::build_begin)  
  • XIOS/dev/dev_trunk_graph/src/filter/pass_through_filter.cpp

    r1686 r1688  
    2525 
    2626      CWorkflowGraph::addNode(this->filterID, "Pass Through Filter\\n("+data[0]->field->getId()+")", 2, 1, 1, data[0]); 
    27       (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = ++(data[0]->distance); 
     27      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 
    2828 
    2929      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 
     
    3939       
    4040      data[0]->src_filterID=this->filterID; 
     41      data[0]->distance++; 
    4142 
    4243    } 
  • XIOS/dev/dev_trunk_graph/src/filter/source_filter.cpp

    r1686 r1688  
    2828  { 
    2929    bool building_graph = this->tag ? packet->timestamp >= this->field->field_graph_start && packet->timestamp <= this->field->field_graph_end : false; 
    30     
    3130    if(building_graph) 
    3231    { 
  • XIOS/dev/dev_trunk_graph/src/filter/spatial_transform_filter.cpp

    r1686 r1688  
    215215    } 
    216216 
     217    if(BG) packet->src_filterID=this->filterID; 
     218    if(BG) packet->distance=data[0]->distance+1; 
     219    packet->field = field; 
     220 
    217221    return packet; 
    218222  } 
  • XIOS/dev/dev_trunk_graph/src/node/field.cpp

    r1686 r1688  
    11171117   TRY 
    11181118   {      
    1119     if (!isReferenceSolvedAndTransformed) solveAllEnabledFieldsAndTransform(); 
    1120     if (!isGridChecked) checkGridOfEnabledFields(); 
     1119     if (!isReferenceSolvedAndTransformed) solveAllEnabledFieldsAndTransform(); 
     1120     if (!isGridChecked) checkGridOfEnabledFields(); 
    11211121 
    11221122     const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true); 
     
    12341234             if (grid && grid != gridRef && grid->hasTransform()) 
    12351235             { 
    1236                  std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters = CSpatialTransformFilter::buildFilterGraph(gc, gridRef, grid, detectMissingValues, defaultValue);  
     1236               std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters = CSpatialTransformFilter::buildFilterGraph(gc, gridRef, grid, detectMissingValues, defaultValue); 
    12371237 
    12381238               filter->connectOutput(filters.first, 0); 
     
    15171517     CContext* context = CContext::getCurrent(); 
    15181518 
    1519      // Time filter_start; 
    1520      // if(!build_workflow_graph_start.isEmpty() && buildWorkflowGraph) filter_start = context->calendar->getInitDate()+build_workflow_graph_start; 
    1521      // else if(build_workflow_graph_start.isEmpty() && buildWorkflowGraph) filter_start = 0; 
    1522      // else filter_start = -1; 
    1523  
    1524      // Time filter_end; 
    1525      // if(!build_workflow_graph_end.isEmpty() && buildWorkflowGraph) filter_end = context->calendar->getInitDate()+build_workflow_graph_end; 
    1526      // else if(build_workflow_graph_end.isEmpty() && buildWorkflowGraph) filter_end = 9223372036854775807; 
    1527      // else filter_end = -1; 
    1528  
    1529      // filter_start = this->field_graph_start; 
    1530      // filter_end = this->field_graph_end; 
    1531  
    1532      // if(CXios::isClient) std::cout<<"getTemporalDataFilter field_id = "<<this->getId()<<" this->field_graph_start = "<<this->field_graph_start<<" this->field_graph_end = "<<this->field_graph_end<<std::endl; 
    15331519 
    15341520     if (it == temporalDataFilters.end()) 
     
    15941580       bool buildWorkflowGraph = (!build_workflow_graph.isEmpty() && build_workflow_graph == true); 
    15951581       std::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, 
    1596                                                                              CContext::getCurrent()->getCalendar()->getInitDate(), 
    1597                                                                              freq_op, freq_offset, outFreq, detectMissingValues)); 
     1582                                                                           CContext::getCurrent()->getCalendar()->getInitDate(), 
     1583                                                                           freq_op, freq_offset, outFreq, detectMissingValues)); 
    15981584 
    15991585       selfReferenceFilter->connectOutput(temporalFilter, 0); 
Note: See TracChangeset for help on using the changeset viewer.