Ignore:
Timestamp:
08/20/21 14:38:23 (3 years ago)
Author:
ymipsl
Message:

New functionnality : domain, axis and scalar can now be retrieve with new syntax id :
ex. for domain :

id="domainId" : old syntax, working as before
id="fieldId::domainId" : get the domain related to "domainId" associated to the field "fieldId", work if only 1 domain related to domainId is associated to the field.
id="fieldId::domainId[n]" : get the nth domain related to "domainId" associated to the field "fieldId"
id="fieldId::" : get the domain associated the the field "fieldId, work if grid associated to th field is composed with exactly 1 domain (and possibly other components axis or scalars)
id="fieldId::[n] : get the nth domain composing the grid associated to the field

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.cpp

    r2193 r2203  
    326326  } 
    327327  CATCH 
     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, " 
     332                              <<"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, " 
     339                              <<"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, " 
     346                              <<"check if the worklfow is enabled for this field"); 
     347    grid_->getAssociatedScalar(scalarId) ; 
     348  } 
     349 
    328350 
    329351  func::CFunctor::ETimeType CField::getOperationTimeType() const 
Note: See TracChangeset for help on using the changeset viewer.