Ignore:
Timestamp:
05/26/15 16:13:45 (9 years ago)
Author:
rlacroix
Message:

Add a new interface xios_recv_field to get local instant data from a field.

File:
1 edited

Legend:

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

    r591 r593  
    9999         /// Entrées-sorties de champs /// 
    100100         template <int n> 
    101             void inputField(const CArray<double,n>& field, CArray<double,1>& stored) const; 
     101         void inputField(const CArray<double,n>& field, CArray<double,1>& stored) const; 
     102         template <int n> 
     103         void outputField(const CArray<double,1>& stored, CArray<double,n>& field) const; 
    102104 
    103105         void inputFieldServer(const std::deque< CArray<double, 1>* > storedClient, 
     
    131133         /// Entrées-sorties de champs (interne) /// 
    132134         void storeField_arr(const double * const data, CArray<double,1>& stored) const; 
     135         void restoreField_arr(const CArray<double,1>& stored, double * const data) const; 
    133136 
    134137         /// Traitements protégés /// 
     
    183186         std::deque< CArray<int, 1>* > storeIndex ; 
    184187        CArray<int, 1>  storeIndex_client ; 
    185  
    186188 
    187189         map<int, CArray<int, 1>* >  storeIndex_toSrv ; 
     
    242244                << "The array of data has not the good size !") 
    243245      this->storeField_arr(field.dataFirst(), stored) ; 
     246   } 
     247 
     248   template <int n> 
     249   void CGrid::outputField(const CArray<double,1>& stored, CArray<double,n>& field) const 
     250   { 
     251      if (this->getDataSize() != field.numElements()) 
     252         ERROR("void CGrid::outputField(const CArray<double,1>& stored, CArray<double,n>& field) const", 
     253                << "[ Size of the data = " << this->getDataSize() << ", " 
     254                << "Output data size = "   << field.numElements() << " ] " 
     255                << "The ouput array does not have not the right size!") 
     256      this->restoreField_arr(stored, field.dataFirst()); 
    244257   } 
    245258 
Note: See TracChangeset for help on using the changeset viewer.