Changeset 2206 for XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.cpp
- Timestamp:
- 08/24/21 13:48:12 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.cpp
r2203 r2206 327 327 CATCH 328 328 329 CDomain* CField::getAssociatedDomain(const string& domainId) const 330 { 331 if (grid_==nullptr) ERROR("CDomain* CField::getAssociatedDomain(const string& domainId)", <<" field with id="<<getId()<<" has no associated grid, " 329 CDomain* CField::getAssociatedDomain(const string& domainId, bool noError) const 330 { 331 if (grid_==nullptr) 332 { 333 if (noError) return nullptr ; 334 else ERROR("CDomain* CField::getAssociatedDomain(const string& domainId)", <<" field with id="<<getId()<<" has no associated grid, " 332 335 <<"check if the worklfow is enabled for this field"); 333 grid_->getAssociatedDomain(domainId) ; 334 } 335 336 CAxis* CField::getAssociatedAxis(const string& axisId) const 337 { 338 if (grid_==nullptr) ERROR("CAxis* CField::getAssociatedAxis(const string& axisId)", <<" field with id="<<getId()<<" has no associated grid, " 336 } 337 return grid_->getAssociatedDomain(domainId, noError) ; 338 } 339 340 CAxis* CField::getAssociatedAxis(const string& axisId, bool noError) const 341 { 342 if (grid_==nullptr) 343 { 344 if (noError) return nullptr ; 345 else ERROR("CAxis* CField::getAssociatedAxis(const string& axisId)", <<" field with id="<<getId()<<" has no associated grid, " 339 346 <<"check if the worklfow is enabled for this field"); 340 grid_->getAssociatedAxis(axisId) ; 341 } 342 343 CScalar* CField::getAssociatedScalar(const string& scalarId) const 344 { 345 if (grid_==nullptr) ERROR("CScalar* CField::getAssociatedScalar(const string& scalarId)", <<" field with id="<<getId()<<" has no associated grid, " 347 } 348 return grid_->getAssociatedAxis(axisId, noError) ; 349 } 350 351 CScalar* CField::getAssociatedScalar(const string& scalarId, bool noError) const 352 { 353 if (grid_==nullptr) 354 { 355 if (noError) return nullptr ; 356 else ERROR("CScalar* CField::getAssociatedScalar(const string& scalarId)", <<" field with id="<<getId()<<" has no associated grid, " 346 357 <<"check if the worklfow is enabled for this field"); 347 grid_->getAssociatedScalar(scalarId) ; 358 } 359 return grid_->getAssociatedScalar(scalarId, noError) ; 348 360 } 349 361 … … 618 630 solveGridReference() ; // grid_ is now defined 619 631 if (!isGridCompleted()) return false; 632 if (grid_->activateFieldWorkflow(gc)==false) return false; // workflow graph cannot be built at this stage 620 633 621 634 // Check if we have an expression to parse … … 1181 1194 if (!domain_ref.isEmpty()) 1182 1195 { 1183 StdString tmp = domain_ref.getValue(); 1196 CField* field=CDomain::getFieldFromId(domain_ref) ; 1197 if (field!=nullptr) field->solveGridReference() ; 1184 1198 if (CDomain::has(domain_ref)) 1185 1199 { … … 1195 1209 if (!axis_ref.isEmpty()) 1196 1210 { 1211 CField* field=CAxis::getFieldFromId(axis_ref) ; 1212 if (field!=nullptr) field->solveGridReference() ; 1197 1213 if (CAxis::has(axis_ref)) 1198 1214 { … … 1208 1224 if (!scalar_ref.isEmpty()) 1209 1225 { 1226 CField* field=CScalar::getFieldFromId(scalar_ref) ; 1227 if (field!=nullptr) field->solveGridReference() ; 1210 1228 if (CScalar::has(scalar_ref)) 1211 1229 {
Note: See TracChangeset
for help on using the changeset viewer.