Ignore:
Timestamp:
01/20/14 11:16:48 (10 years ago)
Author:
ymipsl
Message:

New functionnalities : expression may combine fields after temporal operation (averaging, min, max ...) using the operator @

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/field_impl.hpp

    r459 r460  
    2828      
    2929      for (; it != end; it++) (*it)->setData(_data) ; 
    30       if (hasOutputFile) updateData(_data) ; 
     30      if (hasOutputFile || hasFieldOut) updateData(_data) ; 
    3131    } 
    3232      
    3333  } 
    3434 
     35  void CField::setDataFromExpression(const CArray<double, 1>& _data) 
     36  { 
     37    if (hasInstantData)  
     38    { 
     39      instantData=_data;  
     40      for(list< pair<CField *,int> >::iterator it=fieldDependency.begin(); it!=fieldDependency.end(); ++it)  it->first->setSlot(it->second) ; 
     41    } 
     42     
     43    if (!hasExpression) 
     44    { 
     45      const std::vector<CField*>& refField=getAllReference(); 
     46      std::vector<CField*>::const_iterator  it = refField.begin(), end = refField.end(); 
     47      
     48      for (; it != end; it++) (*it)->setData(_data) ; 
     49      if (hasOutputFile || hasFieldOut) updateData(_data) ; 
     50    } 
     51      
     52  } 
    3553 
    3654   template <int N> 
     
    82100         this->foperation->final(); 
    83101         *last_Write = writeDate; 
    84          info(50) << "(*last_Write = currDate) : " << *last_Write << " = " << currDate << std::endl; 
    85          CTimer::get("XIOS Send Data").resume() ; 
    86          sendUpdateData() ; 
    87          CTimer::get("XIOS Send Data").suspend() ; 
     102         if (hasOutputFile) 
     103         { 
     104           info(50) << "(*last_Write = currDate) : " << *last_Write << " = " << currDate << std::endl; 
     105           CTimer::get("XIOS Send Data").resume() ; 
     106           sendUpdateData() ; 
     107           CTimer::get("XIOS Send Data").suspend() ; 
     108         } 
     109          
     110         if (hasFieldOut) 
     111         { 
     112           fieldOut->setDataFromExpression(data) ; 
     113         } 
    88114         return (true);         
    89115      } 
Note: See TracChangeset for help on using the changeset viewer.