Changeset 2632


Ignore:
Timestamp:
05/29/24 19:23:08 (5 weeks ago)
Author:
ymipsl
Message:
  • Recheck grid/domain/axis/scalar after reading grid from file, otherwise some attributes are not taking into account.

YM

Location:
XIOS3/trunk/src/node
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/node/axis.cpp

    r2613 r2632  
    279279   */ 
    280280    
    281    void CAxis::checkAttributes(void) 
    282    { 
    283       if (checkAttributes_done_) return ; 
     281   void CAxis::checkAttributes(bool recheck) 
     282   { 
     283      if (!recheck && checkAttributes_done_) return ; 
    284284      checkGeometricAttributes(true) ; 
    285285      initializeLocalElement() ; 
     
    291291   } 
    292292    
    293    void CAxis::resetGeometricAttributes(void) 
     293    void CAxis::resetGeometricAttributes(void) 
    294294   { 
    295295     n_glo.reset(); 
  • XIOS3/trunk/src/node/axis.hpp

    r2507 r2632  
    124124         
    125125         /// Vérifications /// 
    126          void checkAttributes(void); 
     126         void checkAttributes(bool recheck=false); 
    127127         bool checkAttributes_done_ = false ; 
    128128         bool checkGeometricAttributes(bool generateError) ;  
  • XIOS3/trunk/src/node/domain.cpp

    r2613 r2632  
    17601760   CATCH_DUMP_ATTR 
    17611761 
    1762    void CDomain::checkAttributes(void) 
    1763    TRY 
    1764    { 
    1765       if (this->checkAttributes_done_) return; 
     1762   void CDomain::checkAttributes(bool recheck) 
     1763   TRY 
     1764   { 
     1765      if (!recheck && checkAttributes_done_) return ; 
    17661766      this->checkDomain(); 
    17671767      this->compute2dBox() ; 
     
    18041804   } 
    18051805   CATCH_DUMP_ATTR 
     1806 
     1807 
    18061808 
    18071809   size_t CDomain::computeAttributesHash( MPI_Comm comm ) 
  • XIOS3/trunk/src/node/domain.hpp

    r2507 r2632  
    8888 
    8989         /// Vérifications /// 
    90          void checkAttributes(void); 
     90         void checkAttributes(bool recheck=false); 
    9191         bool checkAttributes_done_ = false ; 
    9292 
  • XIOS3/trunk/src/node/field.cpp

    r2629 r2632  
    749749         //grid_->completeGrid(); // grid generation, to be checked 
    750750         if (fileIn_->isClientSide()) fileIn_->readFieldAttributesValues(this); 
    751          grid_->checkElementsAttributes() ; 
     751         grid_->checkElementsAttributes(true) ; // need to recheck 
    752752//         grid_->solveDomainAxisBaseRef(); 
    753753         // probably in future tag grid incomplete if coming from a reading 
     
    781781      } 
    782782    } 
     783 
     784    // do again ref inheritance for field attributes read from file 
     785    this->solveRefInheritance(); 
    783786 
    784787    buildWorkflowGraphDone_ = true ; 
  • XIOS3/trunk/src/node/grid.cpp

    r2507 r2632  
    19741974  \brief check attributes of all elements of the grid 
    19751975  */ 
    1976   void CGrid::checkElementsAttributes(void) 
     1976  void CGrid::checkElementsAttributes(bool recheck) 
    19771977  TRY 
    19781978  { 
    19791979    setDomainList(); 
    1980     for (auto domainId : domList_) CDomain::get(domainId)->checkAttributes(); 
     1980    for (auto domainId : domList_) CDomain::get(domainId)->checkAttributes(recheck); 
    19811981 
    19821982    setAxisList(); 
    1983     for (auto axisId : axisList_) CAxis::get(axisId)->checkAttributes(); 
     1983    for (auto axisId : axisList_) CAxis::get(axisId)->checkAttributes(recheck); 
    19841984     
    19851985    setScalarList(); 
    1986     for (auto scalarId : scalarList_) CScalar::get(scalarId)->checkAttributes(); 
     1986    for (auto scalarId : scalarList_) CScalar::get(scalarId)->checkAttributes(recheck); 
    19871987  } 
    19881988  CATCH_DUMP_ATTR 
  • XIOS3/trunk/src/node/grid.hpp

    r2507 r2632  
    157157      public:             
    158158         void solveDomainAxisRef(bool areAttributesChecked); 
    159          void checkElementsAttributes(void) ; 
     159         void checkElementsAttributes(bool recheck=false) ; 
    160160 
    161161         void solveDomainRef(bool checkAtt); 
  • XIOS3/trunk/src/node/scalar.cpp

    r2507 r2632  
    116116  } 
    117117 
    118   void CScalar::checkAttributes(void) 
    119   { 
    120     if (checkAttributes_done_) return ; 
     118  void CScalar::checkAttributes(bool recheck) 
     119  { 
     120    if (!recheck && checkAttributes_done_) return ; 
    121121    checkAttributes_done_ = true ;  
    122122     
     
    134134    addModelView() ; 
    135135  } 
    136  
     136  
    137137  /*! 
    138138    Compare two scalar objects.  
  • XIOS3/trunk/src/node/scalar.hpp

    r2507 r2632  
    8888 
    8989    public: 
    90       void checkAttributes(void); 
     90      void checkAttributes(bool recheck=false); 
    9191      bool checkAttributes_done_ = false ; 
    9292             
Note: See TracChangeset for help on using the changeset viewer.