Ignore:
Timestamp:
09/06/11 11:57:45 (13 years ago)
Author:
hozdoba
Message:

Corrections après tests sur titane

Location:
XMLIO_V2/dev/dev_rv/src/xmlio/node
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/axis.cpp

    r237 r265  
    5555      if (size != true_size) 
    5656         ERROR("CAxis::checkAttributes(void)", 
    57                << "Le tableau \'zvalue\' a une taille différente" 
    58                << " de celle indiquée dans l'attribut \'size\'") 
     57               << "Le tableau \'zvalue\' a une taille différente de celle indiquée dans l'attribut \'size\'") 
    5958 
    6059      this->isChecked = true; 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.cpp

    r196 r265  
    381381            data_n_index.setValue(dni); 
    382382             
    383             for(int count = 0, i = 0; i  < data_ni.getValue(); i++) 
     383            //for(int count = 0, i = 0; i  < data_ni.getValue(); i++) 
     384            //for(int j = 0; j < data_nj.getValue(); j++, count++) 
     385             
     386            for(int count = 0, j = 0; j  < data_nj.getValue(); j++) 
    384387            { 
    385                for(int j = 0; j < data_nj.getValue(); j++, count++) 
     388               for(int i = 0; i < data_ni.getValue(); i++, count++) 
    386389               { 
    387390                  (*__arri)[count] = i+1 ; 
     
    399402   //---------------------------------------------------------------- 
    400403    
    401    void CDomain::completeLonLat(void) 
     404   void CDomain::completeLonLatClient(void) 
     405   { 
     406      ARRAY_CREATE(lonvalue_temp, double, 1, [0]); 
     407      ARRAY_CREATE(latvalue_temp, double, 1, [0]); 
     408       
     409      const int zoom_ibegin_client  = zoom_ibegin_loc.getValue(), 
     410                zoom_jbegin_client  = zoom_jbegin_loc.getValue(), 
     411                zoom_ni_client      = zoom_ni_loc.getValue(), 
     412                zoom_nj_client      = zoom_nj_loc.getValue(); 
     413                 
     414      ARRAY(double, 1) lonvalue_ = this->lonvalue.getValue(), 
     415                       latvalue_ = this->latvalue.getValue(); 
     416                 
     417      if (this->data_dim.getValue() == 2) 
     418      { 
     419         StdSize dm = zoom_ni_client * zoom_nj_client; 
     420 
     421         lonvalue_temp->resize(boost::extents[dm]); 
     422         latvalue_temp->resize(boost::extents[dm]); 
     423          
     424         for (int i = 0; i < zoom_ni_client; i++) 
     425         { 
     426            for (int j = 0; j < zoom_nj_client; j++) 
     427            { 
     428               (*lonvalue_temp)[i + j * zoom_ni_client] = (*lonvalue_)[(i + zoom_ibegin_client -1)+(j + zoom_jbegin_client -1)*ni.getValue()];               
     429               (*latvalue_temp)[i + j * zoom_ni_client] = (*latvalue_)[(i + zoom_ibegin_client -1)+(j + zoom_jbegin_client -1)*ni.getValue()]; 
     430            } 
     431         } 
     432         this->lonvalue.setValue(lonvalue_temp); 
     433         this->latvalue.setValue(latvalue_temp); 
     434      } 
     435      else 
     436      { 
     437         lonvalue_temp->resize(boost::extents[zoom_ni_client]); 
     438         latvalue_temp->resize(boost::extents[zoom_nj_client]); 
     439          
     440         for (int i = zoom_ibegin_client - 1; i < (zoom_ni_client - zoom_ibegin_client + 1); i++) 
     441         { 
     442            (*lonvalue_temp)[i] = (*lonvalue_)[i];  
     443         } 
     444          
     445         for (int j = zoom_ibegin_client - 1; j < (zoom_nj_client - zoom_jbegin_client + 1); j++) 
     446         { 
     447            (*latvalue_temp)[j] = (*latvalue_)[j]; 
     448         } 
     449          
     450         this->lonvalue.setValue(lonvalue_temp); 
     451         this->latvalue.setValue(latvalue_temp); 
     452      }   
     453   } 
     454  
     455   //---------------------------------------------------------------- 
     456       
     457   void CDomain::completeLonLatServer(void) 
    402458   { 
    403459      ARRAY_CREATE(lonvalue_temp, double, 1, [0]); 
     
    441497               for (int j = jbegin_loc - jbegin_serv; j < (jend_loc - jbegin_serv + 1); j++) 
    442498               { 
    443                   (*lonvalue_)[i + j * this->ni.getValue()] = (*lonvalue_loc)[l];               
    444                   (*latvalue_)[i + j * this->ni.getValue()] = (*latvalue_loc)[l++]; 
     499                  (*lonvalue_)[i + j * this->ni.getValue()] = (*lonvalue_loc)[l];      // erreur         
     500                  (*latvalue_)[i + j * this->ni.getValue()] = (*latvalue_loc)[l++];    // erreur 
    445501               } 
    446502            } 
     
    572628         this->checkDomainData(); 
    573629         this->checkCompression(); 
     630          
     631         this->ibegin_sub.push_back(this->ibegin.getValue()); 
     632         this->jbegin_sub.push_back(this->jbegin.getValue()); 
     633         this->iend_sub.push_back(this->iend.getValue()); 
     634         this->jend_sub.push_back(this->jend.getValue());  
     635       
     636         this->latvalue_sub.push_back(this->latvalue.getValue()); 
     637         this->lonvalue_sub.push_back(this->lonvalue.getValue());   
     638          
     639         if (!this->isEmpty()) 
     640         { 
     641            this->completeLonLatClient(); 
     642         } 
    574643      } 
    575644      else 
    576645      { // CÃŽté serveur uniquement 
    577646         if (!this->isEmpty()) 
    578             this->completeLonLat(); 
     647            this->completeLonLatServer(); 
    579648      } 
    580649      this->completeMask(); 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.hpp

    r184 r265  
    9090         /// Mutateur /// 
    9191         void addRelFile(const StdString & filename); 
    92          void completeLonLat(void); 
     92         void completeLonLatServer(void); 
     93         void completeLonLatClient(void); 
    9394          
    9495         /// Destructeur /// 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/field.cpp

    r206 r265  
    1919      , grid(), file() 
    2020      , freq_operation(), freq_write() 
     21      , nstep(0) 
    2122      , last_Write(), last_operation() 
    2223      , foperation() 
    23       , data() 
     24      , data(new CArray<double, 1>(boost::extents[0])) 
    2425   { /* Ne rien faire de plus */ } 
    2526 
     
    2930      , grid(), file() 
    3031      , freq_operation(), freq_write() 
     32      , nstep(0) 
    3133      , last_Write(), last_operation() 
    3234      , foperation() 
    33       , data() 
     35      , data(new CArray<double, 1>(boost::extents[0])) 
    3436   { /* Ne rien faire de plus */ } 
    3537 
     
    8890   {  
    8991      return (this->file); 
     92   } 
     93    
     94   StdSize CField::getNStep(void) const 
     95   { 
     96      return (this->nstep); 
     97   } 
     98    
     99   void CField::incrementNStep(void) 
     100   { 
     101      this->nstep++; 
    90102   } 
    91103 
     
    236248      else 
    237249      { 
     250         CDuration freq_offset_ = NoneDu; 
     251         if (!freq_offset.isEmpty()) 
     252         { 
     253            freq_offset_ = CDuration::FromString(freq_offset.getValue()); 
     254         } 
     255         else 
     256         { 
     257            freq_offset.setValue(NoneDu.toString()); 
     258         }    
     259                   
    238260         this->freq_operation = CDuration::FromString(freq_op.getValue()); 
    239261         this->freq_write     = CDuration::FromString(this->file->output_freq.getValue()); 
     
    242264         this->last_operation = boost::shared_ptr<xmlioserver::date::CDate> 
    243265                        (new date::CDate(_context->getCalendar()->getInitDate())); 
     266         const CDuration toffset = this->freq_operation - freq_offset_ - _context->getCalendar()->getTimeStep();  
     267         *this->last_operation  = *this->last_operation - toffset;   
    244268          
    245269#define DECLARE_FUNCTOR(MType, mtype)              \ 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/field.hpp

    r229 r265  
    6464      public : 
    6565 
     66         StdSize getNStep(void) const; 
     67 
    6668         const date::CDuration & getFreqOperation(void) const; 
    6769         const date::CDuration & getFreqWrite(void) const; 
     
    7880         /// Mutateur /// 
    7981         void setRelFile(const boost::shared_ptr<CFile> _file); 
     82         void incrementNStep(void); 
    8083 
    8184         template <StdSize N> 
    8285            inline bool updateData 
    83                (const date::CDate & currDate, const ARRAY(double, N) data); 
     86               (const date::CDate & currDate, const date::CDuration & timestep, const ARRAY(double, N) data); 
    8487 
    8588         bool updateDataServer 
     
    118121         date::CDuration freq_operation, freq_write; 
    119122 
     123         StdSize nstep; 
    120124         boost::shared_ptr<date::CDate>    last_Write, last_operation; 
    121125         boost::shared_ptr<func::CFunctor> foperation; 
     
    146150 
    147151   template <StdSize N> 
    148       bool CField::updateData(const date::CDate & currDate, const ARRAY(double, N) data) 
    149    { 
    150       if ((*last_operation + freq_operation) >= currDate) 
     152      bool CField::updateData(const date::CDate & currDate, const date::CDuration & timestep, const ARRAY(double, N) _data) 
     153   {         
     154      const date::CDate opeDate      = *last_operation + freq_operation; 
     155      const date::CDate writeDate    = *last_Write     + freq_write;        
     156 
     157//      std::cout << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl; 
     158//      std::cout << "Champ : "     << this->getBaseFieldId() << std::endl; 
     159//      std::cout << "CurrDate : "  << currDate  << std::endl; 
     160//      std::cout << "opeDate : "   << opeDate   << " = " << *last_operation << " + " << freq_operation << std::endl; 
     161//      std::cout       << "writeDate : " << writeDate << " = " << *last_Write     << " + " << freq_write     << std::endl; 
     162//      std::cout << "(opeDate <= currDate)   = " << std::boolalpha << (opeDate <= currDate)   << std::endl; 
     163//      std::cout       << "(writeDate <= currDate) = " << std::boolalpha << (writeDate <= currDate) << std::endl;    
     164    
     165       //std::cout << ">> " << currDate <<  " : Envoi de données " << this->getBaseFieldId() << std::endl; 
     166      if (opeDate <= currDate) 
    151167      { 
    152          ARRAY_CREATE(input, double, 1, [0]); 
    153          input->resize(boost::extents[data->size()]); 
    154          this->grid->inputField(data, input); 
     168         //std::cout << "> " << currDate << ": Operation du champs" << this->getBaseFieldId() << std::endl; 
     169          
     170         if (this->data->num_elements() != this->grid->storeIndex[0]->num_elements()) 
     171         { 
     172            this->data->resize(boost::extents[this->grid->storeIndex[0] ->num_elements()]); 
     173         } 
     174             
     175         ARRAY_CREATE(input, double, 1, [this->data->num_elements()]); 
     176         this->grid->inputField(_data, input);           
    155177         (*this->foperation)(input); 
     178          
    156179         *last_operation = currDate; 
     180//         std::cout << "(*last_operation = currDate) : " << *last_operation << " = " << currDate << std::endl;  
    157181      } 
    158182       
    159       if ((*last_Write + freq_write) >= currDate) 
     183      if (writeDate < (currDate + freq_operation)) 
    160184      { 
    161          *last_Write = currDate; 
    162          return (true); 
     185         this->foperation->final(); 
     186         this->incrementNStep(); 
     187         *last_Write = writeDate; 
     188//         std::cout << "(*last_Write = currDate) : " << *last_Write << " = " << currDate       << std::endl; 
     189         return (true);         
    163190      } 
     191//      std::cout << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl; 
    164192      return (false); 
    165193   }; 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/file.cpp

    r214 r265  
    106106   { 
    107107      this->setVirtualFieldGroup 
    108          (CObjectFactory::CreateObject<CFieldGroup>(newVFieldGroupId)); 
     108         (CObjectFactory::CreateObject<CFieldGroup>(/*newVFieldGroupId*/)); 
    109109   } 
    110110 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/file.hpp

    r257 r265  
    5353         std::vector<boost::shared_ptr<CField> > 
    5454            getEnabledFields(int default_outputlevel = 5, 
    55                              int default_level       = 1, 
    56                              bool default_enabled    = true); 
     55                             int default_level = 1, 
     56                             bool default_enabled = true); 
    5757 
    5858      public : 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.cpp

    r205 r265  
     1 
    12#include "grid.hpp" 
    23 
     
    100101   //--------------------------------------------------------------- 
    101102 
    102    std::vector<StdSize> CGrid::getShape(void) const 
     103   std::vector<StdSize> CGrid::getLocalShape(void) const 
    103104   { 
    104105      std::vector<StdSize> retvalue; 
    105       retvalue.push_back(this->domain->ni.getValue()); 
    106       retvalue.push_back(this->domain->nj.getValue()); 
     106      retvalue.push_back(domain->zoom_ni_loc.getValue()); 
     107      retvalue.push_back(domain->zoom_nj_loc.getValue()); 
    107108      if (this->withAxis) 
    108109         retvalue.push_back(this->axis->size.getValue()); 
     
    111112   //--------------------------------------------------------------- 
    112113    
    113    StdSize CGrid::getSize(void) const 
     114   StdSize CGrid::getLocalSize(void) const 
    114115   { 
    115116      StdSize retvalue = 1; 
    116       std::vector<StdSize> shape_ = this->getShape(); 
     117      std::vector<StdSize> shape_ = this->getLocalShape(); 
     118      for (StdSize s = 0; s < shape_.size(); s++) 
     119         retvalue *= shape_[s]; 
     120      return (retvalue); 
     121   } 
     122    
     123   //--------------------------------------------------------------- 
     124 
     125   std::vector<StdSize> CGrid::getGlobalShape(void) const 
     126   { 
     127      std::vector<StdSize> retvalue; 
     128      retvalue.push_back(domain->ni.getValue()); 
     129      retvalue.push_back(domain->nj.getValue()); 
     130      if (this->withAxis) 
     131         retvalue.push_back(this->axis->size.getValue()); 
     132      return (retvalue); 
     133   } 
     134   //--------------------------------------------------------------- 
     135    
     136   StdSize CGrid::getGlobalSize(void) const 
     137   { 
     138      StdSize retvalue = 1; 
     139      std::vector<StdSize> shape_ = this->getGlobalShape(); 
    117140      for (StdSize s = 0; s < shape_.size(); s++) 
    118141         retvalue *= shape_[s]; 
     
    129152      if (this->storeIndex.size() == 1) 
    130153      { 
     154          
    131155         this->computeIndex() ; 
    132       } 
    133       else 
    134       { 
    135          this->computeIndexServer(); 
    136       } 
     156         ARRAY_CREATE(storeIndex_ , int, 1, [0]); 
     157         ARRAY_CREATE(out_l_index_, int, 1, [0]); 
     158         ARRAY_CREATE(out_i_index_, int, 1, [0]); 
     159         ARRAY_CREATE(out_j_index_, int, 1, [0]); 
     160                  
     161         this->storeIndex .push_front(storeIndex_); 
     162         this->out_i_index.push_front(out_i_index_); 
     163         this->out_j_index.push_front(out_j_index_); 
     164         this->out_l_index.push_front(out_l_index_); 
     165      } 
     166      this->computeIndexServer(); 
    137167      this->isChecked = true; 
    138168   } 
     
    177207 
    178208   void CGrid::computeIndex(void) 
    179    {   
     209   {     
     210    
    180211      const int ni   = domain->ni.getValue() , 
    181212                nj   = domain->nj.getValue() , 
     
    200231 
    201232      ARRAY(bool, 2) mask = domain->mask.getValue() ; 
     233      ARRAY(int, 2) local_mask =  this->domain->getLocalMask(); 
    202234 
    203235      int indexCount = 0; 
     
    210242                temp_j = (data_dim == 1) ? -1 
    211243                       : (*data_j_index)[n] + data_jbegin; 
    212             i = (data_dim == 1) ? (temp_i - 2) % ni 
     244            i = (data_dim == 1) ? (temp_i - 1) % ni 
    213245                                : (temp_i - 1) ; 
    214             j = (data_dim == 1) ? (temp_i - 2) / ni 
     246            j = (data_dim == 1) ? (temp_i - 1) / ni 
    215247                                : (temp_j - 1) ; 
    216248 
     
    226258      ARRAY_ASSIGN(this->out_i_index[0], int, 1, [indexCount]); 
    227259      ARRAY_ASSIGN(this->out_j_index[0], int, 1, [indexCount]); 
    228  
     260       
     261      // for(int count = 0, indexCount = 0,  l = 0; l < size; l++) 
     262      // for(int n = 0, i = 0, j = 0; n < data_n_index; n++, count++) 
     263 
     264      //for(int n = 0, i = 0, j = 0, count = 0, indexCount = 0; n < data_n_index;  n++) 
     265      //for(int l = 0; l < size; l++, count++) 
     266       
    229267      for(int count = 0, indexCount = 0,  l = 0; l < size; l++) 
    230268      { 
     
    234272                temp_j = (data_dim == 1) ? -1 
    235273                       : (*data_j_index)[n] + data_jbegin; 
    236             i = (data_dim == 1) ? (temp_i - 2) % ni 
     274            i = (data_dim == 1) ? (temp_i - 1) % ni 
    237275                                : (temp_i - 1) ; 
    238             j = (data_dim == 1) ? (temp_i - 2) / ni 
     276            j = (data_dim == 1) ? (temp_i - 1) / ni 
    239277                                : (temp_j - 1) ; 
    240278 
     
    250288         } 
    251289      } 
     290 
     291 
     292//      if (this->storeIndex[0]->size() != 0) 
     293//         for (StdSize u = 0; u < this->storeIndex[0]->size(); u++) 
     294//            (*local_mask)[(*out_i_index[0])[u]][(*out_j_index[0])[u]] = 1; 
     295                                  
     296//      std::cout << "indexCount" << indexCount << std::endl;  
     297//      std::cout << this->getId() << " : "  << (*this->storeIndex[0]).num_elements() << std::endl; 
     298//      StdOFStream ofs2(("log_client_"+this->getId()).c_str()); 
     299//      for (StdSize h = 0; h < storeIndex[0]->size(); h++) 
     300//      { 
     301//        ofs2 << "(" << (*storeIndex[0])[h]  << ";" 
     302//             << (*out_i_index[0])[h] << "," 
     303//             << (*out_j_index[0])[h] << "," 
     304//             << (*out_l_index[0])[h] << ")" << std::endl; 
     305//      } 
     306//      ofs2.close();    
    252307   } 
    253308 
     
    282337         (const ARRAY(double, 1) stored,  ARRAY(double, 3) field) const 
    283338   { 
     339      //std::cout <<"champ : " ; 
    284340      for(StdSize n = 0; n < storeIndex[0]->num_elements(); n++) 
     341      { 
    285342         (*field)[(*out_i_index[0])[n]][(*out_j_index[0])[n]][(*out_l_index[0])[n]] = (*stored)[n] ; 
     343         /*if (storeIndex[0]->num_elements() == 31) 
     344         { 
     345            std::cout << "( " << (*field)[(*out_i_index[0])[n]][(*out_j_index[0])[n]][(*out_l_index[0])[n]] << ", " 
     346                      << (*out_i_index[0])[n] << ", " 
     347                      << (*out_j_index[0])[n] << ", " 
     348                      << (*out_l_index[0])[n] << ")"; 
     349         }*/ 
     350      } 
     351      //std::cout << std::endl; 
     352 
    286353   } 
    287354 
     
    311378      (const double * const data, ARRAY(double, 1) stored) const 
    312379   { 
    313       const StdSize size = storeIndex[0]->num_elements() ; 
     380      const StdSize size = (this->storeIndex[0])->num_elements() ; 
     381//    std::cout << this->getId() << "> size : " << size << std::endl; 
    314382      stored->resize(boost::extents[size]) ; 
    315383      for(StdSize i = 0; i < size; i++) 
     
    365433   void CGrid::computeIndexServer(void) 
    366434   { 
    367       ARRAY(int, 1) storeIndex_srv   =  this->storeIndex[0]; 
    368       ARRAY(int, 1) out_i_index_srv  =  this->out_i_index[0]; 
    369       ARRAY(int, 1) out_j_index_srv  =  this->out_j_index[0]; 
    370       ARRAY(int, 1) out_l_index_srv  =  this->out_l_index[0]; 
    371  
    372435      ARRAY(int, 2) local_mask =  this->domain->getLocalMask(); 
    373436       
     
    375438      const std::vector<int> & jbegin = this->domain->getJBeginSub(); 
    376439       
    377       const int ibegin_srv = this->domain->ibegin.getValue(); 
    378       const int jbegin_srv = this->domain->jbegin.getValue(); 
    379       const int zoom_ni_srv   = this->domain->zoom_ni_loc.getValue(); 
    380       const int zoom_nj_srv   = this->domain->zoom_nj_loc.getValue(); 
     440      const int ibegin_srv  = this->domain->ibegin.getValue(); 
     441      const int jbegin_srv  = this->domain->jbegin.getValue(); 
     442      const int zoom_ni_srv = this->domain->zoom_ni_loc.getValue(); 
     443      const int zoom_nj_srv = this->domain->zoom_nj_loc.getValue(); 
    381444       
    382445      const int ibegin_zoom_srv = this->domain->zoom_ibegin_loc.getValue(); 
     
    387450         dn += this->out_i_index[j]->size(); 
    388451          
    389       ARRAY_ASSIGN(storeIndex_srv , int, 1, [dn]); 
    390       ARRAY_ASSIGN(out_i_index_srv, int, 1, [dn]); 
    391       ARRAY_ASSIGN(out_j_index_srv, int, 1, [dn]); 
    392       ARRAY_ASSIGN(out_l_index_srv, int, 1, [dn]); 
     452      ARRAY_CREATE(storeIndex_srv , int, 1, [dn]); 
     453      ARRAY_CREATE(out_i_index_srv, int, 1, [dn]); 
     454      ARRAY_CREATE(out_j_index_srv, int, 1, [dn]); 
     455      ARRAY_CREATE(out_l_index_srv, int, 1, [dn]); 
    393456       
    394457      for (StdSize i = 0, dn = 0; i < ibegin.size(); i++) 
     
    404467         for (StdSize n = dn, m = 0; n < (dn + storeIndex_cl->size()); n++, m++) 
    405468         { 
    406             (*storeIndex_srv)[n]  = (*storeIndex_cl)[m]  + dn; // Faux mais inutile dans tous les cas. 
     469            (*storeIndex_srv)[n]  = (*storeIndex_cl)[m]; // Faux mais inutile dans le cas serveur. 
    407470            (*out_i_index_srv)[n] = (*out_i_index_cl)[m]  
    408471                                  + (ibegin_cl - 1) - (ibegin_srv - 1) - (ibegin_zoom_srv - 1); 
     
    438501            (*local_mask)[(*out_i_index_srv)[u]][(*out_j_index_srv)[u]] = 1; 
    439502 
    440       //~ StdOFStream ofs(this->getId().c_str()); 
    441       //~ for (StdSize h = 0; h < storeIndex_srv->size(); h++) 
    442       //~ { 
    443         //~ ofs << "(" << (*storeIndex_srv)[h]  << ";" 
    444             //~ << (*out_i_index_srv)[h] << "," 
    445             //~ << (*out_j_index_srv)[h] << "," 
    446             //~ << (*out_l_index_srv)[h] << ")" << std::endl; 
    447       //~ } 
    448       //~ ofs.close(); 
     503//      StdOFStream ofs(("log_server_"+this->getId()).c_str()); 
     504//      for (StdSize h = 0; h < storeIndex_srv->size(); h++) 
     505//      { 
     506//        ofs << "(" << (*storeIndex_srv)[h]  << ";" 
     507//            << (*out_i_index_srv)[h] << "," 
     508//            << (*out_j_index_srv)[h] << "," 
     509//            << (*out_l_index_srv)[h] << ")" << std::endl; 
     510//      } 
     511//       ofs.close(); 
     512    
     513      this->storeIndex [0] = storeIndex_srv ; 
     514      this->out_i_index[0] = out_i_index_srv; 
     515      this->out_j_index[0] = out_j_index_srv; 
     516      this->out_l_index[0] = out_l_index_srv; 
     517       
    449518      this->storeIndex.resize(1); 
    450519      this->out_i_index.resize(1); 
     
    454523   } 
    455524    
    456    //---------------------------------------------------------------- 
    457525    
    458526   void CGrid::inputFieldServer 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.hpp

    r205 r265  
    6868 
    6969         StdSize getDimension(void) const; 
    70          StdSize getSize(void) const; 
    71          std::vector<StdSize> getShape(void) const; 
     70          
     71         StdSize getLocalSize(void) const; 
     72         StdSize getGlobalSize(void) const; 
     73         std::vector<StdSize> getLocalShape(void) const; 
     74         std::vector<StdSize> getGlobalShape(void) const; 
    7275 
    7376         /// Entrées-sorties de champs /// 
     
    130133      void CGrid::inputField(const  ARRAY(double, n) field, ARRAY(double, 1) stored) const 
    131134   { 
    132       if (this->getSize() != field->num_elements()) 
     135      if (this->getGlobalSize() != field->num_elements()) 
    133136         ERROR("CGrid::inputField(const  ARRAY(double, n) field, ARRAY(double, 1) stored)", 
    134                 << "[ Taille des données attendue = " << this->getSize()       << ", " 
     137                << "[ Taille des données attendue = " << this->getGlobalSize()       << ", " 
    135138                << "Taille des données reçue = "      << field->num_elements() << " ] " 
    136139                << "Le tableau de données n'a pas la bonne taille !") ; 
    137       this->storeField_arr(field.data(), stored) ; 
     140      this->storeField_arr(field->data(), stored) ; 
    138141   } 
    139142 
Note: See TracChangeset for help on using the changeset viewer.