Changeset 1685
- Timestamp:
- 07/31/19 13:34:37 (6 years ago)
- Location:
- XIOS/dev/dev_trunk_omp
- Files:
-
- 1 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/context_atm.xml
r1680 r1685 289 289 290 290 <field_definition level="1" prec="8" operation="instant" freq_op="1ts" enabled=".true." default_value="1.e+20" detect_missing_value="true"> 291 <field id="field2D" grid_ref="grid2D" />292 <field id="field3D" grid_ref="grid3D" build_workflow_graph=" .TRUE."/>291 <field id="field2D" grid_ref="grid2D" build_workflow_graph="false" /> 292 <field id="field3D" grid_ref="grid3D" build_workflow_graph="true" /> 293 293 <field id="pressure" grid_ref="grid3D" /> 294 294 <field id="field3D_recv" read_access="true" grid_ref="grid3D" field_ref="field3D" /> 295 295 <field id="field3D_resend" grid_ref="grid3D" /> 296 296 297 <field id="field_X" grid_ref="grid_X" />298 <field id="field_Y" grid_ref="grid_Y" />299 <field id="field_Z" grid_ref="grid1D" />297 <field id="field_X" grid_ref="grid_X" build_workflow_graph="false" /> 298 <field id="field_Y" grid_ref="grid_Y" build_workflow_graph="false" /> 299 <field id="field_Z" grid_ref="grid1D" build_workflow_graph="false" /> 300 300 <field id="field_XY" grid_ref="grid_XY" /> 301 301 <field id="field_XYZ" grid_ref="grid_XYZ" /> -
XIOS/dev/dev_trunk_omp/GENERIC_TESTCASE/iodef.xml
r1679 r1685 6 6 7 7 <variable id="timestep"> 1h </variable> 8 <variable id="domain"> gaussian</variable>8 <variable id="domain"> lmdz </variable> 9 9 <variable id="domain_mask"> true </variable> 10 10 <variable id="axis_mask"> true </variable> … … 54 54 <variable id="info_level" type="int">100</variable> 55 55 <variable id="print_file" type="bool">true</variable> 56 <variable id="using_server2" type="bool"> true</variable>56 <variable id="using_server2" type="bool">false</variable> 57 57 <variable id="ratio_server2" type="int">50</variable> 58 58 <variable id="pure_one_sided" type="bool">false</variable> -
XIOS/dev/dev_trunk_omp/inputs/vis.html
r1683 r1685 42 42 /* /!\ Use border-top-color not border-color for firefox compatibility */ 43 43 44 /* Source Filter */ 45 #class_1 { 46 background-color: LightSlateGray; 47 border: 2px solid SlateGray; 48 border-top-color: SlateGray; 49 } 50 51 /* Arithmetic Filter */ 52 #class_2 { 53 background-color: Khaki; 54 border: 2px solid DarkKhaki; 55 border-top-color: DarkKhaki; 56 } 57 58 /* Axis Trans. Filter */ 59 #class_3 { 60 background-color: Orchid; 61 border: 2px solid DarkOrchid; 62 border-top-color: DarkOrchid; 63 } 64 65 /* Temporal Filter */ 66 #class_4 { 67 background-color: Orange; 68 border: 2px solid DarkOrange; 69 border-top-color: DarkOrange; 70 } 71 72 /* Pass Through Filter */ 73 #class_5 { 74 background-color: YellowGreen; 75 border: 2px solid OliveDrab; 76 border-top-color: OliveDrab; 77 } 78 79 /* File Writer Filter */ 80 #class_6 { 81 background-color: LightGray; 82 border: 2px solid Gray; 83 border-top-color: Gray; 84 } 44 45 85 46 </style> 86 47 … … 112 73 113 74 114 //===========================================================115 $('#clusteringcid2').on('click', function()116 {117 network.setData(data);118 var clusterOptionsByData =119 {120 joinCondition:function(childOptions)121 {122 return childOptions.cid === 2;123 },124 clusterNodeProperties: {id:'cidCluster', borderWidth:3, shape:'database'}125 };126 network.clustering.cluster(clusterOptionsByData);127 var allNode = nodes.get();128 nodes.update(allNode);129 });130 131 132 75 133 76 //=========================================================== … … 165 108 166 109 } 110 111 112 }); 113 114 115 //=========================================================== 116 $('#showGraph').on('click', function() 117 { 118 //===== hide all except selected 119 var allNode = nodes.get(); 120 121 for(i=0; i<allNode.length; i++) 122 { 123 var node = allNode[i]; 124 125 if(node.hidden != true) 126 { 127 node.hidden = true; 128 } 129 } 130 131 nodes.update(allNode); 132 133 var node = nodes.get(nodeSelected); 134 node.hidden = false; 135 nodes.update(node); 136 137 //===== enable all parents 138 console.log("showAllParents: allParentsNode = ", allParentsNode); 139 allNode = nodes.get(allParentsNode); 140 141 for (i = 0; i < allNode.length; i++) { 142 node = allNode[i]; 143 node.font = { 144 color:'black' 145 } 146 node.hidden = false; 147 if(node.filled == 1) 148 { 149 node.color = { 150 background: redNode.background, 151 border: redNode.border, 152 hover: redNode.background, 153 highlight: { 154 background: redNode.background, 155 border: 'blue' 156 } 157 } 158 } 159 else 160 { 161 node.color = { 162 background: styleArr[node.class].background, 163 border: styleArr[node.class].border, 164 highlight: { 165 background: styleArr[node.class].background, 166 border: 'blue' 167 } 168 } 169 } 170 } 171 172 nodes.update(allNode); 173 174 node = nodes.get(nodeSelected); 175 var connectedEdgeArray = edges.get(network.getConnectedEdges(node.id)); 176 for (j = 0; j < connectedEdgeArray.length; j++) 177 { 178 var edge = connectedEdgeArray[j]; 179 if(edge.to == node.id) 180 { 181 edge.hidden = false; 182 } 183 184 } 185 edges.update(connectedEdgeArray); 186 187 allNode = nodes.get(); 188 nodes.update(allNode); 189 190 //===== enable all children 191 allNode = nodes.get(allChildNode); 192 193 for (i = 0; i < allNode.length; i++) { 194 node = allNode[i]; 195 node.font = { 196 color:'black' 197 } 198 node.hidden = false; 199 if(node.filled == 1) 200 { 201 node.color = { 202 background: redNode.background, 203 border: redNode.border, 204 hover: redNode.background, 205 highlight: { 206 background: redNode.background, 207 border: 'blue' 208 } 209 } 210 } 211 else 212 { 213 node.color = { 214 background: styleArr[node.class].background, 215 border: styleArr[node.class].border, 216 highlight: { 217 background: styleArr[node.class].background, 218 border: 'blue' 219 } 220 } 221 } 222 } 223 224 nodes.update(allNode); 225 226 allNode = nodes.get(); 227 nodes.update(allNode); 167 228 168 229 … … 698 759 }, 699 760 7: { 700 background: 'Light Gray',761 background: 'LightBlue', 701 762 border: 'Gray', 702 763 shape: 'ellipse' … … 851 912 }, 852 913 physics: { 853 enabled: false, 854 stabilization: false 914 enabled: false 855 915 }, 856 916 nodes: { … … 867 927 levelSeparation: 300, 868 928 nodeSpacing: 80, 869 treeSpacing: 200, 929 treeSpacing: 100, 930 blockShifting: true, 931 edgeMinimization: true 870 932 } 871 933 }, … … 1010 1072 <button type="button" class="btn btn-default" id="disableAllChild">Disable all children</button> 1011 1073 <button type="button" class="btn btn-default" id="lastTemporal">Enable last temporal input</button> 1012 1013 1014 <button type="button" class="btn btn-default" id="clusteringcid2">Clustering cid=2</button> 1074 <button type="button" class="btn btn-default" id="showGraph">Show subgraph (and hide other)</button> 1075 1076 1015 1077 </div> 1016 1078 -
XIOS/dev/dev_trunk_omp/src/filter/binary_arithmetic_filter.hpp
r1681 r1685 40 40 std::tuple<int, int, int> virtual buildGraph(std::vector<CDataPacketPtr> data); 41 41 42 // CDataPacketPtr virtual buildGraph_post(CDataPacketPtr packet, std::vector<CDataPacketPtr> data); 42 43 43 }; // class CScalarFieldArithmeticFilter 44 44 -
XIOS/dev/dev_trunk_omp/src/filter/file_writer_filter.cpp
r1681 r1685 38 38 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 39 39 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].clusterID =1; 40 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = ++(data[0]->distance);40 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 41 41 42 42 if(CXios::isClient && CWorkflowGraph::build_begin) -
XIOS/dev/dev_trunk_omp/src/filter/output_pin.cpp
r1681 r1685 129 129 } 130 130 131 int COutputPin::getDistance() 132 { 133 int distance = 0; 134 // for(int i=0; i<parent_filters.size(); i++) 135 // { 136 // distance = max(distance, parent_filters[i]->getDistance()+1); 137 // } 138 return distance; 139 } 131 140 132 141 133 -
XIOS/dev/dev_trunk_omp/src/filter/output_pin.hpp
r1681 r1685 18 18 { 19 19 public: 20 // StdString output_field_id;21 20 int tag; 22 21 Time start_graph; … … 86 85 87 86 void virtual setParentFiltersTag(); 88 int virtual getDistance();89 87 90 88 -
XIOS/dev/dev_trunk_omp/src/filter/pass_through_filter.cpp
r1681 r1685 18 18 if(building_graph) 19 19 { 20 std::cout<<"pass through packet->distance = "<<data[0]->distance<<std::endl; 20 21 // std::cout<<"CPassThroughFilter::apply field_id = "<<this->field->getId()<<" start = "<<start_graph<<" end = "<<end_graph<<std::endl; 21 22 this->filterID = InvalidableObject::filterIdGenerator++; … … 25 26 26 27 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);28 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 28 29 29 30 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); … … 39 40 40 41 data[0]->src_filterID=this->filterID; 42 data[0]->distance++; 41 43 42 44 } 43 45 44 46 data[0]->field = this->field; 47 45 48 } 46 49 -
XIOS/dev/dev_trunk_omp/src/filter/spatial_transform_filter.cpp
r1681 r1685 75 75 76 76 CSpatialTransformFilterEngine* spaceFilter = static_cast<CSpatialTransformFilterEngine*>(engine); 77 CDataPacketPtr outputPacket = spaceFilter->applyFilter(data, outputDefaultValue, this->tag, this->start_graph, this->end_graph, this->field , this->getDistance());77 CDataPacketPtr outputPacket = spaceFilter->applyFilter(data, outputDefaultValue, this->tag, this->start_graph, this->end_graph, this->field); 78 78 if (outputPacket) 79 79 { … … 112 112 113 113 CSpatialTransformFilterEngine* spaceFilter = static_cast<CSpatialTransformFilterEngine*>(engine); 114 CDataPacketPtr outputPacket = spaceFilter->applyFilter(data, outputDefaultValue, this->tag, this->start_graph, this->end_graph, this->field , this->getDistance());114 CDataPacketPtr outputPacket = spaceFilter->applyFilter(data, outputDefaultValue, this->tag, this->start_graph, this->end_graph, this->field); 115 115 116 116 if (outputPacket) … … 179 179 } 180 180 181 bool CSpatialTransformFilterEngine::buildGraph(std::vector<CDataPacketPtr> data, int tag, Time start_graph, Time end_graph, CField *field , int distance)181 bool CSpatialTransformFilterEngine::buildGraph(std::vector<CDataPacketPtr> data, int tag, Time start_graph, Time end_graph, CField *field) 182 182 { 183 183 bool building_graph = tag ? data[0]->timestamp >= start_graph && data[0]->timestamp <= end_graph : false; … … 207 207 } 208 208 209 CDataPacketPtr CSpatialTransformFilterEngine::applyFilter(std::vector<CDataPacketPtr> data, double defaultValue, int tag, Time start_graph, Time end_graph, CField *field , int distance)209 CDataPacketPtr CSpatialTransformFilterEngine::applyFilter(std::vector<CDataPacketPtr> data, double defaultValue, int tag, Time start_graph, Time end_graph, CField *field) 210 210 { 211 211 212 bool BG = buildGraph(data, tag, start_graph, end_graph, field , distance);212 bool BG = buildGraph(data, tag, start_graph, end_graph, field); 213 213 214 214 CDataPacketPtr packet(new CDataPacket); -
XIOS/dev/dev_trunk_omp/src/filter/spatial_transform_filter.hpp
r1681 r1685 121 121 * \return the result of the grid transformation 122 122 */ 123 CDataPacketPtr applyFilter(std::vector<CDataPacketPtr> data, double defaultValue = 0, int tag=0, Time start_graph=0, Time end_graph=-1, CField *field=0 , int distance=1);124 bool buildGraph(std::vector<CDataPacketPtr> data, int tag=0, Time start_graph=0, Time end_graph=-1, CField *field=0 , int distance=1);123 CDataPacketPtr applyFilter(std::vector<CDataPacketPtr> data, double defaultValue = 0, int tag=0, Time start_graph=0, Time end_graph=-1, CField *field=0); 124 bool buildGraph(std::vector<CDataPacketPtr> data, int tag=0, Time start_graph=0, Time end_graph=-1, CField *field=0); 125 125 126 126 /*! -
XIOS/dev/dev_trunk_omp/src/filter/store_filter.cpp
r1681 r1685 100 100 CWorkflowGraph::allocNodeEdge(); 101 101 102 CWorkflowGraph::addNode(this->filterID, "Store Filter", 7, 1, 1, data[0]);102 CWorkflowGraph::addNode(this->filterID, "Store Filter", 7, 0, 1, data[0]); 103 103 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = ++(data[0]->distance); 104 104 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); -
XIOS/dev/dev_trunk_omp/src/filter/temporal_filter.cpp
r1681 r1685 139 139 packet->src_filterID=this->filterID; 140 140 packet->distance = data[0]->distance+1; 141 std::cout<<"temporal packet->distance = "<<packet->distance<<std::endl; 141 142 this->filterIDoutputs.clear(); 142 143 CWorkflowGraph::build_begin=true; -
XIOS/dev/dev_trunk_omp/src/node/field.cpp
r1681 r1685 1319 1319 storeFilter->end_graph = filter_end; 1320 1320 storeFilter->field = this; 1321 storeFilter->distance = instantDataFilter-> getDistance()+1;1321 storeFilter->distance = instantDataFilter->distance+1; 1322 1322 } 1323 1323 … … 1334 1334 fileWriterFilter->start_graph = filter_start; 1335 1335 fileWriterFilter->end_graph = filter_end; 1336 fileWriterFilter->distance = getTemporalDataFilter(gc, file->output_freq)-> getDistance()+1;1336 fileWriterFilter->distance = getTemporalDataFilter(gc, file->output_freq)->distance+1; 1337 1337 1338 1338 // std::cout<<"CFileWriterFilter filter start = "<<filter_start<<" end = "<<filter_end<<" field = "<<this->getId()<<std::endl; … … 1560 1560 1561 1561 const bool detectMissingValues = (!detect_missing_value.isEmpty() && detect_missing_value == true); 1562 std::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, CContext::getCurrent()->getCalendar()->getInitDate(),1563 freq_op, freq_offset, outFreq,1564 detectMissingValues));1562 std::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, 1563 CContext::getCurrent()->getCalendar()->getInitDate(), 1564 freq_op, freq_offset, outFreq, detectMissingValues)); 1565 1565 1566 1566 instantDataFilter->connectOutput(temporalFilter, 0); -
XIOS/dev/dev_trunk_omp/src/node/field_impl.hpp
r1681 r1685 23 23 if (check_if_active.isEmpty() || (!check_if_active.isEmpty() && (!check_if_active) || isActive(true))) 24 24 clientSourceFilter->streamData(CContext::getCurrent()->getCalendar()->getCurrentDate(), _data); 25 // clientSourceFilter->streamData(CContext::getCurrent()->getCalendar()->getCurrentDate(), _data, this->getId());26 25 } 27 26 else if (instantDataFilter)
Note: See TracChangeset
for help on using the changeset viewer.