Changeset 2305


Ignore:
Timestamp:
03/08/22 12:30:26 (2 years ago)
Author:
ymipsl
Message:

Fix bug when calling to "xios_solve_inheritance" that inhibit transformation chaining.

YM

Location:
XIOS/dev/dev_ym/XIOS_COUPLING/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/attribute_array_impl.hpp

    r2146 r2305  
    113113    bool CAttributeArray<T_numtype,N_rank>::isEqual_(const CAttributeArray& attr) 
    114114    { 
    115       if ((!this->hasInheritedValue() && !attr.hasInheritedValue())) 
    116           return true; 
    117       if (this->hasInheritedValue() && attr.hasInheritedValue()) 
    118           return (this->getInheritedValue() == attr.getInheritedValue()); 
    119       else  
    120         return false;       
     115      if (this->isEmpty() && attr.isEmpty()) return true ; 
     116      if (!this->isEmpty() && !attr.isEmpty())  return (this->getValue() == attr.getValue()); 
     117      else return false;   
    121118    } 
    122119 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/attribute_enum_impl.hpp

    r2146 r2305  
    121121  bool CAttributeEnum<T>::isEqual_(const CAttributeEnum& attr) 
    122122  { 
    123     if ((!this->hasInheritedValue() && !attr.hasInheritedValue())) 
    124         return true; 
    125     if (this->hasInheritedValue() && attr.hasInheritedValue()) 
    126         return (this->getInheritedValue() == attr.getInheritedValue()); 
    127     else  
    128       return false;     
     123    if (this->isEmpty() && attr.isEmpty()) return true ; 
     124    if (!this->isEmpty() && !attr.isEmpty())  return (this->getValue() == attr.getValue()); 
     125    else return false; 
    129126  } 
    130127 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/attribute_template_impl.hpp

    r2146 r2305  
    165165    bool CAttributeTemplate<T>::isEqual_(const CAttributeTemplate& attr) 
    166166    { 
    167       if ((!this->hasInheritedValue() && !attr.hasInheritedValue())) 
    168           return true; 
    169       if (this->hasInheritedValue() && attr.hasInheritedValue()) 
    170           return (this->getInheritedValue() == attr.getInheritedValue()); 
    171       else  
    172         return false; 
     167      if (this->isEmpty() && attr.isEmpty()) return true ; 
     168      if (!this->isEmpty() && !attr.isEmpty())  return (this->getValue() == attr.getValue()); 
     169      else return false; 
    173170    } 
    174171 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/declare_ref_func.hpp

    r2203 r2305  
    5050    refObjects.push_back(refer_ptr);                                   \ 
    5151    SuperClassAttribute::setAttributes(refer_ptr, apply);              \ 
    52     setInheritedId(refer_ptr) ;                                        \ 
     52    if (apply) setInheritedId(refer_ptr) ;                                        \ 
    5353  }                                                                    \ 
    5454}                                                                      \ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.cpp

    r2304 r2305  
    18101810      CDomain* pDom = CDomain::get(domainId); 
    18111811      pDom->solveRefInheritance(apply); 
    1812       pDom->solveInheritanceTransformation(); 
     1812      if (apply) pDom->solveInheritanceTransformation(); 
    18131813    } 
    18141814 
     
    18181818      CAxis* pAxis = CAxis::get(axisId); 
    18191819      pAxis->solveRefInheritance(apply); 
    1820       pAxis->solveInheritanceTransformation(); 
     1820      if (apply) pAxis->solveInheritanceTransformation(); 
    18211821    } 
    18221822 
     
    18261826      CScalar* pScalar = CScalar::get(scalarId); 
    18271827      pScalar->solveRefInheritance(apply); 
    1828       pScalar->solveInheritanceTransformation(); 
     1828      if (apply) pScalar->solveInheritanceTransformation(); 
    18291829    } 
    18301830  } 
Note: See TracChangeset for help on using the changeset viewer.