Ignore:
Timestamp:
02/24/12 01:33:38 (12 years ago)
Author:
ymipsl
Message:

port to gfortran/g++

YM

File:
1 edited

Legend:

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

    r321 r327  
    166166} // namespace xmlioserver 
    167167 
    168 #include "grid.hpp" 
    169  
    170 namespace xmlioserver { 
    171 namespace tree { 
    172  
    173    template <StdSize N> 
    174    void CField::setData(const ARRAY(double, N) _data) 
    175    { 
    176      const std::vector<boost::shared_ptr<CField> > & refField=getAllReference(); 
    177      std::vector<boost::shared_ptr<CField> >::const_iterator  it = refField.begin(), end = refField.end(); 
    178       
    179      for (; it != end; it++) (*it)->updateData(_data) ; 
    180     } 
    181      
    182    template <StdSize N> 
    183       bool CField::updateData(const ARRAY(double, N) _data) 
    184    {         
    185       shared_ptr<CContext> context=CObjectFactory::GetObject<CContext>(CObjectFactory::GetCurrentContextId()) ; 
    186       const date::CDate & currDate = context->getCalendar()->getCurrentDate(); 
    187       const date::CDate opeDate      = *last_operation + freq_operation; 
    188       const date::CDate writeDate    = *last_Write     + freq_write;        
    189  
    190     
    191       info(50) << "CField::updateData " << currDate <<  " : send data to " << this->getBaseFieldId() << std::endl; 
    192       info(50) << "Next operation "  << opeDate<<std::endl; 
    193  
    194       if (opeDate <= currDate) 
    195       { 
    196          if (this->data->num_elements() != this->grid->storeIndex_client->num_elements()) 
    197          { 
    198             this->data->resize(boost::extents[this->grid->storeIndex_client ->num_elements()]); 
    199          } 
    200              
    201          ARRAY_CREATE(input, double, 1, [this->data->num_elements()]); 
    202          this->grid->inputField(_data, input);           
    203          (*this->foperation)(input); 
    204           
    205          *last_operation = currDate; 
    206          info(50) << "(*last_operation = currDate) : " << *last_operation << " = " << currDate << std::endl;  
    207       } 
    208        
    209       if (writeDate < (currDate + freq_operation)) 
    210       { 
    211          this->foperation->final(); 
    212          *last_Write = writeDate; 
    213          info(50) << "(*last_Write = currDate) : " << *last_Write << " = " << currDate  << std::endl; 
    214          sendUpdateData() ; 
    215          return (true);         
    216       } 
    217  
    218       return (false); 
    219    } 
    220  
    221 } // namespace tree 
    222 } // namespace xmlioserver 
    223168 
    224169#endif // __XMLIO_CField__ 
Note: See TracChangeset for help on using the changeset viewer.