- Timestamp:
- 09/11/19 10:22:09 (5 years ago)
- Location:
- XIOS/trunk
- Files:
-
- 6 added
- 79 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/GENERIC_TESTCASE/context_atm.xml
r1676 r1704 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" />291 <field id="field2D" grid_ref="grid2D" /> 292 <field id="field3D" grid_ref="grid3D" build_workflow_graph="true" /> 293 293 <field id="pressure" grid_ref="grid3D" /> 294 <field id="field3D_recv" read_access="true" grid_ref="grid3D" field_ref="field3D" />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 … … 363 363 <file_definition type="one_file" > 364 364 365 <file id="atm_output" output_freq=" 1ts" type="one_file" enabled="true">365 <file id="atm_output" output_freq="4ts" type="one_file" enabled="true"> 366 366 <!-- <field field_ref="field3D" /> 367 367 <field field_ref="field2D" /> … … 385 385 386 386 <file id="atm_output_other" output_freq="1ts" type="one_file" enabled="true"> 387 <field field_ref="other_field3D" enabled=" false"/>387 <field field_ref="other_field3D" enabled="true"/> 388 388 <field field_ref="other_field2D" enabled="true"/> 389 <field field_ref="other_field_X" enabled=" false"/>390 <field field_ref="other_field_Y" enabled=" false"/>391 <field field_ref="other_field_XY" enabled=" false"/>392 <field field_ref="other_field_Z" enabled=" false"/>393 <field field_ref="other_field_XYZ" enabled=" false"/>394 <field field_ref="other_field_XZ" enabled=" false"/>395 <field field_ref="other_field_YZ" enabled=" false"/>389 <field field_ref="other_field_X" enabled="true"/> 390 <field field_ref="other_field_Y" enabled="true"/> 391 <field field_ref="other_field_XY" enabled="true"/> 392 <field field_ref="other_field_Z" enabled="true"/> 393 <field field_ref="other_field_XYZ" enabled="true"/> 394 <field field_ref="other_field_XZ" enabled="true"/> 395 <field field_ref="other_field_YZ" enabled="true"/> 396 396 </file> 397 397 … … 407 407 <field field_ref="field_YZW" enabled="true"/> 408 408 </file> 409 409 410 410 411 <file id="atm_output_reorder" output_freq="1ts" enabled="false" > -
XIOS/trunk/GENERIC_TESTCASE/iodef.xml
r1676 r1704 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> -
XIOS/trunk/bld.cfg
r1510 r1704 46 46 #bld::target test_remap.exe 47 47 bld::target xios_server.exe 48 bld::target generic_testcase.exe 48 49 #bld::target test_regular.exe 49 50 #bld::target test_xios2_cmip6.exe 50 51 #bld::target test_new_features.exe test_unstruct_complete.exe 51 #bld::target test_remap.exe52 #bld::target test_complete.exe53 #bld::target test_client.exe52 bld::target test_remap.exe 53 bld::target test_complete.exe 54 bld::target test_client.exe 54 55 #bld::target test_unstruct_complete.exe 55 56 #bld::target test_unstructured.exe -
XIOS/trunk/inputs/iodef.xml
r1202 r1704 7 7 8 8 <field_definition level="1" enabled=".TRUE."> 9 <field id="field_A" operation="average" freq_op="3600s" grid_ref="grid_A"/> 9 <field id="field_A" operation="average" freq_op="3600s" grid_ref="grid_A" /> 10 <field id="field_B" operation="average" freq_op="3600s" grid_ref="grid_A"/> 11 <field id="field_C" operation="average" freq_op="3600s" grid_ref="grid_A" /> 10 12 <field id="field_Axis" operation="average" freq_op="3600s" axis_ref="axis_A"/> 11 13 <field id="field_Domain" operation="average" freq_op="3600s" domain_ref="domain_A"/> … … 15 17 16 18 17 <file_definition type="one_file" par_access="collective" output_freq="1h" output_level="10" enabled=".FALSE."> 18 <file id="output" name="output" enabled=".TRUE."> 19 <file_definition type="one_file" par_access="collective" output_freq="1h" output_level="10" > 20 21 <file id="output2" name="output2" output_freq="4h" enabled=".FALSE."> 22 <field id="field_G" field_ref="field_A" name="field_G_zoom" grid_ref="grid_A_zoom" build_workflow_graph=".TRUE." build_workflow_graph_start="1h" build_workflow_graph_end="8h" /> 23 <!-- <field field_ref="field_Scalar" name="field_A_scalar" build_workflow_graph=".TRUE."/> --> 24 </file> 25 26 27 <file id="output1" name="output1" output_freq="24h" enabled=".TRUE."> 19 28 <!-- <field field_ref="field_Domain" name="field_A" /> --> 20 <field field_ref="field_A" name="field_A" /> 21 <field field_ref="field_A_zoom" name="field_B" /> 29 <field id="field_F" field_ref="field_A" name="field_24h" grid_ref="grid_A" build_workflow_graph=".TRUE." build_workflow_graph_start="4h" build_workflow_graph_end="24h" /> 30 31 </file> 32 33 <file id="output" name="output" enabled=".TRUE."> 34 <!-- <field field_ref="field_Domain" name="field_A" /> --> 35 <!-- <field field_ref="field_A" name="field_A_name" build_workflow_graph=".FALSE." /> --> 36 <!-- <field field_ref="field_B" name="field_B_name" build_workflow_graph=".FALSE."/> --> 37 <!-- <field field_ref="field_C" name="field_C_name" enabled=".TRUE." /> --> 38 <!-- <field id="field_D" field_ref="field_A" operation="instant" build_workflow_graph=".TRUE." name="field_D_name" build_workflow_graph_start="1h" build_workflow_graph_end="2h" > sqrt(field_A) </field> --> 39 <field id="field_E" field_ref="field_A" operation="instant" build_workflow_graph=".TRUE." name="field_E_name" build_workflow_graph_start="1h" build_workflow_graph_end="4h" > field_A + field_B + field_C</field> 40 <!-- <field field_ref="field_A_zoom" name="field_B" build_workflow_graph=".TRUE."/> --> 22 41 </file> 23 <file id="output1" name="output1" enabled=".TRUE."> 24 <!-- <field field_ref="field_Domain" name="field_A" /> --> 25 <field field_ref="field_A" name="field_A" /> 26 </file> 27 <file id="output2" name="output2" enabled=".TRUE."> 28 <!-- <field field_ref="field_Domain" name="field_A" /> --> 29 <field field_ref="field_Scalar" name="field_A" /> 30 </file> 42 43 31 44 <!-- <file id="output_s" name="output_s" mode="read" > 32 45 <field id="field" name="field_A" grid_ref="grid_Scalar" operation="instant" /> … … 79 92 <variable_group id="parameters" > 80 93 <variable id="using_server" type="bool">false</variable> 81 <variable id="info_level" type="int"> 50</variable>94 <variable id="info_level" type="int">80</variable> 82 95 <variable id="print_file" type="bool">true</variable> 83 96 </variable_group> -
XIOS/trunk/src/attribute.hpp
r1622 r1704 42 42 virtual void fromString(const StdString & str) = 0; 43 43 virtual StdString dump(void) const = 0; 44 virtual StdString dump4graph(void) const = 0; 44 45 virtual bool isEqual(const CAttribute& ) = 0; 45 46 -
XIOS/trunk/src/attribute_array.hpp
r1622 r1704 56 56 virtual bool fromBuffer(CBufferIn& buffer) { return _fromBuffer(buffer); } 57 57 virtual string dump(void) const { return _dump();} 58 virtual string dump4graph(void) const { return _dump4graph();} 58 59 59 60 virtual void generateCInterface(ostream& oss,const string& className) ; … … 71 72 StdString _toString(void) const; 72 73 StdString _dump(void) const; 74 StdString _dump4graph(void) const; 73 75 void _fromString(const StdString & str); 74 76 bool _toBuffer (CBufferOut& buffer) const; -
XIOS/trunk/src/attribute_array_impl.hpp
r1622 r1704 138 138 } 139 139 140 template <typename T_numtype, int N_rank> 141 StdString CAttributeArray<T_numtype,N_rank>::_dump4graph(void) const 142 { 143 StdOStringStream oss; 144 if (! isEmpty() && this->hasId() && (this->numElements()!=0)) 145 oss << this->getName() << "=" << CArray<T_numtype, N_rank>::dump() << ""; 146 return (oss.str()); 147 } 148 140 149 141 150 template <typename T_numtype, int N_rank> -
XIOS/trunk/src/attribute_enum.hpp
r1622 r1704 63 63 virtual void fromString(const StdString & str) { if (str==resetInheritanceStr) { reset(); _canInherite=false ;} else _fromString(str);} 64 64 virtual StdString dump(void) const { return _toString();} 65 virtual StdString dump4graph(void) const { return _dump4graph();} 65 66 66 67 virtual bool toBuffer (CBufferOut& buffer) const { return _toBuffer(buffer);} … … 79 80 bool isEqual_(const CAttributeEnum& attr ); 80 81 StdString _toString(void) const; 82 StdString _dump4graph(void) const; 81 83 void _fromString(const StdString & str); 82 84 bool _toBuffer (CBufferOut& buffer) const; -
XIOS/trunk/src/attribute_enum_impl.hpp
r1219 r1704 149 149 } 150 150 151 template <class T> 152 StdString CAttributeEnum<T>::_dump4graph(void) const 153 { 154 StdOStringStream oss; 155 if (!CEnum<T>::isEmpty() && this->hasId()) 156 oss << this->getName() << "=" << CEnum<T>::toString() << "</br>"; 157 return (oss.str()); 158 } 159 151 160 template <class T> 152 161 void CAttributeEnum<T>::_fromString(const StdString & str) -
XIOS/trunk/src/attribute_map.cpp
r1622 r1704 48 48 { 49 49 str.append(att.second->dump()); 50 str.append(" "); 51 } 52 else if (str.length() == maxNbChar) 53 { 54 str.append("..."); 55 } 56 } 57 } 58 return str; 59 } 60 61 62 63 StdString CAttributeMap::record4graphXiosAttributes(void) const 64 { 65 int maxNbChar = 250; 66 StdString str; 67 typedef std::pair<StdString, CAttribute*> StdStrAttPair; 68 auto it = SuperClassMap::begin(), end = SuperClassMap::end(); 69 for (; it != end; it++) 70 { 71 const StdStrAttPair& att = *it; 72 if (!att.second->isEmpty()) 73 { 74 if (str.length() < maxNbChar) 75 { 76 str.append(att.second->dump4graph()); 50 77 str.append(" "); 51 78 } -
XIOS/trunk/src/attribute_map.hpp
r1622 r1704 39 39 void clearAllAttributes(void); 40 40 StdString dumpXiosAttributes(void) const; 41 StdString record4graphXiosAttributes(void) const; 41 42 42 43 void clearAttribute(const StdString& key); -
XIOS/trunk/src/attribute_template.hpp
r1622 r1704 75 75 // virtual void fromBinary(StdIStream & is); 76 76 virtual StdString dump(void) const { return _dump();} 77 virtual StdString dump4graph(void) const { return _dump4graph();} 77 78 78 79 virtual bool toBuffer (CBufferOut& buffer) const { return _toBuffer(buffer);} … … 100 101 StdString _toString(void) const; 101 102 StdString _dump(void) const; 103 StdString _dump4graph(void) const; 102 104 void _fromString(const StdString & str); 103 105 bool _toBuffer (CBufferOut& buffer) const; -
XIOS/trunk/src/attribute_template_impl.hpp
r1622 r1704 208 208 if (!CType<T>::isEmpty() && this->hasId()) 209 209 oss << this->getName() << "=\"" << CType<T>::dump() << "\""; 210 return (oss.str()); 211 } 212 213 template <class T> 214 StdString CAttributeTemplate<T>::_dump4graph(void) const 215 { 216 StdOStringStream oss; 217 if (!CType<T>::isEmpty() && this->hasId()) 218 oss << this->getName() << "=" << CType<T>::dump() << "</br>"; 210 219 return (oss.str()); 211 220 } -
XIOS/trunk/src/config/field_attribute.conf
r1524 r1704 40 40 DECLARE_ATTRIBUTE(StdString, cell_methods) 41 41 DECLARE_ENUM4(cell_methods_mode, overwrite, prefix, suffix, none) 42 43 44 DECLARE_ATTRIBUTE(bool, build_workflow_graph) 45 DECLARE_ATTRIBUTE(CDuration, build_workflow_graph_start) 46 DECLARE_ATTRIBUTE(CDuration, build_workflow_graph_end) -
XIOS/trunk/src/cxios.cpp
r1639 r1704 11 11 #include "memtrack.hpp" 12 12 #include "registry.hpp" 13 14 #include "graphviz.hpp" 13 15 14 16 namespace xios … … 135 137 globalRegistry->toFile("xios_registry.bin") ; 136 138 delete globalRegistry ; 139 CGraphviz::buildWorkflowGraphVisjs_with_info(); 137 140 } 138 141 -
XIOS/trunk/src/filter/binary_arithmetic_filter.cpp
r804 r1704 1 1 #include "binary_arithmetic_filter.hpp" 2 #include "workflow_graph.hpp" 3 #include "yacc_var.hpp" 4 #include "file.hpp" 5 2 6 3 7 namespace xios … … 7 11 , op(operatorExpr.getOpScalarField(op)) 8 12 , value(value) 9 { /* Nothing to do */ }; 13 { 14 expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 15 }; 16 17 std::tuple<int, int, int> CScalarFieldArithmeticFilter::buildGraph(std::vector<CDataPacketPtr> data) 18 { 19 bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; 20 // bool building_graph = true; 21 int unique_filter_id; 22 bool firstround; 23 24 if(building_graph) 25 { 26 CWorkflowGraph::allocNodeEdge(); 27 28 size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 29 30 // first round 31 if(CWorkflowGraph::mapHashFilterID_ptr->find(filterhash) == CWorkflowGraph::mapHashFilterID_ptr->end()) 32 { 33 firstround = true; 34 this->filterID = InvalidableObject::filterIdGenerator++; 35 int edgeID = InvalidableObject::edgeIdGenerator++; 36 37 CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 38 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_tag = this->tag; 39 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 40 41 42 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 43 if(this->field->file) (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 44 45 46 if(CWorkflowGraph::build_begin) 47 { 48 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); 49 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 50 51 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 52 } 53 else CWorkflowGraph::build_begin = true; 54 55 (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash] = this->filterID; 56 unique_filter_id = this->filterID; 57 } 58 // not first round 59 else 60 { 61 firstround=false; 62 unique_filter_id = (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash]; 63 if(data[0]->src_filterID != unique_filter_id) 64 { 65 int edgeID = InvalidableObject::edgeIdGenerator++; 66 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[0]); 67 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 68 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 69 } 70 } 71 } 72 73 return std::make_tuple(building_graph, firstround, unique_filter_id); 74 } 75 10 76 11 77 CDataPacketPtr CScalarFieldArithmeticFilter::apply(std::vector<CDataPacketPtr> data) … … 16 82 packet->status = data[0]->status; 17 83 84 std::tuple<int, int, int> graph = buildGraph(data); 85 86 if(std::get<0>(graph)) packet->src_filterID = std::get<2>(graph); 87 if(std::get<0>(graph) && std::get<1>(graph)) packet->distance = data[0]->distance+1; 88 if(std::get<0>(graph) && !std::get<1>(graph)) packet->distance = data[0]->distance; 89 90 packet->field = this->field; 91 18 92 if (packet->status == CDataPacket::NO_ERROR) 19 93 packet->data.reference(op(value, data[0]->data)); … … 26 100 , op(operatorExpr.getOpFieldScalar(op)) 27 101 , value(value) 28 { /* Nothing to do */ }; 102 { 103 expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 104 }; 105 106 std::tuple<int, int, int> CFieldScalarArithmeticFilter::buildGraph(std::vector<CDataPacketPtr> data) 107 { 108 bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; 109 // bool building_graph = true; 110 int unique_filter_id; 111 bool firstround; 112 113 if(building_graph) 114 { 115 CWorkflowGraph::allocNodeEdge(); 116 117 size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 118 119 // first round 120 if(CWorkflowGraph::mapHashFilterID_ptr->find(filterhash) == CWorkflowGraph::mapHashFilterID_ptr->end()) 121 { 122 firstround = true; 123 this->filterID = InvalidableObject::filterIdGenerator++; 124 int edgeID = InvalidableObject::edgeIdGenerator++; 125 126 CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 127 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_tag = this->tag; 128 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 129 130 131 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 132 if(this->field->file) (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 133 134 135 if(CWorkflowGraph::build_begin) 136 { 137 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); 138 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 139 140 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 141 } 142 else CWorkflowGraph::build_begin = true; 143 144 (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash] = this->filterID; 145 unique_filter_id = this->filterID; 146 } 147 // not first round 148 else 149 { 150 firstround=false; 151 unique_filter_id = (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash]; 152 if(data[0]->src_filterID != unique_filter_id) 153 { 154 int edgeID = InvalidableObject::edgeIdGenerator++; 155 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[0]); 156 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 157 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 158 } 159 } 160 } 161 162 return std::make_tuple(building_graph, firstround, unique_filter_id); 163 } 29 164 30 165 CDataPacketPtr CFieldScalarArithmeticFilter::apply(std::vector<CDataPacketPtr> data) … … 35 170 packet->status = data[0]->status; 36 171 172 std::tuple<int, int, int> graph = buildGraph(data); 173 174 if(std::get<0>(graph)) packet->src_filterID = std::get<2>(graph); 175 if(std::get<0>(graph) && std::get<1>(graph)) packet->distance = data[0]->distance+1; 176 if(std::get<0>(graph) && !std::get<1>(graph)) packet->distance = data[0]->distance; 177 178 packet->field = this->field; 179 37 180 if (packet->status == CDataPacket::NO_ERROR) 38 181 packet->data.reference(op(data[0]->data, value)); … … 44 187 : CFilter(gc, 2, this) 45 188 , op(operatorExpr.getOpFieldField(op)) 46 { /* Nothing to do */ }; 189 { 190 expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 191 }; 192 193 std::tuple<int, int, int> CFieldFieldArithmeticFilter::buildGraph(std::vector<CDataPacketPtr> data) 194 { 195 bool building_graph = this->tag ? ((data[0]->timestamp >= this->field->field_graph_start && data[0]->timestamp <= this->field->field_graph_end) && (data[0]->timestamp == data[1]->timestamp)) : false; 196 197 int unique_filter_id; 198 199 bool firstround; 200 201 if(building_graph) 202 { 203 CWorkflowGraph::allocNodeEdge(); 204 205 // std::cout<<"CFieldFieldArithmeticFilter::apply filter tag = "<<this->tag<<std::endl; 206 207 size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 208 209 // first round 210 if(CWorkflowGraph::mapHashFilterID_ptr->find(filterhash) == CWorkflowGraph::mapHashFilterID_ptr->end()) 211 { 212 firstround = true; 213 this->filterID = InvalidableObject::filterIdGenerator++; 214 int edgeID = InvalidableObject::edgeIdGenerator++; 215 216 CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 217 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 218 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 219 220 if(this->field->file) (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 221 222 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_tag = this->tag; 223 if(CWorkflowGraph::build_begin) 224 { 225 226 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); 227 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 228 229 edgeID = InvalidableObject::edgeIdGenerator++; 230 231 CWorkflowGraph::addEdge(edgeID, this->filterID, data[1]); 232 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 233 234 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 235 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[1]->src_filterID].filter_filled = 0 ; 236 } 237 CWorkflowGraph::build_begin = true; 238 239 (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash] = this->filterID; 240 unique_filter_id = this->filterID; 241 242 } 243 // not first round 244 else 245 { 246 firstround = false; 247 unique_filter_id = (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash]; 248 if(data[0]->src_filterID != unique_filter_id) 249 { 250 int edgeID = InvalidableObject::edgeIdGenerator++; 251 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[0]); 252 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 253 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 254 } 255 if(data[1]->src_filterID != unique_filter_id) 256 { 257 int edgeID = InvalidableObject::edgeIdGenerator++; 258 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[1]); 259 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[1]->src_filterID].filter_filled = 0 ; 260 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 261 } 262 263 } 264 } 265 266 return std::make_tuple(building_graph, firstround, unique_filter_id); 267 } 47 268 48 269 CDataPacketPtr CFieldFieldArithmeticFilter::apply(std::vector<CDataPacketPtr> data) … … 51 272 packet->date = data[0]->date; 52 273 packet->timestamp = data[0]->timestamp; 274 275 std::tuple<int, int, int> graph = buildGraph(data); 276 277 if(std::get<0>(graph)) packet->src_filterID = std::get<2>(graph); 278 if(std::get<0>(graph) && std::get<1>(graph)) packet->distance = data[0]->distance+1; 279 if(std::get<0>(graph) && !std::get<1>(graph)) packet->distance = data[0]->distance; 280 281 packet->field = this->field; 282 53 283 54 284 if (data[0]->status != CDataPacket::NO_ERROR) … … 64 294 return packet; 65 295 } 296 297 StdString CScalarFieldArithmeticFilter::GetName(void) { return StdString("CScalarFieldArithmeticFilter"); } 298 StdString CFieldScalarArithmeticFilter::GetName(void) { return StdString("CFieldScalarArithmeticFilter"); } 299 StdString CFieldFieldArithmeticFilter::GetName(void) { return StdString("CFieldFieldArithmeticFilter"); } 300 301 66 302 } // namespace xios -
XIOS/trunk/src/filter/binary_arithmetic_filter.hpp
r1542 r1704 6 6 #include "operator_expr.hpp" 7 7 #include <unordered_map> 8 #include <tuple> 8 9 9 10 namespace xios … … 23 24 */ 24 25 CScalarFieldArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value); 26 StdString virtual GetName(void); 27 25 28 26 29 protected: … … 35 38 */ 36 39 CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); 40 std::tuple<int, int, int> virtual buildGraph(std::vector<CDataPacketPtr> data); 41 42 37 43 }; // class CScalarFieldArithmeticFilter 38 44 … … 51 57 */ 52 58 CFieldScalarArithmeticFilter(CGarbageCollector& gc, const std::string& op, double value); 59 StdString virtual GetName(void); 60 53 61 54 62 protected: … … 63 71 */ 64 72 CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); 73 std::tuple<int, int, int> virtual buildGraph(std::vector<CDataPacketPtr> data); 65 74 }; // class CFieldScalarArithmeticFilter 66 75 … … 78 87 */ 79 88 CFieldFieldArithmeticFilter(CGarbageCollector& gc, const std::string& op); 89 StdString virtual GetName(void); 90 80 91 81 92 protected: … … 89 100 */ 90 101 CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); 102 std::tuple<int, int, int> virtual buildGraph(std::vector<CDataPacketPtr> data); 91 103 }; // class CFieldFieldArithmeticFilter 92 104 } // namespace xios -
XIOS/trunk/src/filter/data_packet.hpp
r1542 r1704 9 9 namespace xios 10 10 { 11 class CField; 11 12 /*! 12 13 * A packet corresponds to a timestamped array of data. … … 26 27 Time timestamp; //!< Timestamp of the data 27 28 StatusCode status; //!< Status of the packet 28 29 int src_filterID; 30 std::vector<int> filterIDoutputs; 31 CField *field; 32 int distance; 33 29 34 /*! 30 35 * Creates a deep copy of the packet. -
XIOS/trunk/src/filter/file_writer_filter.cpp
r1637 r1704 3 3 #include "field.hpp" 4 4 #include "utils.hpp" 5 #include "workflow_graph.hpp" 6 #include "graphviz.hpp" 5 7 6 8 namespace xios … … 15 17 } 16 18 19 void CFileWriterFilter::buildGraph(std::vector<CDataPacketPtr> data) 20 { 21 bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph: false; 22 23 if(building_graph) 24 { 25 this->filterID = InvalidableObject::filterIdGenerator++; 26 int edgeID = InvalidableObject::edgeIdGenerator++; 27 28 CWorkflowGraph::allocNodeEdge(); 29 StdString namestring = to_string(this->field->name); 30 namestring.erase(0, 6); 31 namestring.erase(namestring.length()-1, 1); 32 33 CWorkflowGraph::addNode(this->filterID, namestring + "\\n("+this->field->file->getId()+".nc)", 6, 0, 1, data[0]); 34 35 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 36 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 37 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].clusterID =1; 38 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 39 40 if(CXios::isClient && CWorkflowGraph::build_begin) 41 { 42 43 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); 44 45 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 46 } 47 else CWorkflowGraph::build_begin=true; 48 } 49 } 50 17 51 void CFileWriterFilter::onInputReady(std::vector<CDataPacketPtr> data) 18 52 { 53 buildGraph(data); 54 19 55 const bool detectMissingValue = ( !field->default_value.isEmpty() && 20 56 ( (!field->detect_missing_value.isEmpty() || field->detect_missing_value == true) -
XIOS/trunk/src/filter/file_writer_filter.hpp
r1358 r1704 3 3 4 4 #include "input_pin.hpp" 5 #include "file.hpp" 6 #include "duration.hpp" 5 7 6 8 namespace xios … … 14 16 { 15 17 public: 18 int tag; 19 Time start_graph; 20 Time end_graph; 21 CField* field; //<! The associated field 22 int filterID; 23 int distance; 24 16 25 /*! 17 26 * Constructs the filter (with one input slot) associated to the specified field … … 22 31 */ 23 32 CFileWriterFilter(CGarbageCollector& gc, CField* field); 33 34 inline StdString GetName(void) {return "File writer filter";}; 35 24 36 25 37 /*! … … 44 56 */ 45 57 void virtual onInputReady(std::vector<CDataPacketPtr> data); 58 void virtual buildGraph(std::vector<CDataPacketPtr> data); 46 59 47 60 private: 48 CField* field; //<! The associated field49 61 std::map<Time, CDataPacketPtr> packets; //<! The stored packets 50 62 }; // class CFileWriterFilter -
XIOS/trunk/src/filter/filter.cpp
r1358 r1704 5 5 CFilter::CFilter(CGarbageCollector& gc, size_t inputSlotsCount, IFilterEngine* engine) 6 6 : CInputPin(gc, inputSlotsCount) 7 , COutputPin(gc )7 , COutputPin(gc, false) 8 8 , engine(engine) 9 9 , inputSlotCount(inputSlotCount) 10 10 { /* Nothing to do */ } 11 12 StdString CFilter::GetName(void) { return StdString("Filter"); } 11 13 12 14 void CFilter::onInputReady(std::vector<CDataPacketPtr> data) -
XIOS/trunk/src/filter/filter.hpp
r1358 r1704 25 25 */ 26 26 CFilter(CGarbageCollector& gc, size_t inputSlotsCount, IFilterEngine* engine); 27 28 StdString virtual GetName(void); 27 29 28 30 /*! … … 62 64 bool virtual isDataExpected(const CDate& date) const; 63 65 66 67 68 69 int filterID; 70 StdString expression; 71 64 72 protected: 65 73 IFilterEngine* engine; //!< The filter engine, might be the filter itself -
XIOS/trunk/src/filter/garbage_collector.cpp
r1021 r1704 3 3 namespace xios 4 4 { 5 int InvalidableObject::filterIdGenerator = 0; 6 7 int InvalidableObject::edgeIdGenerator = 0; 8 9 int InvalidableObject::clusterIdGenerator = 0; 10 5 11 void CGarbageCollector::registerObject(InvalidableObject* Object, Time timestamp) 6 12 { -
XIOS/trunk/src/filter/garbage_collector.hpp
r1021 r1704 20 20 */ 21 21 void virtual invalidate(Time timestamp) = 0; 22 23 24 25 static int filterIdGenerator; 26 27 static int edgeIdGenerator; 28 29 static int clusterIdGenerator; 30 31 32 22 33 }; // struct InvalidableObject 23 34 -
XIOS/trunk/src/filter/input_pin.cpp
r1021 r1704 3 3 #include "garbage_collector.hpp" 4 4 #include "exception.hpp" 5 #include "workflow_graph.hpp" 5 6 6 7 namespace xios … … 11 12 , triggers(slotsCount) 12 13 , hasTriggers(false) 13 { /* Nothing to do */ } 14 { } 15 16 StdString CInputPin::GetName(void) 17 { 18 return StdString("Input pin"); 19 } 14 20 15 21 void CInputPin::setInput(size_t inputSlot, CDataPacketPtr packet) -
XIOS/trunk/src/filter/input_pin.hpp
r1358 r1704 26 26 */ 27 27 CInputPin(CGarbageCollector& gc, size_t slotsCount); 28 29 StdString virtual GetName(void); 28 30 29 31 /*! -
XIOS/trunk/src/filter/output_pin.cpp
r1542 r1704 1 1 #include "output_pin.hpp" 2 2 #include "exception.hpp" 3 #include "workflow_graph.hpp" 3 4 4 5 namespace xios … … 7 8 : gc(gc) 8 9 , manualTrigger(manualTrigger) 9 { /* Nothing to do */ } 10 { } 11 12 StdString COutputPin::GetName(void) 13 { 14 return StdString("Output pin"); 15 } 10 16 11 17 void COutputPin::connectOutput(std::shared_ptr<CInputPin> inputPin, size_t inputSlot) … … 101 107 outputPackets.erase(outputPackets.begin(), outputPackets.lower_bound(timestamp)); 102 108 } 109 110 void COutputPin::setParentFiltersTag() 111 { 112 for(int i=0; i<parent_filters.size(); i++) 113 { 114 115 if(parent_filters[i]->start_graph<0) parent_filters[i]->start_graph = start_graph; 116 else parent_filters[i]->start_graph = min(parent_filters[i]->start_graph, start_graph); 117 118 119 if(parent_filters[i]->end_graph<0) parent_filters[i]->end_graph = end_graph; 120 else parent_filters[i]->end_graph = max(parent_filters[i]->end_graph, end_graph); 121 122 123 parent_filters[i]->tag += tag; 124 parent_filters[i]->setParentFiltersTag(); 125 } 126 } 127 128 129 130 103 131 } // namespace xios -
XIOS/trunk/src/filter/output_pin.hpp
r1542 r1704 4 4 #include "garbage_collector.hpp" 5 5 #include "input_pin.hpp" 6 #include "duration.hpp" 6 7 7 8 namespace xios 8 9 { 10 class CField; 11 class CInputPin; 12 class CFilter; 13 class CDuration; 9 14 /*! 10 15 * An output pin handles the connections with downstream filters. … … 13 18 { 14 19 public: 20 int tag; 21 Time start_graph; 22 Time end_graph; 23 CField *field; 24 int distance; 25 26 27 28 std::vector< std::shared_ptr<COutputPin> > parent_filters; 29 15 30 /*! 16 31 * Constructs an ouput pin with manual or automatic trigger … … 22 37 COutputPin(CGarbageCollector& gc, bool manualTrigger = false); 23 38 39 StdString virtual GetName(void); 40 24 41 /*! 25 42 * Connects to a specific slot of the input pin of a downstream filter. … … 66 83 void virtual invalidate(Time timestamp); 67 84 85 void virtual setParentFiltersTag(); 86 87 68 88 protected: 69 89 /*! -
XIOS/trunk/src/filter/pass_through_filter.cpp
r641 r1704 1 1 #include "pass_through_filter.hpp" 2 #include "workflow_graph.hpp" 3 #include "field.hpp" 4 #include "file.hpp" 2 5 3 6 namespace xios … … 5 8 CPassThroughFilter::CPassThroughFilter(CGarbageCollector& gc) 6 9 : CFilter(gc, 1, this) 7 { /* Nothing to do */ } 10 { 11 } 12 13 void CPassThroughFilter::buildGraph(std::vector<CDataPacketPtr> data) 14 { 15 bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; 16 // bool building_graph = this->tag ? data[0]->timestamp >= this->field->field_graph_start && data[0]->timestamp <= this->field->field_graph_end : false; 17 18 if(building_graph) 19 { 20 // std::cout<<"CPassThroughFilter::apply field_id = "<<this->field->getId()<<" start = "<<start_graph<<" end = "<<end_graph<<std::endl; 21 this->filterID = InvalidableObject::filterIdGenerator++; 22 int edgeID = InvalidableObject::edgeIdGenerator++; 23 24 CWorkflowGraph::allocNodeEdge(); 25 26 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+1; 28 29 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 30 if(this->field->file) (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 31 32 33 if(CWorkflowGraph::build_begin) 34 { 35 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); 36 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0; 37 } 38 else CWorkflowGraph::build_begin = true; 39 40 data[0]->src_filterID=this->filterID; 41 data[0]->distance++; 42 43 } 44 45 data[0]->field = this->field; 46 } 8 47 9 48 CDataPacketPtr CPassThroughFilter::apply(std::vector<CDataPacketPtr> data) 10 49 { 50 if(CXios::isClient) buildGraph(data); 11 51 return data[0]; 12 52 } -
XIOS/trunk/src/filter/pass_through_filter.hpp
r641 r1704 20 20 CPassThroughFilter(CGarbageCollector& gc); 21 21 22 inline StdString GetName(void) {return StdString("Pass through filter");}; 23 22 24 protected: 23 25 /*! … … 28 30 */ 29 31 CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); 32 void virtual buildGraph(std::vector<CDataPacketPtr> data); 30 33 }; // class CPassThroughFilter 31 34 } // namespace xios -
XIOS/trunk/src/filter/source_filter.cpp
r1637 r1704 4 4 #include "calendar_util.hpp" 5 5 #include <limits> 6 #include "workflow_graph.hpp" 6 7 7 8 namespace xios … … 23 24 "Impossible to construct a source filter without providing a grid."); 24 25 } 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 25 50 26 51 template <int N> … … 59 84 } 60 85 } 86 87 if(CXios::isClient) buildGraph(packet); 88 89 61 90 62 91 onOutputReady(packet); -
XIOS/trunk/src/filter/source_filter.hpp
r1637 r1704 35 35 double defaultValue = 0.0); 36 36 37 inline StdString GetName(void) {return StdString("Source filter");}; 38 37 39 /*! 38 40 * Transforms the data received from the model into a packet and send it … … 45 47 template <int N> 46 48 void streamData(CDate date, const CArray<double, N>& data); 49 50 void virtual buildGraph(CDataPacketPtr packet); 47 51 48 52 /*! … … 62 66 */ 63 67 void signalEndOfStream(CDate date); 68 int filterID; 64 69 65 70 private: -
XIOS/trunk/src/filter/spatial_transform_filter.cpp
r1645 r1704 4 4 #include "context_client.hpp" 5 5 #include "timer.hpp" 6 #include "workflow_graph.hpp" 7 #include "file.hpp" 6 8 7 9 namespace xios … … 64 66 { 65 67 CSpatialTransformFilterEngine* spaceFilter = static_cast<CSpatialTransformFilterEngine*>(engine); 66 CDataPacketPtr outputPacket = spaceFilter->applyFilter(data, outputDefaultValue );68 CDataPacketPtr outputPacket = spaceFilter->applyFilter(data, outputDefaultValue, this->tag, this->start_graph, this->end_graph, this->field); 67 69 if (outputPacket) 68 70 onOutputReady(outputPacket); … … 96 98 { 97 99 CSpatialTransformFilterEngine* spaceFilter = static_cast<CSpatialTransformFilterEngine*>(engine); 98 CDataPacketPtr outputPacket = spaceFilter->applyFilter(data, outputDefaultValue );100 CDataPacketPtr outputPacket = spaceFilter->applyFilter(data, outputDefaultValue, this->tag, this->start_graph, this->end_graph, this->field); 99 101 100 102 if (outputPacket) … … 121 123 packet->data.resize(tmpData.numElements()); 122 124 packet->data = tmpData; 125 packet->field = this->field; 123 126 onOutputReady(packet); 124 127 tmpData.resize(0) ; … … 159 162 } 160 163 161 CDataPacketPtr CSpatialTransformFilterEngine::applyFilter(std::vector<CDataPacketPtr> data, double defaultValue) 162 { 164 bool CSpatialTransformFilterEngine::buildGraph(std::vector<CDataPacketPtr> data, int tag, Time start_graph, Time end_graph, CField *field) 165 { 166 bool building_graph = tag ? data[0]->timestamp >= start_graph && data[0]->timestamp <= end_graph : false; 167 if(building_graph) 168 { 169 this->filterID = InvalidableObject::filterIdGenerator++; 170 int edgeID = InvalidableObject::edgeIdGenerator++; 171 172 CWorkflowGraph::allocNodeEdge(); 173 174 CWorkflowGraph::addNode(this->filterID, "Spatial Transform Filter", 4, 1, 1, data[0]); 175 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 176 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = field->record4graphXiosAttributes(); 177 if(field->file) (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +field->file->record4graphXiosAttributes(); 178 179 180 if(CWorkflowGraph::build_begin) 181 { 182 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); 183 184 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0; 185 } 186 else CWorkflowGraph::build_begin = true; 187 } 188 189 return building_graph; 190 } 191 192 CDataPacketPtr CSpatialTransformFilterEngine::applyFilter(std::vector<CDataPacketPtr> data, double defaultValue, int tag, Time start_graph, Time end_graph, CField *field) 193 { 194 195 bool BG = buildGraph(data, tag, start_graph, end_graph, field); 196 163 197 CDataPacketPtr packet(new CDataPacket); 164 198 packet->date = data[0]->date; … … 177 211 if (0 != packet->data.numElements()) 178 212 (packet->data)(0) = defaultValue; 179 apply(data[0]->data, packet->data); 180 } 213 if(BG) apply(data[0]->data, packet->data, this->filterID); 214 else apply(data[0]->data, packet->data); 215 } 216 217 if(BG) packet->src_filterID=this->filterID; 218 if(BG) packet->distance=data[0]->distance+1; 219 packet->field = field; 181 220 182 221 return packet; 183 222 } 184 223 185 void CSpatialTransformFilterEngine::apply(const CArray<double, 1>& dataSrc, CArray<double,1>& dataDest )224 void CSpatialTransformFilterEngine::apply(const CArray<double, 1>& dataSrc, CArray<double,1>& dataDest, int filterID) 186 225 { 187 226 CTimer::get("CSpatialTransformFilterEngine::apply").resume(); … … 296 335 const std::vector<std::pair<int,double> >& localIndex_p = itRecv->second; 297 336 int srcRank = itRecv->first; 337 338 if(filterID >=0) // building_graph 339 { 340 (*CWorkflowGraph::mapFilters_ptr_with_info)[filterID].filter_name = (*itAlgo)->getName(); 341 } 298 342 if (srcRank != rank) 299 343 { -
XIOS/trunk/src/filter/spatial_transform_filter.hpp
r1542 r1704 3 3 4 4 #include "filter.hpp" 5 #include "field.hpp" 5 6 6 7 namespace xios … … 9 10 class CGridTransformation; 10 11 class CSpatialTransformFilterEngine; 12 13 class CField; 11 14 12 15 /*! … … 24 27 * \param [in] inputSlotsCount number of input, by default there is only one for field src 25 28 */ 26 CSpatialTransformFilter(CGarbageCollector& gc, CSpatialTransformFilterEngine* engine, double outputValue, size_t inputSlotsCount = 1); 29 CSpatialTransformFilter(CGarbageCollector& gc, CSpatialTransformFilterEngine* engine, 30 double outputValue, size_t inputSlotsCount = 1); 31 32 inline StdString GetName(void) {return StdString("Spatial transform filter");}; 27 33 28 34 /*! … … 93 99 { 94 100 public: 101 102 int filterID; 103 int tag; 104 CField *field; 95 105 /*! 96 106 * Returns the engine wrapping the specified grid transformation. … … 109 119 * \return the result of the grid transformation 110 120 */ 111 CDataPacketPtr applyFilter(std::vector<CDataPacketPtr> data, double defaultValue = 0); 121 CDataPacketPtr applyFilter(std::vector<CDataPacketPtr> data, double defaultValue = 0, int tag=0, Time start_graph=0, Time end_graph=-1, CField *field=0); 122 bool buildGraph(std::vector<CDataPacketPtr> data, int tag=0, Time start_graph=0, Time end_graph=-1, CField *field=0); 112 123 113 124 /*! … … 136 147 * \param dataDest the resulting transformed data 137 148 */ 138 void apply(const CArray<double, 1>& dataSrc, CArray<double,1>& dataDest );149 void apply(const CArray<double, 1>& dataSrc, CArray<double,1>& dataDest, int filterID=-1); 139 150 140 151 CGridTransformation* gridTransformation; //!< The grid transformation used by the engine -
XIOS/trunk/src/filter/store_filter.cpp
r1474 r1704 3 3 #include "grid.hpp" 4 4 #include "timer.hpp" 5 #include "file.hpp" 5 6 6 7 namespace xios … … 76 77 template CDataPacket::StatusCode CStoreFilter::getData<7>(Time timestamp, CArray<double, 7>& data); 77 78 79 void CStoreFilter::buildGraph(std::vector<CDataPacketPtr> data) 80 { 81 bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; 82 83 if(building_graph) 84 { 85 this->filterID = InvalidableObject::filterIdGenerator++; 86 int edgeID = InvalidableObject::edgeIdGenerator++; 87 88 CWorkflowGraph::allocNodeEdge(); 89 90 CWorkflowGraph::addNode(this->filterID, "Store Filter", 7, 0, 1, data[0]); 91 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = ++(data[0]->distance); 92 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 93 if(this->field->file) (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 94 95 // if(CXios::isClient) std::cout<<"CStoreFilter::apply filter tag = "<<this->tag<<std::endl; 96 97 if(CXios::isClient && CWorkflowGraph::build_begin) 98 { 99 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]);; 100 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0; 101 } 102 else CWorkflowGraph::build_begin = true; 103 } 104 } 105 78 106 void CStoreFilter::onInputReady(std::vector<CDataPacketPtr> data) 79 107 { 108 buildGraph(data); 80 109 81 110 CDataPacketPtr packet; -
XIOS/trunk/src/filter/store_filter.hpp
r1358 r1704 3 3 4 4 #include "input_pin.hpp" 5 #include "workflow_graph.hpp" 6 5 7 6 8 namespace xios … … 8 10 class CContext; 9 11 class CGrid; 12 class CField; 10 13 11 14 /*! … … 73 76 void virtual invalidate(Time timestamp); 74 77 78 int filterID; 79 int tag; 80 Time start_graph; 81 Time end_graph; 82 CField *field; 83 int distance; 84 85 75 86 protected: 76 87 /*! … … 80 91 */ 81 92 void virtual onInputReady(std::vector<CDataPacketPtr> data); 93 void virtual buildGraph(std::vector<CDataPacketPtr> data); 82 94 83 95 private: -
XIOS/trunk/src/filter/temporal_filter.cpp
r1523 r1704 2 2 #include "functor_type.hpp" 3 3 #include "calendar_util.hpp" 4 #include "workflow_graph.hpp" 5 #include "file.hpp" 4 6 5 7 namespace xios … … 22 24 this->samplingOffset.second, this->samplingOffset.timestep) 23 25 , initDate(initDate) 24 // , nextSamplingDate(initDate + (this->samplingOffset + initDate.getRelCalendar().getTimeStep()))25 26 , nextSamplingDate(initDate + offsetMonth + ( offsetAllButMonth + initDate.getRelCalendar().getTimeStep())) 26 27 , nbOperationDates(1) … … 28 29 // , nextOperationDate(initDate + opFreq + this->samplingOffset) 29 30 , isFirstOperation(true) 31 , temp_op(opId) 30 32 { 31 33 } 32 34 35 36 37 38 39 bool CTemporalFilter::buildGraph(std::vector<CDataPacketPtr> data) 40 { 41 bool building_graph=this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; 42 43 if(building_graph) 44 { 45 if(this->filterIDoutputs.size()==0) this->filterID = InvalidableObject::filterIdGenerator++; 46 int edgeID = InvalidableObject::edgeIdGenerator++; 47 48 // std::cout<<"CTemporalFilter::apply filter tag = "<<this->tag<<" start = "<<this->start_graph<<" end = "<<this->end_graph<<std::endl; 49 50 CWorkflowGraph::allocNodeEdge(); 51 52 if(this->filterIDoutputs.size()==0) 53 { 54 CWorkflowGraph::addNode(this->filterID, "Temporal Filter\\n("+this->temp_op+")", 5, 1, 0, data[0]); 55 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].transform_type = this->temp_op; 56 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].inputs_complete = false ; 57 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].clusterID = 1 ; 58 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = (data[0]->distance); 59 60 61 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 62 if(this->field->file) (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 63 } 64 65 if(CWorkflowGraph::build_begin) 66 { 67 68 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); 69 70 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 71 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb += 1 ; 72 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = max(data[0]->distance+1, (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance); 73 } 74 75 76 this->filterIDoutputs.push_back(data[0]->src_filterID); 77 } 78 79 return building_graph; 80 } 81 82 33 83 CDataPacketPtr CTemporalFilter::apply(std::vector<CDataPacketPtr> data) 34 84 { 85 bool BG = buildGraph(data); 86 35 87 CDataPacketPtr packet; 36 88 … … 43 95 { 44 96 usePacket = (data[0]->date >= nextSamplingDate); 45 // outputResult = (data[0]->date + samplingFreq > nextOperationDate);46 97 outputResult = (data[0]->date > initDate + nbOperationDates*opFreq - samplingFreq + offsetMonth + offsetAllButMonth); 47 98 copyLess = (isInstantOperation && usePacket && outputResult); … … 80 131 81 132 isFirstOperation = false; 82 // nextOperationDate = initDate + samplingFreq + nbOperationDates*opFreq - samplingFreq + offsetMonth + offsetAllButMonth; 133 134 packet->field = this->field; 135 136 if(BG) 137 { 138 packet->src_filterID=this->filterID; 139 packet->distance = data[0]->distance+1; 140 this->filterIDoutputs.clear(); 141 CWorkflowGraph::build_begin=true; 142 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].inputs_complete = true ; 143 } 83 144 } 84 145 } -
XIOS/trunk/src/filter/temporal_filter.hpp
r1473 r1704 31 31 bool ignoreMissingValue = false); 32 32 33 inline StdString GetName(void) {return StdString("Temporal filter");}; 34 33 35 /*! 34 36 * Applies the temporal operation to the input data and returns the result when it is ready. … … 38 40 */ 39 41 CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); 42 bool virtual buildGraph(std::vector<CDataPacketPtr> data); 40 43 41 44 /*! … … 52 55 */ 53 56 bool virtual isDataExpected(const CDate& date) const; 57 std::vector<int > filterIDoutputs; 58 std::vector<std::pair<int, int> > filterIDoutputs_pair; 59 60 StdString temp_op; 54 61 55 62 private: -
XIOS/trunk/src/filter/ternary_arithmetic_filter.cpp
r1162 r1704 1 1 #include "ternary_arithmetic_filter.hpp" 2 #include "workflow_graph.hpp" 3 #include "yacc_var.hpp" 4 #include "file.hpp" 2 5 3 6 namespace xios … … 8 11 , value1(value1) 9 12 , value2(value2) 10 { /* Nothing to do */ }; 13 { 14 expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 15 /* Nothing to do */ 16 }; 17 18 std::tuple<int, int, int> CScalarScalarFieldArithmeticFilter::buildGraph(std::vector<CDataPacketPtr> data) 19 { 20 bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; 21 int unique_filter_id; 22 bool firstround; 23 24 if(building_graph) 25 { 26 CWorkflowGraph::allocNodeEdge(); 27 28 size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 29 30 // first round 31 if(CWorkflowGraph::mapHashFilterID_ptr->find(filterhash) == CWorkflowGraph::mapHashFilterID_ptr->end()) 32 { 33 firstround = true; 34 this->filterID = InvalidableObject::filterIdGenerator++; 35 int edgeID = InvalidableObject::edgeIdGenerator++; 36 37 CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 38 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_tag = this->tag; 39 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 40 41 42 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 43 if(this->field->file) (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 44 45 46 if(CWorkflowGraph::build_begin) 47 { 48 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); 49 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 50 51 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 52 } 53 else CWorkflowGraph::build_begin = true; 54 55 (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash] = this->filterID; 56 unique_filter_id = this->filterID; 57 } 58 // not first round 59 else 60 { 61 firstround=false; 62 unique_filter_id = (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash]; 63 if(data[0]->src_filterID != unique_filter_id) 64 { 65 int edgeID = InvalidableObject::edgeIdGenerator++; 66 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[0]); 67 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 68 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 69 } 70 } 71 } 72 73 return std::make_tuple(building_graph, firstround, unique_filter_id); 74 } 11 75 12 76 CDataPacketPtr CScalarScalarFieldArithmeticFilter::apply(std::vector<CDataPacketPtr> data) … … 16 80 packet->timestamp = data[0]->timestamp; 17 81 packet->status = data[0]->status; 82 83 std::tuple<int, int, int> graph = buildGraph(data); 84 85 if(std::get<0>(graph)) packet->src_filterID = std::get<2>(graph); 86 if(std::get<0>(graph) && std::get<1>(graph)) packet->distance = data[0]->distance+1; 87 if(std::get<0>(graph) && !std::get<1>(graph)) packet->distance = data[0]->distance; 88 89 packet->field = this->field; 18 90 19 91 if (packet->status == CDataPacket::NO_ERROR) … … 28 100 , value1(value1) 29 101 , value2(value2) 30 { /* Nothing to do */ }; 102 { 103 expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 104 /* Nothing to do */ 105 }; 106 107 std::tuple<int, int, int> CScalarFieldScalarArithmeticFilter::buildGraph(std::vector<CDataPacketPtr> data) 108 { 109 bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; 110 int unique_filter_id; 111 bool firstround; 112 113 if(building_graph) 114 { 115 CWorkflowGraph::allocNodeEdge(); 116 117 size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 118 119 // first round 120 if(CWorkflowGraph::mapHashFilterID_ptr->find(filterhash) == CWorkflowGraph::mapHashFilterID_ptr->end()) 121 { 122 firstround = true; 123 this->filterID = InvalidableObject::filterIdGenerator++; 124 int edgeID = InvalidableObject::edgeIdGenerator++; 125 126 CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 127 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_tag = this->tag; 128 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 129 130 131 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 132 if(this->field->file) (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 133 134 135 if(CWorkflowGraph::build_begin) 136 { 137 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); 138 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 139 140 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 141 } 142 else CWorkflowGraph::build_begin = true; 143 144 (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash] = this->filterID; 145 unique_filter_id = this->filterID; 146 } 147 // not first round 148 else 149 { 150 firstround=false; 151 unique_filter_id = (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash]; 152 if(data[0]->src_filterID != unique_filter_id) 153 { 154 int edgeID = InvalidableObject::edgeIdGenerator++; 155 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[0]); 156 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 157 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 158 } 159 } 160 } 161 162 return std::make_tuple(building_graph, firstround, unique_filter_id); 163 } 31 164 32 165 CDataPacketPtr CScalarFieldScalarArithmeticFilter::apply(std::vector<CDataPacketPtr> data) … … 36 169 packet->timestamp = data[0]->timestamp; 37 170 packet->status = data[0]->status; 171 172 std::tuple<int, int, int> graph = buildGraph(data); 173 174 if(std::get<0>(graph)) packet->src_filterID = std::get<2>(graph); 175 if(std::get<0>(graph) && std::get<1>(graph)) packet->distance = data[0]->distance+1; 176 if(std::get<0>(graph) && !std::get<1>(graph)) packet->distance = data[0]->distance; 177 178 packet->field = this->field; 38 179 39 180 if (packet->status == CDataPacket::NO_ERROR) … … 47 188 , op(operatorExpr.getOpScalarFieldField(op)) 48 189 , value(value) 49 { /* Nothing to do */ }; 190 { 191 expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 192 /* Nothing to do */ 193 }; 194 195 std::tuple<int, int, int> CScalarFieldFieldArithmeticFilter::buildGraph(std::vector<CDataPacketPtr> data) 196 { 197 bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; 198 int unique_filter_id; 199 200 bool firstround; 201 202 if(building_graph) 203 { 204 CWorkflowGraph::allocNodeEdge(); 205 206 size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 207 208 // first round 209 if(CWorkflowGraph::mapHashFilterID_ptr->find(filterhash) == CWorkflowGraph::mapHashFilterID_ptr->end()) 210 { 211 firstround = true; 212 this->filterID = InvalidableObject::filterIdGenerator++; 213 int edgeID = InvalidableObject::edgeIdGenerator++; 214 215 CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 216 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 217 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 218 219 if(this->field->file) (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 220 221 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_tag = this->tag; 222 if(CWorkflowGraph::build_begin) 223 { 224 225 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); 226 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 227 228 edgeID = InvalidableObject::edgeIdGenerator++; 229 230 CWorkflowGraph::addEdge(edgeID, this->filterID, data[1]); 231 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 232 233 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 234 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[1]->src_filterID].filter_filled = 0 ; 235 } 236 CWorkflowGraph::build_begin = true; 237 238 (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash] = this->filterID; 239 unique_filter_id = this->filterID; 240 241 } 242 // not first round 243 else 244 { 245 firstround = false; 246 unique_filter_id = (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash]; 247 if(data[0]->src_filterID != unique_filter_id) 248 { 249 int edgeID = InvalidableObject::edgeIdGenerator++; 250 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[0]); 251 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 252 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 253 } 254 if(data[1]->src_filterID != unique_filter_id) 255 { 256 int edgeID = InvalidableObject::edgeIdGenerator++; 257 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[1]); 258 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[1]->src_filterID].filter_filled = 0 ; 259 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 260 } 261 262 } 263 } 264 265 return std::make_tuple(building_graph, firstround, unique_filter_id); 266 } 50 267 51 268 CDataPacketPtr CScalarFieldFieldArithmeticFilter::apply(std::vector<CDataPacketPtr> data) … … 55 272 packet->timestamp = data[0]->timestamp; 56 273 packet->status = data[0]->status; 274 275 std::tuple<int, int, int> graph = buildGraph(data); 276 277 if(std::get<0>(graph)) packet->src_filterID = std::get<2>(graph); 278 if(std::get<0>(graph) && std::get<1>(graph)) packet->distance = data[0]->distance+1; 279 if(std::get<0>(graph) && !std::get<1>(graph)) packet->distance = data[0]->distance; 280 281 packet->field = this->field; 57 282 58 283 if (data[0]->status != CDataPacket::NO_ERROR) … … 75 300 , value1(value1) 76 301 , value2(value2) 77 { /* Nothing to do */ }; 302 { 303 expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 304 /* Nothing to do */ 305 }; 306 307 std::tuple<int, int, int> CFieldScalarScalarArithmeticFilter::buildGraph(std::vector<CDataPacketPtr> data) 308 { 309 bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; 310 int unique_filter_id; 311 bool firstround; 312 313 if(building_graph) 314 { 315 CWorkflowGraph::allocNodeEdge(); 316 317 size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 318 319 // first round 320 if(CWorkflowGraph::mapHashFilterID_ptr->find(filterhash) == CWorkflowGraph::mapHashFilterID_ptr->end()) 321 { 322 firstround = true; 323 this->filterID = InvalidableObject::filterIdGenerator++; 324 int edgeID = InvalidableObject::edgeIdGenerator++; 325 326 CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 327 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_tag = this->tag; 328 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 329 330 331 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 332 if(this->field->file) (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 333 334 335 if(CWorkflowGraph::build_begin) 336 { 337 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); 338 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 339 340 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 341 } 342 else CWorkflowGraph::build_begin = true; 343 344 (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash] = this->filterID; 345 unique_filter_id = this->filterID; 346 } 347 // not first round 348 else 349 { 350 firstround=false; 351 unique_filter_id = (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash]; 352 if(data[0]->src_filterID != unique_filter_id) 353 { 354 int edgeID = InvalidableObject::edgeIdGenerator++; 355 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[0]); 356 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 357 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 358 } 359 } 360 } 361 362 return std::make_tuple(building_graph, firstround, unique_filter_id); 363 } 78 364 79 365 CDataPacketPtr CFieldScalarScalarArithmeticFilter::apply(std::vector<CDataPacketPtr> data) … … 84 370 packet->status = data[0]->status; 85 371 372 std::tuple<int, int, int> graph = buildGraph(data); 373 374 if(std::get<0>(graph)) packet->src_filterID = std::get<2>(graph); 375 if(std::get<0>(graph) && std::get<1>(graph)) packet->distance = data[0]->distance+1; 376 if(std::get<0>(graph) && !std::get<1>(graph)) packet->distance = data[0]->distance; 377 378 packet->field = this->field; 379 86 380 if (packet->status == CDataPacket::NO_ERROR) 87 381 packet->data.reference(op(data[0]->data, value1, value2)); … … 95 389 , op(operatorExpr.getOpFieldScalarField(op)) 96 390 , value(value) 97 { /* Nothing to do */ }; 391 { 392 expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 393 /* Nothing to do */ 394 }; 395 396 std::tuple<int, int, int> CFieldScalarFieldArithmeticFilter::buildGraph(std::vector<CDataPacketPtr> data) 397 { 398 bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; 399 int unique_filter_id; 400 401 bool firstround; 402 403 if(building_graph) 404 { 405 CWorkflowGraph::allocNodeEdge(); 406 407 size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 408 409 // first round 410 if(CWorkflowGraph::mapHashFilterID_ptr->find(filterhash) == CWorkflowGraph::mapHashFilterID_ptr->end()) 411 { 412 firstround = true; 413 this->filterID = InvalidableObject::filterIdGenerator++; 414 int edgeID = InvalidableObject::edgeIdGenerator++; 415 416 CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 417 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 418 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 419 420 if(this->field->file) (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 421 422 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_tag = this->tag; 423 if(CWorkflowGraph::build_begin) 424 { 425 426 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); 427 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 428 429 edgeID = InvalidableObject::edgeIdGenerator++; 430 431 CWorkflowGraph::addEdge(edgeID, this->filterID, data[1]); 432 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 433 434 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 435 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[1]->src_filterID].filter_filled = 0 ; 436 } 437 CWorkflowGraph::build_begin = true; 438 439 (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash] = this->filterID; 440 unique_filter_id = this->filterID; 441 442 } 443 // not first round 444 else 445 { 446 firstround = false; 447 unique_filter_id = (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash]; 448 if(data[0]->src_filterID != unique_filter_id) 449 { 450 int edgeID = InvalidableObject::edgeIdGenerator++; 451 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[0]); 452 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 453 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 454 } 455 if(data[1]->src_filterID != unique_filter_id) 456 { 457 int edgeID = InvalidableObject::edgeIdGenerator++; 458 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[1]); 459 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[1]->src_filterID].filter_filled = 0 ; 460 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 461 } 462 463 } 464 } 465 466 return std::make_tuple(building_graph, firstround, unique_filter_id); 467 } 98 468 99 469 CDataPacketPtr CFieldScalarFieldArithmeticFilter::apply(std::vector<CDataPacketPtr> data) … … 103 473 packet->timestamp = data[0]->timestamp; 104 474 packet->status = data[0]->status; 475 476 std::tuple<int, int, int> graph = buildGraph(data); 477 478 if(std::get<0>(graph)) packet->src_filterID = std::get<2>(graph); 479 if(std::get<0>(graph) && std::get<1>(graph)) packet->distance = data[0]->distance+1; 480 if(std::get<0>(graph) && !std::get<1>(graph)) packet->distance = data[0]->distance; 481 482 packet->field = this->field; 105 483 106 484 if (data[0]->status != CDataPacket::NO_ERROR) … … 120 498 , op(operatorExpr.getOpFieldFieldScalar(op)) 121 499 , value(value) 122 { /* Nothing to do */ }; 500 { 501 expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 502 std::cout<<"expression = "<<expression; 503 /* Nothing to do */ 504 }; 505 506 std::tuple<int, int, int> CFieldFieldScalarArithmeticFilter::buildGraph(std::vector<CDataPacketPtr> data) 507 { 508 bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; 509 int unique_filter_id; 510 511 bool firstround; 512 513 if(building_graph) 514 { 515 CWorkflowGraph::allocNodeEdge(); 516 517 size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 518 519 // first round 520 if(CWorkflowGraph::mapHashFilterID_ptr->find(filterhash) == CWorkflowGraph::mapHashFilterID_ptr->end()) 521 { 522 firstround = true; 523 this->filterID = InvalidableObject::filterIdGenerator++; 524 int edgeID = InvalidableObject::edgeIdGenerator++; 525 526 CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 527 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 528 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 529 530 if(this->field->file) (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 531 532 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_tag = this->tag; 533 if(CWorkflowGraph::build_begin) 534 { 535 536 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); 537 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 538 539 edgeID = InvalidableObject::edgeIdGenerator++; 540 541 CWorkflowGraph::addEdge(edgeID, this->filterID, data[1]); 542 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 543 544 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 545 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[1]->src_filterID].filter_filled = 0 ; 546 } 547 CWorkflowGraph::build_begin = true; 548 549 (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash] = this->filterID; 550 unique_filter_id = this->filterID; 551 552 } 553 // not first round 554 else 555 { 556 firstround = false; 557 unique_filter_id = (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash]; 558 if(data[0]->src_filterID != unique_filter_id) 559 { 560 int edgeID = InvalidableObject::edgeIdGenerator++; 561 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[0]); 562 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 563 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 564 } 565 if(data[1]->src_filterID != unique_filter_id) 566 { 567 int edgeID = InvalidableObject::edgeIdGenerator++; 568 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[1]); 569 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[1]->src_filterID].filter_filled = 0 ; 570 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 571 } 572 573 } 574 } 575 576 return std::make_tuple(building_graph, firstround, unique_filter_id); 577 } 123 578 124 579 CDataPacketPtr CFieldFieldScalarArithmeticFilter::apply(std::vector<CDataPacketPtr> data) … … 128 583 packet->timestamp = data[0]->timestamp; 129 584 packet->status = data[0]->status; 585 586 std::tuple<int, int, int> graph = buildGraph(data); 587 588 if(std::get<0>(graph)) packet->src_filterID = std::get<2>(graph); 589 if(std::get<0>(graph) && std::get<1>(graph)) packet->distance = data[0]->distance+1; 590 if(std::get<0>(graph) && !std::get<1>(graph)) packet->distance = data[0]->distance; 591 592 packet->field = this->field; 130 593 131 594 if (data[0]->status != CDataPacket::NO_ERROR) … … 145 608 : CFilter(gc, 3, this) 146 609 , op(operatorExpr.getOpFieldFieldField(op)) 147 { /* Nothing to do */ }; 610 { 611 expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 612 /* Nothing to do */ 613 }; 614 615 std::tuple<int, int, int> CFieldFieldFieldArithmeticFilter::buildGraph(std::vector<CDataPacketPtr> data) 616 { 617 bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; 618 int unique_filter_id; 619 620 bool firstround; 621 622 if(building_graph) 623 { 624 CWorkflowGraph::allocNodeEdge(); 625 626 size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 627 628 // first round 629 if(CWorkflowGraph::mapHashFilterID_ptr->find(filterhash) == CWorkflowGraph::mapHashFilterID_ptr->end()) 630 { 631 firstround = true; 632 this->filterID = InvalidableObject::filterIdGenerator++; 633 int edgeID = InvalidableObject::edgeIdGenerator++; 634 635 CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 636 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 637 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 638 639 if(this->field->file) (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 640 641 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_tag = this->tag; 642 if(CWorkflowGraph::build_begin) 643 { 644 645 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); 646 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 647 648 edgeID = InvalidableObject::edgeIdGenerator++; 649 650 CWorkflowGraph::addEdge(edgeID, this->filterID, data[1]); 651 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 652 653 edgeID = InvalidableObject::edgeIdGenerator++; 654 655 CWorkflowGraph::addEdge(edgeID, this->filterID, data[2]); 656 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 657 658 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 659 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[1]->src_filterID].filter_filled = 0 ; 660 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[2]->src_filterID].filter_filled = 0 ; 661 } 662 CWorkflowGraph::build_begin = true; 663 664 (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash] = this->filterID; 665 unique_filter_id = this->filterID; 666 667 } 668 // not first round 669 else 670 { 671 firstround = false; 672 unique_filter_id = (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash]; 673 if(data[0]->src_filterID != unique_filter_id) 674 { 675 int edgeID = InvalidableObject::edgeIdGenerator++; 676 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[0]); 677 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 678 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 679 } 680 if(data[1]->src_filterID != unique_filter_id) 681 { 682 int edgeID = InvalidableObject::edgeIdGenerator++; 683 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[1]); 684 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[1]->src_filterID].filter_filled = 0 ; 685 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 686 } 687 if(data[2]->src_filterID != unique_filter_id) 688 { 689 int edgeID = InvalidableObject::edgeIdGenerator++; 690 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[2]); 691 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[2]->src_filterID].filter_filled = 0 ; 692 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 693 } 694 695 } 696 } 697 698 return std::make_tuple(building_graph, firstround, unique_filter_id); 699 } 148 700 149 701 CDataPacketPtr CFieldFieldFieldArithmeticFilter::apply(std::vector<CDataPacketPtr> data) … … 153 705 packet->timestamp = data[0]->timestamp; 154 706 packet->status = data[0]->status; 707 708 std::tuple<int, int, int> graph = buildGraph(data); 709 710 if(std::get<0>(graph)) packet->src_filterID = std::get<2>(graph); 711 if(std::get<0>(graph) && std::get<1>(graph)) packet->distance = data[0]->distance+1; 712 if(std::get<0>(graph) && !std::get<1>(graph)) packet->distance = data[0]->distance; 713 714 packet->field = this->field; 155 715 156 716 if (data[0]->status != CDataPacket::NO_ERROR) -
XIOS/trunk/src/filter/ternary_arithmetic_filter.hpp
r1162 r1704 5 5 #include <string> 6 6 #include "operator_expr.hpp" 7 #include <tuple> 7 8 8 9 namespace xios … … 36 37 */ 37 38 CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); 39 std::tuple<int, int, int> virtual buildGraph(std::vector<CDataPacketPtr> data); 38 40 }; // class CScalarScalarFieldArithmeticFilter 39 41 … … 67 69 */ 68 70 CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); 71 std::tuple<int, int, int> virtual buildGraph(std::vector<CDataPacketPtr> data); 69 72 }; // class CScalarScalarFieldArithmeticFilter 70 73 … … 95 98 */ 96 99 CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); 100 std::tuple<int, int, int> virtual buildGraph(std::vector<CDataPacketPtr> data); 97 101 }; // class CScalarScalarFieldArithmeticFilter 98 102 … … 127 131 */ 128 132 CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); 133 std::tuple<int, int, int> virtual buildGraph(std::vector<CDataPacketPtr> data); 129 134 }; // class CFieldScalarScalarArithmeticFilter 130 135 … … 156 161 */ 157 162 CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); 163 std::tuple<int, int, int> virtual buildGraph(std::vector<CDataPacketPtr> data); 158 164 }; // class CFieldScalarFieldArithmeticFilter 159 165 … … 185 191 */ 186 192 CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); 193 std::tuple<int, int, int> virtual buildGraph(std::vector<CDataPacketPtr> data); 187 194 }; // class CFieldFielScalardArithmeticFilter 188 195 … … 212 219 */ 213 220 CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); 221 std::tuple<int, int, int> virtual buildGraph(std::vector<CDataPacketPtr> data); 214 222 }; // class CFieldFielFieldArithmeticFilter 215 223 -
XIOS/trunk/src/filter/unary_arithmetic_filter.cpp
r643 r1704 1 1 #include "unary_arithmetic_filter.hpp" 2 #include "workflow_graph.hpp" 3 #include "yacc_var.hpp" 4 #include "file.hpp" 2 5 3 6 namespace xios … … 6 9 : CFilter(gc, 1, this) 7 10 , op(operatorExpr.getOpField(op)) 8 { /* Nothing to do */ }; 11 { 12 expression.assign(*yacc_globalInputText_ptr, 0, yacc_globalInputText_ptr->size()-1); 13 }; 14 15 std::tuple<int, int, int> CUnaryArithmeticFilter::buildGraph(std::vector<CDataPacketPtr> data) 16 { 17 bool building_graph = this->tag ? data[0]->timestamp >= this->start_graph && data[0]->timestamp <= this->end_graph : false; 18 int unique_filter_id; 19 bool firstround; 20 21 if(building_graph) 22 { 23 CWorkflowGraph::allocNodeEdge(); 24 size_t filterhash = std::hash<StdString>{}(expression+to_string(data[0]->timestamp)+this->field->getId()); 25 26 // first round 27 if(CWorkflowGraph::mapHashFilterID_ptr->find(filterhash) == CWorkflowGraph::mapHashFilterID_ptr->end()) 28 { 29 firstround=true; 30 this->filterID = InvalidableObject::filterIdGenerator++; 31 int edgeID = InvalidableObject::edgeIdGenerator++; 32 33 CWorkflowGraph::addNode(this->filterID, "Arithmetic Filter\\n("+expression+")", 3, 1, 0, data[0]); 34 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].filter_tag = this->tag; 35 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 36 37 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 38 if(this->field->file) (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 39 40 if(CWorkflowGraph::build_begin) 41 { 42 43 CWorkflowGraph::addEdge(edgeID, this->filterID, data[0]); 44 (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].expected_entry_nb ++; 45 46 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 47 } 48 else CWorkflowGraph::build_begin = true; 49 50 (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash] = this->filterID; 51 unique_filter_id = this->filterID; 52 } 53 else 54 { 55 firstround=false; 56 unique_filter_id = (*CWorkflowGraph::mapHashFilterID_ptr)[filterhash]; 57 if(data[0]->src_filterID != unique_filter_id) 58 { 59 int edgeID = InvalidableObject::edgeIdGenerator++; 60 CWorkflowGraph::addEdge(edgeID, unique_filter_id, data[0]); 61 (*CWorkflowGraph::mapFilters_ptr_with_info)[data[0]->src_filterID].filter_filled = 0 ; 62 (*CWorkflowGraph::mapFilters_ptr_with_info)[unique_filter_id].expected_entry_nb ++; 63 } 64 } 65 66 } 67 68 return std::make_tuple(building_graph, firstround, unique_filter_id); 69 } 9 70 10 71 CDataPacketPtr CUnaryArithmeticFilter::apply(std::vector<CDataPacketPtr> data) … … 15 76 packet->status = data[0]->status; 16 77 78 std::tuple<int, int, int> graph = buildGraph(data); 79 80 if(std::get<0>(graph)) packet->src_filterID = std::get<2>(graph); 81 if(std::get<0>(graph) && std::get<1>(graph)) packet->distance = data[0]->distance+1; 82 if(std::get<0>(graph) && !std::get<1>(graph)) packet->distance = data[0]->distance; 83 84 packet->field = this->field; 85 17 86 if (packet->status == CDataPacket::NO_ERROR) 18 87 packet->data.reference(op(data[0]->data)); -
XIOS/trunk/src/filter/unary_arithmetic_filter.hpp
r642 r1704 34 34 */ 35 35 CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); 36 std::tuple<int, int, int> virtual buildGraph(std::vector<CDataPacketPtr> data); 36 37 }; // class CUnaryArithmeticFilter 37 38 } // namespace xios -
XIOS/trunk/src/node/field.cpp
r1639 r1704 24 24 #include "spatial_transform_filter.hpp" 25 25 #include "file_server_writer_filter.hpp" 26 #include "workflow_graph.hpp" 26 27 27 28 namespace xios{ … … 45 46 , mustAutoTrigger(false) 46 47 , isEOF(false), nstepMaxRead(false) 47 { setVirtualVariableGroup(CVariableGroup::create(getId() + "_virtual_variable_group")); } 48 { setVirtualVariableGroup(CVariableGroup::create(getId() + "_virtual_variable_group")); 49 field_graph_start = -2; 50 field_graph_end = -2; 51 } 48 52 49 53 CField::CField(const StdString& id) … … 63 67 , mustAutoTrigger(false) 64 68 , isEOF(false), nstepMaxRead(false) 65 { setVirtualVariableGroup(CVariableGroup::create(getId() + "_virtual_variable_group")); } 69 { setVirtualVariableGroup(CVariableGroup::create(getId() + "_virtual_variable_group")); 70 field_graph_start = -2; 71 field_graph_end = -2; 72 } 73 66 74 67 75 CField::~CField(void) … … 1106 1114 * read by the client or/and written to a file 1107 1115 */ 1108 void CField::buildFilterGraph(CGarbageCollector& gc, bool enableOutput )1116 void CField::buildFilterGraph(CGarbageCollector& gc, bool enableOutput, Time start_graph, Time end_graph) 1109 1117 TRY 1110 1118 { 1111 if (!isReferenceSolvedAndTransformed) solveAllEnabledFieldsAndTransform();1112 if (!isGridChecked) checkGridOfEnabledFields();1119 if (!isReferenceSolvedAndTransformed) solveAllEnabledFieldsAndTransform(); 1120 if (!isGridChecked) checkGridOfEnabledFields(); 1113 1121 1114 1122 const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true); 1123 1124 const bool buildWorkflowGraph = (!build_workflow_graph.isEmpty() && build_workflow_graph == true); 1125 1126 1115 1127 const double defaultValue = detectMissingValues ? default_value : (!default_value.isEmpty() ? default_value : 0.0); 1116 1128 1117 1129 CContext* context = CContext::getCurrent(); 1130 1131 Time filter_start; 1132 if(!build_workflow_graph_start.isEmpty() && buildWorkflowGraph) filter_start = context->calendar->getInitDate()+build_workflow_graph_start; 1133 else if(build_workflow_graph_start.isEmpty() && buildWorkflowGraph) filter_start = 0; 1134 else filter_start = -1; 1135 1136 Time filter_end; 1137 if(!build_workflow_graph_end.isEmpty() && buildWorkflowGraph) filter_end = context->calendar->getInitDate()+build_workflow_graph_end; 1138 else if(build_workflow_graph_end.isEmpty() && buildWorkflowGraph) filter_end = 9223372036854775807; 1139 else filter_end = -1; 1140 1141 if(this->field_graph_start==-2) this->field_graph_start = filter_start; 1142 if(this->field_graph_end==-2) this->field_graph_end = filter_end; // init 1143 1144 // if(CXios::isClient) std::cout<<"****************** buildFilterGraph : field_id = "<<this->getId()<<" BEFORE: this->field_graph_start = "<<this->field_graph_start<<" this->field_graph_end = "<<this->field_graph_end<<std::endl; 1145 1146 if(start_graph == -1) 1147 { 1148 //nothing 1149 // if(CXios::isClient) std::cout<<"buildFilterGraph field_id = "<<this->getId()<<" case1: this->field_graph_start = "<<this->field_graph_start<<std::endl; 1150 } 1151 else //if(start_graph != -1) 1152 { 1153 if(this->field_graph_start == -1) this->field_graph_start = start_graph; 1154 else this->field_graph_start = min(this->field_graph_start, start_graph); 1155 1156 // if(CXios::isClient) std::cout<<"buildFilterGraph field_id = "<<this->getId()<<" case2: this->field_graph_start = "<<this->field_graph_start<<std::endl; 1157 } 1158 1159 1160 if(end_graph == -1) 1161 { 1162 //nothing 1163 // if(CXios::isClient) std::cout<<"buildFilterGraph field_id = "<<this->getId()<<" case1: this->field_graph_end = "<<this->field_graph_end<<std::endl; 1164 } 1165 else 1166 { 1167 if(this->field_graph_end == -1) this->field_graph_end = end_graph; 1168 else this->field_graph_end = max(this->field_graph_end, end_graph); 1169 1170 // if(CXios::isClient) std::cout<<"buildFilterGraph field_id = "<<this->getId()<<" case2: this->field_graph_end = "<<this->field_graph_end<<std::endl; 1171 } 1172 1173 1174 filter_start = this->field_graph_start; 1175 filter_end = this->field_graph_end; 1176 1177 1178 // if(CXios::isClient) std::cout<<"****************** buildFilterGraph : field_id = "<<this->getId()<<" AFTER: this->field_graph_start = "<<this->field_graph_start<<" this->field_graph_end = "<<this->field_graph_end<<std::endl; 1179 1180 1181 1182 1183 1118 1184 bool hasWriterServer = context->hasServer && !context->hasClient; 1119 1185 bool hasIntermediateServer = context->hasServer && context->hasClient; … … 1159 1225 { 1160 1226 boost::scoped_ptr<IFilterExprNode> expr(parseExpr(getExpression() + '\0')); 1161 std::shared_ptr<COutputPin> filter = expr->reduce(gc, *this );1227 std::shared_ptr<COutputPin> filter = expr->reduce(gc, *this, filter_start, filter_end); 1162 1228 1163 1229 // Check if a spatial transformation is needed … … 1168 1234 if (grid && grid != gridRef && grid->hasTransform()) 1169 1235 { 1170 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); 1171 1237 1172 1238 filter->connectOutput(filters.first, 0); … … 1176 1242 1177 1243 instantDataFilter = filter; 1244 instantDataFilter->field = this; 1245 filter->tag = buildWorkflowGraph; 1246 1247 filter->start_graph = filter_start; 1248 filter->end_graph = filter_end; 1249 1250 for(int i=0; i<filter->parent_filters.size(); i++) 1251 { 1252 filter->tag = filter->tag || filter->parent_filters[i]->tag; 1253 } 1178 1254 } 1179 1255 // Check if we have a reference on another field 1180 1256 else if (!field_ref.isEmpty()) 1181 instantDataFilter = getFieldReference(gc); 1257 { 1258 instantDataFilter = getFieldReference(gc, filter_start, filter_end); 1259 instantDataFilter->tag = buildWorkflowGraph; 1260 instantDataFilter->start_graph = filter_start; 1261 instantDataFilter->end_graph = filter_end; 1262 } 1182 1263 // Check if the data is to be read from a file 1183 1264 else if (file && !file->mode.isEmpty() && file->mode == CFile::mode_attr::read) … … 1186 1267 instantDataFilter = serverSourceFilter = std::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, false, freq_offset, true, 1187 1268 detectMissingValues, defaultValue)); 1269 instantDataFilter->tag = buildWorkflowGraph; 1270 instantDataFilter->start_graph = filter_start; 1271 instantDataFilter->end_graph = filter_end; 1272 instantDataFilter->field = this; 1273 1188 1274 } 1189 1275 else // The data might be passed from the model … … 1191 1277 if (check_if_active.isEmpty()) check_if_active = false; 1192 1278 instantDataFilter = clientSourceFilter = std::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, false, true, NoneDu, false, 1193 detectMissingValues, defaultValue)); 1279 detectMissingValues, defaultValue)); 1280 instantDataFilter->tag = buildWorkflowGraph; 1281 instantDataFilter->start_graph = filter_start; 1282 instantDataFilter->end_graph = filter_end; 1283 instantDataFilter->field = this; 1284 // if(CXios::isClient) std::cout<<"***********************buildFilterGraph init source filter : field_id = "<<this->getId()<<" sourcefilter->start_graph = "<<clientSourceFilter->start_graph<<" sourcefilter->end_graph = "<<clientSourceFilter->end_graph<<std::endl; 1194 1285 } 1195 1286 } … … 1203 1294 detectMissingValues, defaultValue)); 1204 1295 instantDataFilter->connectOutput(storeFilter, 0); 1296 1297 storeFilter->tag = (instantDataFilter->tag || buildWorkflowGraph); 1298 instantDataFilter->start_graph = filter_start; 1299 instantDataFilter->end_graph = filter_end; 1300 1301 instantDataFilter->setParentFiltersTag(); 1302 storeFilter->start_graph = filter_start; 1303 storeFilter->end_graph = filter_end; 1304 storeFilter->field = this; 1305 storeFilter->distance = instantDataFilter->distance+1; 1205 1306 } 1206 1307 … … 1209 1310 fileWriterFilter = std::shared_ptr<CFileWriterFilter>(new CFileWriterFilter(gc, this)); 1210 1311 getTemporalDataFilter(gc, file->output_freq)->connectOutput(fileWriterFilter, 0); 1312 1313 fileWriterFilter->tag = (getTemporalDataFilter(gc, file->output_freq)->tag || buildWorkflowGraph); 1314 getTemporalDataFilter(gc, file->output_freq)->start_graph = filter_start; 1315 getTemporalDataFilter(gc, file->output_freq)->end_graph = filter_end; 1316 getTemporalDataFilter(gc, file->output_freq)->tag = buildWorkflowGraph; 1317 getTemporalDataFilter(gc, file->output_freq)->setParentFiltersTag(); 1318 fileWriterFilter->start_graph = filter_start; 1319 fileWriterFilter->end_graph = filter_end; 1320 fileWriterFilter->distance = getTemporalDataFilter(gc, file->output_freq)->distance+1; 1321 1322 // std::cout<<"CFileWriterFilter filter start = "<<filter_start<<" end = "<<filter_end<<" field = "<<this->getId()<<std::endl; 1323 1211 1324 } 1212 1325 } … … 1222 1335 * \return the output pin corresponding to the field reference 1223 1336 */ 1224 std::shared_ptr<COutputPin> CField::getFieldReference(CGarbageCollector& gc )1337 std::shared_ptr<COutputPin> CField::getFieldReference(CGarbageCollector& gc, Time start_graph, Time end_graph) 1225 1338 TRY 1226 1339 { … … 1230 1343 1231 1344 CField* fieldRef = CField::get(field_ref); 1232 fieldRef->buildFilterGraph(gc, false); 1345 fieldRef->buildFilterGraph(gc, false, start_graph, end_graph); 1346 const bool buildWorkflowGraph = (!build_workflow_graph.isEmpty() && build_workflow_graph == true); 1347 1348 CContext* context = CContext::getCurrent(); 1349 1350 Time filter_start; 1351 if(!build_workflow_graph_start.isEmpty() && buildWorkflowGraph) filter_start = context->calendar->getInitDate()+build_workflow_graph_start; 1352 else if(build_workflow_graph_start.isEmpty() && buildWorkflowGraph) filter_start = 0; 1353 else filter_start = -1; 1354 1355 Time filter_end; 1356 if(!build_workflow_graph_end.isEmpty() && buildWorkflowGraph) filter_end = context->calendar->getInitDate()+build_workflow_graph_end; 1357 else if(build_workflow_graph_end.isEmpty() && buildWorkflowGraph) filter_end = 9223372036854775807; 1358 else filter_end = -1; 1359 1360 if(this->field_graph_start==-2) this->field_graph_start = filter_start; 1361 if(this->field_graph_end==-2) this->field_graph_end = filter_end; // init 1362 1363 // if(CXios::isClient) std::cout<<"getFieldReference field_id = "<<this->getId()<<" BEFORE: this->field_graph_start = "<<this->field_graph_start<<" this->field_graph_end = "<<this->field_graph_end<<std::endl; 1364 1365 if(start_graph == -1) 1366 { 1367 //nothing 1368 // if(CXios::isClient) std::cout<<"getFieldReference field_id = "<<this->getId()<<" case1: this->field_graph_start = "<<this->field_graph_start<<std::endl; 1369 } 1370 else //if(start_graph != -1) 1371 { 1372 if(this->field_graph_start == -1) this->field_graph_start = start_graph; 1373 else this->field_graph_start = min(this->field_graph_start, start_graph); 1374 1375 // if(CXios::isClient) std::cout<<"getFieldReference field_id = "<<this->getId()<<" case2: this->field_graph_start = "<<this->field_graph_start<<std::endl; 1376 } 1377 1378 if(end_graph == -1) 1379 { 1380 //nothing 1381 // if(CXios::isClient) std::cout<<"getFieldReference field_id = "<<this->getId()<<" case1: this->field_graph_end = "<<this->field_graph_end<<std::endl; 1382 } 1383 else 1384 { 1385 if(this->field_graph_end == -1) this->field_graph_end = end_graph; 1386 else this->field_graph_end = max(this->field_graph_end, end_graph); 1387 1388 // if(CXios::isClient) std::cout<<"getFieldReference field_id = "<<this->getId()<<" case2: this->field_graph_end = "<<this->field_graph_end<<std::endl; 1389 } 1390 1391 filter_start = this->field_graph_start; 1392 filter_end = this->field_graph_end; 1393 1394 // if(CXios::isClient) std::cout<<"getFieldReference field_id = "<<this->getId()<<" AFTER: this->field_graph_start = "<<this->field_graph_start<<" this->field_graph_end = "<<this->field_graph_end<<std::endl; 1395 1233 1396 1234 1397 std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters; … … 1239 1402 double defaultValue = hasMissingValue ? default_value : (!default_value.isEmpty() ? default_value : 0.0); 1240 1403 filters = CSpatialTransformFilter::buildFilterGraph(gc, fieldRef->grid, grid, hasMissingValue, defaultValue); 1404 1405 fieldRef->getInstantDataFilter()->connectOutput(filters.first, 0); 1406 1407 1408 1409 filters.second->parent_filters.resize(1); 1410 filters.second->parent_filters[0]= fieldRef->getInstantDataFilter(); 1411 1412 filters.second->tag = (buildWorkflowGraph || filters.second->parent_filters[0]->tag); 1413 1414 filters.second->start_graph = filter_start; 1415 filters.second->end_graph = filter_end; 1416 filters.second->field = this; 1417 1241 1418 } 1242 1419 else 1420 { 1243 1421 filters.first = filters.second = std::shared_ptr<CFilter>(new CPassThroughFilter(gc)); 1244 1422 1245 fieldRef->getInstantDataFilter()->connectOutput(filters.first, 0); 1423 fieldRef->getInstantDataFilter()->connectOutput(filters.first, 0); 1424 1425 1426 filters.second->parent_filters.resize(1); 1427 filters.second->parent_filters[0]= fieldRef->getInstantDataFilter(); 1428 1429 filters.second->tag = (buildWorkflowGraph || filters.second->parent_filters[0]->tag); 1430 1431 filters.second->start_graph = filter_start; 1432 filters.second->end_graph = filter_end; 1433 filters.second->field = this; 1434 1435 } 1246 1436 1247 1437 return filters.second; … … 1258 1448 * \return the output pin corresponding to a self reference 1259 1449 */ 1260 std::shared_ptr<COutputPin> CField::getSelfReference(CGarbageCollector& gc) 1261 TRY 1262 { 1450 std::shared_ptr<COutputPin> CField::getSelfReference(CGarbageCollector& gc, Time start_graph, Time end_graph) 1451 TRY 1452 { 1453 if(CXios::isClient) std::cout<<"getSelfReference field_id = "<<this->getId()<<" start_graph = "<<start_graph<<" end_graph = "<<end_graph<<std::endl; 1454 1263 1455 if (instantDataFilter || !hasExpression()) 1264 1456 ERROR("COutputPin* CField::getSelfReference(CGarbageCollector& gc)", 1265 1457 "Impossible to add a self reference to a field which has already been parsed or which does not have an expression."); 1458 1459 bool buildWorkflowGraph = (!build_workflow_graph.isEmpty() && build_workflow_graph == true); 1266 1460 1267 1461 if (!selfReferenceFilter) … … 1300 1494 } 1301 1495 1496 selfReferenceFilter->tag = buildWorkflowGraph; 1497 selfReferenceFilter->field = this; 1302 1498 return selfReferenceFilter; 1303 1499 } … … 1317 1513 { 1318 1514 std::map<CDuration, std::shared_ptr<COutputPin> >::iterator it = temporalDataFilters.find(outFreq); 1515 const bool buildWorkflowGraph = (!build_workflow_graph.isEmpty() && build_workflow_graph == true); 1516 1517 CContext* context = CContext::getCurrent(); 1518 1319 1519 1320 1520 if (it == temporalDataFilters.end()) … … 1332 1532 1333 1533 instantDataFilter->connectOutput(temporalFilter, 0); 1534 // temporalFilter->tag = buildWorkflowGraph; 1535 1536 temporalFilter->parent_filters.resize(1); 1537 temporalFilter->parent_filters[0] = instantDataFilter; 1538 1539 1540 if(temporalFilter->parent_filters[0]->tag) temporalFilter->tag=true; 1541 1542 // temporalFilter->start_graph = filter_start; 1543 // temporalFilter->end_graph = filter_end; 1544 temporalFilter->field = this; 1334 1545 1335 1546 it = temporalDataFilters.insert(std::make_pair(outFreq, temporalFilter)).first; … … 1367 1578 1368 1579 const bool detectMissingValues = (!detect_missing_value.isEmpty() && detect_missing_value == true); 1580 bool buildWorkflowGraph = (!build_workflow_graph.isEmpty() && build_workflow_graph == true); 1369 1581 std::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, 1370 1371 1582 CContext::getCurrent()->getCalendar()->getInitDate(), 1583 freq_op, freq_offset, outFreq, detectMissingValues)); 1372 1584 1373 1585 selfReferenceFilter->connectOutput(temporalFilter, 0); 1586 temporalFilter->tag = buildWorkflowGraph; 1587 temporalFilter->field = this; 1588 1374 1589 return temporalFilter ; 1375 1590 } -
XIOS/trunk/src/node/field.hpp
r1637 r1704 7 7 #include "functor.hpp" 8 8 #include "functor_type.hpp" 9 #include "filter.hpp" 9 10 #include "duration.hpp" 10 11 #include "date.hpp" … … 139 140 void checkTimeAttributes(CDuration* freqOp=NULL); 140 141 141 void buildFilterGraph(CGarbageCollector& gc, bool enableOutput );142 void buildFilterGraph(CGarbageCollector& gc, bool enableOutput, Time start_graph=-1, Time end_graph=-1); 142 143 size_t getGlobalWrittenSize(void) ; 143 144 144 145 145 std::shared_ptr<COutputPin> getFieldReference(CGarbageCollector& gc );146 std::shared_ptr<COutputPin> getSelfReference(CGarbageCollector& gc );146 std::shared_ptr<COutputPin> getFieldReference(CGarbageCollector& gc, Time start_graph=-1, Time end_graph=-1); 147 std::shared_ptr<COutputPin> getSelfReference(CGarbageCollector& gc, Time start_graph=-1, Time end_graph=-1); 147 148 std::shared_ptr<COutputPin> getTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq); 148 149 std::shared_ptr<COutputPin> getSelfTemporalDataFilter(CGarbageCollector& gc, CDuration outFreq); … … 243 244 bool hasTimeCentered; 244 245 246 Time field_graph_start; 247 Time field_graph_end; 248 245 249 246 250 DECLARE_REF_FUNC(Field,field) -
XIOS/trunk/src/parse_expr/filter_expr_node.cpp
r1575 r1704 12 12 13 13 14 std::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField ) const14 std::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField, Time start_graph, Time end_graph) const 15 15 { 16 16 std::shared_ptr<COutputPin> outputPin; … … 40 40 << "Use the keyword \"this\" if you want to reference the input data sent to this field."); 41 41 42 field->buildFilterGraph(gc, false); 42 // field->buildFilterGraph(gc, false); 43 field->buildFilterGraph(gc, false, start_graph, end_graph); 43 44 outputPin = field->getInstantDataFilter(); 44 45 } … … 55 56 56 57 57 std::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField ) const58 std::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField, Time start_graph, Time end_graph) const 58 59 { 59 60 std::shared_ptr<COutputPin> outputPin; … … 104 105 } 105 106 106 std::shared_ptr<COutputPin> CFilterUnaryOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 107 { 107 std::shared_ptr<COutputPin> CFilterUnaryOpExprNode::reduce(CGarbageCollector& gc, CField& thisField, Time start_graph, Time end_graph) const 108 { 109 std::shared_ptr<COutputPin> ch = child->reduce(gc, thisField, start_graph, end_graph); 110 108 111 std::shared_ptr<CUnaryArithmeticFilter> filter(new CUnaryArithmeticFilter(gc, opId)); 109 child->reduce(gc, thisField)->connectOutput(filter, 0); 112 ch->connectOutput(filter, 0); 113 114 (filter->parent_filters).resize(1); 115 (filter->parent_filters)[0] = ch; 116 117 filter->tag = ch->tag; 118 filter->start_graph = ch->start_graph; 119 filter->end_graph = ch->end_graph; 120 filter->field = &thisField; 121 122 110 123 return filter; 111 124 } … … 121 134 } 122 135 123 std::shared_ptr<COutputPin> CFilterScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 124 { 136 std::shared_ptr<COutputPin> CFilterScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField, Time start_graph, Time end_graph) const 137 { 138 std::shared_ptr<COutputPin> ch2 = child2->reduce(gc, thisField, start_graph, end_graph); 125 139 std::shared_ptr<CScalarFieldArithmeticFilter> filter(new CScalarFieldArithmeticFilter(gc, opId, child1->reduce())); 126 child2->reduce(gc, thisField)->connectOutput(filter, 0); 140 ch2->connectOutput(filter, 0); 141 142 (filter->parent_filters).resize(1); 143 (filter->parent_filters)[0] = ch2; 144 145 filter->tag = ch2->tag; 146 filter->start_graph = ch2->start_graph; 147 filter->end_graph = ch2->end_graph; 148 filter->field = &thisField; 149 127 150 return filter; 128 151 } … … 138 161 } 139 162 140 std::shared_ptr<COutputPin> CFilterFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 141 { 163 std::shared_ptr<COutputPin> CFilterFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField, Time start_graph, Time end_graph) const 164 { 165 std::shared_ptr<COutputPin> ch1 = child1->reduce(gc, thisField, start_graph, end_graph); 166 142 167 std::shared_ptr<CFieldScalarArithmeticFilter> filter(new CFieldScalarArithmeticFilter(gc, opId, child2->reduce())); 143 child1->reduce(gc, thisField)->connectOutput(filter, 0); 168 ch1->connectOutput(filter, 0); 169 170 (filter->parent_filters).resize(1); 171 (filter->parent_filters)[0] = ch1; 172 173 filter->tag = ch1->tag; 174 filter->start_graph = ch1->start_graph; 175 filter->end_graph = ch1->end_graph; 176 filter->field = &thisField; 177 144 178 return filter; 145 179 } … … 155 189 } 156 190 157 std::shared_ptr<COutputPin> CFilterFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 158 { 191 std::shared_ptr<COutputPin> CFilterFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField, Time start_graph, Time end_graph) const 192 { 193 std::shared_ptr<COutputPin> ch1 = child1->reduce(gc, thisField, start_graph, end_graph); 194 std::shared_ptr<COutputPin> ch2 = child2->reduce(gc, thisField, start_graph, end_graph); 195 159 196 std::shared_ptr<CFieldFieldArithmeticFilter> filter(new CFieldFieldArithmeticFilter(gc, opId)); 160 child1->reduce(gc, thisField)->connectOutput(filter, 0); 161 child2->reduce(gc, thisField)->connectOutput(filter, 1); 197 ch1->connectOutput(filter, 0); 198 ch2->connectOutput(filter, 1); 199 200 (filter->parent_filters).resize(2); 201 (filter->parent_filters)[0] = ch1; 202 (filter->parent_filters)[1] = ch2; 203 204 filter->tag = (ch1->tag || ch2->tag); 205 filter->start_graph = ch1->tag? ch1->start_graph : (ch2->tag? ch2->start_graph: -1); 206 filter->end_graph = ch1->tag? ch1->end_graph : (ch2->tag? ch2->end_graph: -1); 207 208 filter->field = &thisField; 209 210 162 211 return filter; 163 212 } … … 177 226 } 178 227 179 std::shared_ptr<COutputPin> CFilterScalarScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 180 { 228 std::shared_ptr<COutputPin> CFilterScalarScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField, Time start_graph, Time end_graph) const 229 { 230 std::shared_ptr<COutputPin> ch3 = child3->reduce(gc, thisField, start_graph, end_graph); 231 181 232 std::shared_ptr<CScalarScalarFieldArithmeticFilter> filter(new CScalarScalarFieldArithmeticFilter(gc, opId, child1->reduce(),child2->reduce())); 182 child3->reduce(gc, thisField)->connectOutput(filter, 0); 233 ch3->connectOutput(filter, 0); 234 235 (filter->parent_filters).resize(1); 236 (filter->parent_filters)[0] = ch3; 237 238 filter->tag = ch3->tag; 239 filter->start_graph = ch3->start_graph; 240 filter->end_graph = ch3->end_graph; 241 filter->field = &thisField; 242 183 243 return filter; 184 244 } … … 196 256 } 197 257 198 std::shared_ptr<COutputPin> CFilterScalarFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 199 { 258 std::shared_ptr<COutputPin> CFilterScalarFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField, Time start_graph, Time end_graph) const 259 { 260 std::shared_ptr<COutputPin> ch2 = child2->reduce(gc, thisField, start_graph, end_graph); 261 200 262 std::shared_ptr<CScalarFieldScalarArithmeticFilter> filter(new CScalarFieldScalarArithmeticFilter(gc, opId, child1->reduce(),child3->reduce())); 201 child2->reduce(gc, thisField)->connectOutput(filter, 0); 263 ch2->connectOutput(filter, 0); 264 265 (filter->parent_filters).resize(1); 266 (filter->parent_filters)[0] = ch2; 267 268 filter->tag = ch2->tag; 269 filter->start_graph = ch2->start_graph; 270 filter->end_graph = ch2->end_graph; 271 filter->field = &thisField; 272 202 273 return filter; 203 274 } … … 215 286 } 216 287 217 std::shared_ptr<COutputPin> CFilterScalarFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 218 { 288 std::shared_ptr<COutputPin> CFilterScalarFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField, Time start_graph, Time end_graph) const 289 { 290 std::shared_ptr<COutputPin> ch2 = child2->reduce(gc, thisField, start_graph, end_graph); 291 std::shared_ptr<COutputPin> ch3 = child3->reduce(gc, thisField, start_graph, end_graph); 292 219 293 std::shared_ptr<CScalarFieldFieldArithmeticFilter> filter(new CScalarFieldFieldArithmeticFilter(gc, opId, child1->reduce())); 220 child2->reduce(gc, thisField)->connectOutput(filter, 0); 221 child3->reduce(gc, thisField)->connectOutput(filter, 1); 294 ch2->connectOutput(filter, 0); 295 ch3->connectOutput(filter, 1); 296 297 (filter->parent_filters).resize(2); 298 (filter->parent_filters)[0] = ch2; 299 (filter->parent_filters)[1] = ch3; 300 301 filter->tag = (ch3->tag || ch2->tag); 302 filter->start_graph = ch3->tag? ch3->start_graph : (ch2->tag? ch2->start_graph: -1); 303 filter->end_graph = ch3->tag? ch3->end_graph : (ch2->tag? ch2->end_graph: -1); 304 filter->field = &thisField; 305 222 306 return filter; 223 307 } … … 236 320 } 237 321 238 std::shared_ptr<COutputPin> CFilterFieldScalarScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 239 { 322 std::shared_ptr<COutputPin> CFilterFieldScalarScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField, Time start_graph, Time end_graph) const 323 { 324 std::shared_ptr<COutputPin> ch1 = child1->reduce(gc, thisField, start_graph, end_graph); 325 240 326 std::shared_ptr<CFieldScalarScalarArithmeticFilter> filter(new CFieldScalarScalarArithmeticFilter(gc, opId, child2->reduce(),child3->reduce())); 241 child1->reduce(gc, thisField)->connectOutput(filter, 0); 327 ch1->connectOutput(filter, 0); 328 329 (filter->parent_filters).resize(1); 330 (filter->parent_filters)[0] = ch1; 331 332 filter->tag = ch1->tag; 333 filter->start_graph = ch1->start_graph; 334 filter->end_graph = ch1->end_graph; 335 filter->field = &thisField; 336 242 337 return filter; 243 338 } … … 256 351 } 257 352 258 std::shared_ptr<COutputPin> CFilterFieldScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 259 { 353 std::shared_ptr<COutputPin> CFilterFieldScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField, Time start_graph, Time end_graph) const 354 { 355 std::shared_ptr<COutputPin> ch1 = child1->reduce(gc, thisField, start_graph, end_graph); 356 std::shared_ptr<COutputPin> ch3 = child3->reduce(gc, thisField, start_graph, end_graph); 357 260 358 std::shared_ptr<CFieldScalarFieldArithmeticFilter> filter(new CFieldScalarFieldArithmeticFilter(gc, opId, child2->reduce())); 261 child1->reduce(gc, thisField)->connectOutput(filter, 0); 262 child3->reduce(gc, thisField)->connectOutput(filter, 1); 359 ch1->connectOutput(filter, 0); 360 ch3->connectOutput(filter, 1); 361 362 (filter->parent_filters).resize(2); 363 (filter->parent_filters)[0] = ch1; 364 (filter->parent_filters)[1] = ch3; 365 366 filter->tag = (ch3->tag || ch1->tag); 367 filter->start_graph = ch3->tag? ch3->start_graph : (ch1->tag? ch1->start_graph: -1); 368 filter->end_graph = ch3->tag? ch3->end_graph : (ch1->tag? ch1->end_graph: -1); 369 filter->field = &thisField; 370 263 371 return filter; 264 372 } … … 277 385 } 278 386 279 std::shared_ptr<COutputPin> CFilterFieldFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 280 { 387 std::shared_ptr<COutputPin> CFilterFieldFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField, Time start_graph, Time end_graph) const 388 { 389 std::shared_ptr<COutputPin> ch1 = child1->reduce(gc, thisField, start_graph, end_graph); 390 std::shared_ptr<COutputPin> ch2 = child2->reduce(gc, thisField, start_graph, end_graph); 391 281 392 std::shared_ptr<CFieldFieldScalarArithmeticFilter> filter(new CFieldFieldScalarArithmeticFilter(gc, opId, child3->reduce())); 282 child1->reduce(gc, thisField)->connectOutput(filter, 0); 283 child2->reduce(gc, thisField)->connectOutput(filter, 1); 393 ch1->connectOutput(filter, 0); 394 ch2->connectOutput(filter, 1); 395 396 (filter->parent_filters).resize(2); 397 (filter->parent_filters)[0] = ch1; 398 (filter->parent_filters)[1] = ch2; 399 400 filter->tag = (ch2->tag || ch1->tag); 401 filter->start_graph = ch2->tag? ch2->start_graph : (ch1->tag? ch1->start_graph: -1); 402 filter->end_graph = ch2->tag? ch2->end_graph : (ch1->tag? ch1->end_graph: -1); 403 filter->field = &thisField; 284 404 return filter; 285 405 } … … 297 417 } 298 418 299 std::shared_ptr<COutputPin> CFilterFieldFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 300 { 419 std::shared_ptr<COutputPin> CFilterFieldFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField, Time start_graph, Time end_graph) const 420 { 421 std::shared_ptr<COutputPin> ch1 = child1->reduce(gc, thisField, start_graph, end_graph); 422 std::shared_ptr<COutputPin> ch2 = child2->reduce(gc, thisField, start_graph, end_graph); 423 std::shared_ptr<COutputPin> ch3 = child3->reduce(gc, thisField, start_graph, end_graph); 424 301 425 std::shared_ptr<CFieldFieldFieldArithmeticFilter> filter(new CFieldFieldFieldArithmeticFilter(gc, opId)); 302 child1->reduce(gc, thisField)->connectOutput(filter, 0); 303 child2->reduce(gc, thisField)->connectOutput(filter, 1); 304 child3->reduce(gc, thisField)->connectOutput(filter, 2); 426 std::cout<<"std::shared_ptr<CFieldFieldFieldArithmeticFilter> filter(new CFieldFieldFieldArithmeticFilter(gc, opId))" <<std::endl; 427 ch1->connectOutput(filter, 0); 428 ch2->connectOutput(filter, 1); 429 ch3->connectOutput(filter, 2); 430 431 (filter->parent_filters).resize(3); 432 (filter->parent_filters)[0] = ch1; 433 (filter->parent_filters)[1] = ch2; 434 (filter->parent_filters)[2] = ch3; 435 436 437 filter->tag = (ch1->tag || ch1->tag || ch3->tag); 438 filter->start_graph = ch1->tag? ch1->start_graph : (ch2->tag? ch2->start_graph: (ch3->tag? ch3->start_graph: -1)); 439 filter->end_graph = ch1->tag? ch1->end_graph : (ch2->tag? ch2->end_graph: (ch3->tag? ch3->end_graph: -1)); 440 filter->field = &thisField; 441 442 305 443 return filter; 306 444 } -
XIOS/trunk/src/parse_expr/filter_expr_node.hpp
r1542 r1704 5 5 #include <boost/smart_ptr/scoped_ptr.hpp> 6 6 #include "scalar_expr_node.hpp" 7 8 #include "duration.hpp" 7 9 8 10 namespace xios … … 25 27 * \return the output pin of the filter producing the result of the expression 26 28 */ 27 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField ) const = 0;29 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField, Time start_graph=-1, Time end_graph=-1) const = 0; 28 30 }; 29 31 … … 42 44 CFilterFieldExprNode(const std::string& fieldId); 43 45 44 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField ) const;46 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField, Time start_graph=-1, Time end_graph=-1) const; 45 47 46 48 private: … … 63 65 CFilterTemporalFieldExprNode(const std::string& fieldId); 64 66 65 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField ) const;67 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField, Time start_graph=-1, Time end_graph=-1) const; 66 68 67 69 private: … … 86 88 CFilterUnaryOpExprNode(const std::string& opId, IFilterExprNode* child); 87 89 88 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField ) const;90 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField, Time start_graph=-1, Time end_graph=-1) const; 89 91 90 92 private: … … 111 113 CFilterScalarFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2); 112 114 113 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField ) const;115 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField, Time start_graph=-1, Time end_graph=-1) const; 114 116 115 117 private: … … 137 139 CFilterFieldScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2); 138 140 139 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField ) const;141 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField, Time start_graph=-1, Time end_graph=-1) const; 140 142 141 143 private: … … 162 164 CFilterFieldFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2); 163 165 164 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField ) const;166 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField, Time start_graph=-1, Time end_graph=-1) const; 165 167 166 168 private: … … 190 192 CFilterScalarScalarFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IScalarExprNode* child2, IFilterExprNode* child3); 191 193 192 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField ) const;194 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField, Time start_graph=-1, Time end_graph=-1) const; 193 195 194 196 private: … … 219 221 CFilterScalarFieldScalarOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2, IScalarExprNode* child3); 220 222 221 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField ) const;223 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField, Time start_graph=-1, Time end_graph=-1) const; 222 224 223 225 private: … … 248 250 CFilterScalarFieldFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2, IFilterExprNode* child3); 249 251 250 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField ) const;252 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField, Time start_graph=-1, Time end_graph=-1) const; 251 253 252 254 private: … … 278 280 CFilterFieldScalarScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2, IScalarExprNode* child3); 279 281 280 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField ) const;282 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField, Time start_graph=-1, Time end_graph=-1) const; 281 283 282 284 private: … … 307 309 CFilterFieldScalarFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2, IFilterExprNode* child3); 308 310 309 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField ) const;311 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField, Time start_graph=-1, Time end_graph=-1) const; 310 312 311 313 private: … … 335 337 CFilterFieldFieldScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2, IScalarExprNode* child3); 336 338 337 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField ) const;339 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField, Time start_graph=-1, Time end_graph=-1) const; 338 340 339 341 private: … … 364 366 CFilterFieldFieldFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2, IFilterExprNode* child3); 365 367 366 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField ) const;368 virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField, Time start_graph=-1, Time end_graph=-1) const; 367 369 368 370 private: -
XIOS/trunk/src/parse_expr/yacc_parser.cpp
r1158 r1704 70 70 #include "exception.hpp" 71 71 72 #include "yacc_var.hpp" 73 72 74 using namespace std; 73 75 using namespace xios; … … 84 86 size_t globalReadOffset = 0; 85 87 88 std::string *xios::yacc_globalInputText_ptr = 0; 89 86 90 int readInputForLexer(char* buffer, size_t* numBytesRead, size_t maxBytesToRead) 87 91 { 92 yacc_globalInputText_ptr = &globalInputText; 93 //*yacc_globalInputText_ptr = globalInputText; 94 95 std::cout<<"========= yacc_globalInputText_ptr = "<<*yacc_globalInputText_ptr<<std::endl; 96 88 97 size_t numBytesToRead = maxBytesToRead; 89 98 size_t bytesRemaining = globalInputText.length()-globalReadOffset; -
XIOS/trunk/src/test/test_client.f90
r1202 r1704 132 132 PRINT*,"field field_A is active ? ",xios_field_is_active("field_A") 133 133 ! CALL xios_recv_field("field", scalar) 134 DO ts=1, 4134 DO ts=1,24 135 135 CALL xios_update_calendar(ts) 136 136 CALL xios_send_field("field_A",field_A) 137 CALL xios_send_field("field_Axis",axisValue) 137 CALL xios_send_field("field_B",field_A) 138 CALL xios_send_field("field_C",field_A) 139 ! CALL xios_send_field("field_Axis",axisValue) 138 140 ! CALL xios_send_field("field_Axis",lval) 139 CALL xios_send_field("field_Domain",field_domain)140 CALL xios_send_field("field_Scalar",scalar)141 ! CALL xios_send_field("field_Domain",field_domain) 142 ! CALL xios_send_field("field_Scalar",scalar) 141 143 CALL wait_us(5000) ; 142 144 ENDDO -
XIOS/trunk/src/transformation/Functions/average_reduction.hpp
r1260 r1704 33 33 virtual ~CAverageReductionAlgorithm() {} 34 34 35 virtual StdString getName() {return "Average reduction";} 36 35 37 protected: 36 38 CArray<double,1> weights_; -
XIOS/trunk/src/transformation/Functions/extract.hpp
r1260 r1704 31 31 virtual ~CExtractReductionAlgorithm() {} 32 32 33 virtual StdString getName() {return "Extract reduction";} 34 33 35 public: 34 36 static bool registerTrans(); -
XIOS/trunk/src/transformation/Functions/max_reduction.hpp
r1260 r1704 31 31 virtual ~CMaxReductionAlgorithm() {} 32 32 33 virtual StdString getName() {return "Max reduction";} 34 33 35 public: 34 36 static bool registerTrans(); -
XIOS/trunk/src/transformation/Functions/min_reduction.hpp
r1260 r1704 31 31 virtual ~CMinReductionAlgorithm() {} 32 32 33 virtual StdString getName() {return "Min reduction";} 34 33 35 public: 34 36 static bool registerTrans(); -
XIOS/trunk/src/transformation/Functions/reduction.hpp
r1260 r1704 57 57 virtual ~CReductionAlgorithm() {} 58 58 59 virtual StdString getName() {return "Reduction";} 60 59 61 protected: 60 62 typedef CReductionAlgorithm* (*CreateOperationCallBack)(); -
XIOS/trunk/src/transformation/Functions/sum_reduction.hpp
r1260 r1704 31 31 virtual ~CSumReductionAlgorithm() {} 32 32 33 virtual StdString getName() {return "Sum reduction";} 34 33 35 public: 34 36 static bool registerTrans(); -
XIOS/trunk/src/transformation/axis_algorithm_duplicate_scalar.hpp
r1314 r1704 33 33 static bool registerTrans(); 34 34 35 virtual StdString getName() {return "Axis Trans. Filter \\n Duplicate Scalar";} 36 35 37 protected: 36 38 void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); -
XIOS/trunk/src/transformation/axis_algorithm_extract.hpp
r1558 r1704 27 27 28 28 static bool registerTrans(); 29 30 virtual StdString getName() {return "Axis Trans. Filter \\n Extract";} 31 29 32 protected: 30 33 void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); -
XIOS/trunk/src/transformation/axis_algorithm_extract_domain.hpp
r1260 r1704 39 39 40 40 static bool registerTrans(); 41 42 virtual StdString getName() {return "Axis Trans. Filter \\n Extract Domain";} 43 41 44 protected: 42 45 enum ExtractDirection { -
XIOS/trunk/src/transformation/axis_algorithm_interpolate.hpp
r933 r1704 32 32 33 33 static bool registerTrans(); 34 35 virtual StdString getName() {return "Axis Trans. Filter \\n Interpolation";} 36 34 37 protected: 35 38 void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); -
XIOS/trunk/src/transformation/axis_algorithm_inverse.hpp
r933 r1704 31 31 static bool registerTrans(); 32 32 33 virtual StdString getName() {return "Axis Trans. Filter \\n Inverse";} 34 33 35 protected: 34 36 void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); -
XIOS/trunk/src/transformation/axis_algorithm_reduce_axis.hpp
r1314 r1704 39 39 40 40 static bool registerTrans(); 41 42 virtual StdString getName() {return "Axis Trans. Filter \\n Reduce Axis";} 41 43 protected: 42 44 -
XIOS/trunk/src/transformation/axis_algorithm_reduce_domain.hpp
r1299 r1704 40 40 41 41 static bool registerTrans(); 42 43 virtual StdString getName() {return "Axis Trans. Filter \\n Reduce Domain";} 44 42 45 protected: 43 46 enum ReduceDirection { -
XIOS/trunk/src/transformation/axis_algorithm_temporal_splitting.hpp
r1275 r1704 34 34 static bool registerTrans(); 35 35 36 virtual StdString getName() {return "Axis Trans. Filter \\n Temporal Splitting";} 37 36 38 protected: 37 39 void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); -
XIOS/trunk/src/transformation/axis_algorithm_transformation.hpp
r1275 r1704 31 31 virtual ~CAxisAlgorithmTransformation(); 32 32 33 virtual StdString getName() {return "Axis Trans. Filter \\n Transformation";} 34 33 35 protected: 34 36 void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); -
XIOS/trunk/src/transformation/axis_algorithm_zoom.hpp
r1559 r1704 27 27 28 28 static bool registerTrans(); 29 30 virtual StdString getName() {return "Axis Trans. Filter \\n Zoom";} 31 29 32 protected: 30 33 void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); -
XIOS/trunk/src/transformation/domain_algorithm_compute_connectivity.hpp
r944 r1704 28 28 29 29 static bool registerTrans(); 30 31 virtual StdString getName() {return "Domain Trans. Filter \\n Compute Connectivity";} 32 30 33 protected: 31 34 void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); -
XIOS/trunk/src/transformation/domain_algorithm_expand.hpp
r1158 r1704 28 28 29 29 static bool registerTrans(); 30 31 virtual StdString getName() {return "Domain Trans. Filter \\n Expand";} 30 32 31 33 protected: -
XIOS/trunk/src/transformation/domain_algorithm_extract.hpp
r1549 r1704 23 23 24 24 static bool registerTrans(); 25 26 virtual StdString getName() {return "Domain Trans. Filter \\n Extract";} 25 27 protected: 26 28 void updateDomainAttributes(); -
XIOS/trunk/src/transformation/domain_algorithm_generate_rectilinear.hpp
r1410 r1704 33 33 virtual ~CDomainAlgorithmGenerateRectilinear() {} 34 34 35 virtual StdString getName() {return "Domain Trans. Filter \\n Generate Rectilinear";} 36 35 37 protected: 36 38 void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); -
XIOS/trunk/src/transformation/domain_algorithm_interpolate.hpp
r1641 r1704 39 39 40 40 static bool registerTrans(); 41 42 virtual StdString getName() {return "Domain Trans. Filter \\n Interpolation";} 43 41 44 protected: 42 45 void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); -
XIOS/trunk/src/transformation/domain_algorithm_reorder.hpp
r1457 r1704 26 26 static bool registerTrans(); 27 27 28 virtual StdString getName() {return "Domain Trans. Filter \\n Reorder";} 29 28 30 protected: 29 31 void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); -
XIOS/trunk/src/transformation/domain_algorithm_transformation.hpp
r888 r1704 27 27 virtual ~CDomainAlgorithmTransformation(); 28 28 29 virtual StdString getName() {return "Domain Trans. Filter \\n Transformation";} 30 29 31 protected: 30 32 void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >&); -
XIOS/trunk/src/transformation/domain_algorithm_zoom.hpp
r1553 r1704 23 23 24 24 static bool registerTrans(); 25 26 virtual StdString getName() {return "Domain Trans. Filter \\n Zoom";} 25 27 protected: 26 28 void updateDomainAttributes(); -
XIOS/trunk/src/transformation/generic_algorithm_transformation.hpp
r1637 r1704 73 73 std::vector<bool>& flagInitial, 74 74 bool ignoreMissingValue, bool firstPass); 75 76 virtual StdString getName() {return "Generic Trans. Filter";} 75 77 76 78 /*! -
XIOS/trunk/src/transformation/scalar_algorithm_extract_axis.hpp
r1260 r1704 39 39 static bool registerTrans(); 40 40 41 virtual StdString getName() {return "Scalar Trans. Filter \\n Extract Axis";} 42 41 43 protected: 42 44 int pos_; -
XIOS/trunk/src/transformation/scalar_algorithm_reduce_axis.cpp
r1622 r1704 13 13 #include "grid.hpp" 14 14 #include "grid_transformation_factory_impl.hpp" 15 #include "reduction.hpp"16 15 17 16 #include "reduction.hpp" -
XIOS/trunk/src/transformation/scalar_algorithm_reduce_axis.hpp
r1260 r1704 40 40 41 41 static bool registerTrans(); 42 43 virtual StdString getName() {return "Scalar Trans. Filter \\n Reduce Axis";} 44 42 45 protected: 43 46 void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); -
XIOS/trunk/src/transformation/scalar_algorithm_reduce_domain.hpp
r1313 r1704 40 40 41 41 static bool registerTrans(); 42 43 virtual StdString getName() {return "Scalar Trans. Filter \\n Reduce Domain";} 44 42 45 protected: 43 46 bool local ; -
XIOS/trunk/src/transformation/scalar_algorithm_reduce_scalar.hpp
r1314 r1704 35 35 36 36 static bool registerTrans(); 37 38 virtual StdString getName() {return "Scalar Trans. Filter \\n Reduce Scalar";} 39 37 40 protected: 38 41 void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); -
XIOS/trunk/src/transformation/scalar_algorithm_transformation.hpp
r888 r1704 31 31 virtual ~CScalarAlgorithmTransformation(); 32 32 33 virtual StdString getName() {return "Scalar Trans. Filter \\n Transformation";} 34 33 35 protected: 34 36 void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
Note: See TracChangeset
for help on using the changeset viewer.