Changeset 180


Ignore:
Timestamp:
04/19/11 15:06:51 (13 years ago)
Author:
hozdoba
Message:
 
Location:
XMLIO_V2/dev/dev_rv/src/xmlio
Files:
14 edited

Legend:

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

    r172 r180  
    3232         this->value = value;  
    3333      } 
     34       
     35      void CAttribute::clear(void) 
     36      { 
     37         this->value = boost::any();  
     38      } 
    3439 
    3540      //--------------------------------------------------------------- 
  • XMLIO_V2/dev/dev_rv/src/xmlio/attribute.hpp

    r152 r180  
    3333            template <typename T> inline void setValue(const T & value); 
    3434            void setAnyValue(const boost::any & value); 
     35            void clear(void); 
    3536 
    3637            /// Test /// 
     
    6364      template <typename T> 
    6465         T CAttribute::getValue(void) const 
    65       { return (boost::any_cast<T>(this->value)); } 
     66      {  
     67         return (boost::any_cast<T>(this->value));  
     68      } 
    6669 
    6770      template <typename T> 
    6871         void CAttribute::setValue(const T & value) 
    69       { this->value = value; } 
     72      {  
     73         this->value = value;  
     74      } 
    7075 
    7176      template<typename T> 
    7277         bool CAttribute::isType(void) 
    73       { return (this->value.type() == typeid(T)); } 
     78      {  
     79         return (this->value.type() == typeid(T));  
     80      } 
    7481 
    7582   } // namespace tree 
  • XMLIO_V2/dev/dev_rv/src/xmlio/attribute_map.hpp

    r171 r180  
    2525 
    2626            /// Accesseurs /// 
    27             inline CAttribute * operator[](const StdString & key); 
     27            CAttribute * operator[](const StdString & key); 
    2828 
    2929            /// Mutateurs /// 
  • XMLIO_V2/dev/dev_rv/src/xmlio/config/domain_attribute.conf

    r170 r180  
     1/* GLOBAL */ 
    12DECLARE_ATTRIBUTE(StdString       , name) 
    23DECLARE_ATTRIBUTE(StdString       , standard_name) 
    34DECLARE_ATTRIBUTE(StdString       , long_name) 
    45 
     6/* Spécifique */ 
     7DECLARE_ATTRIBUTE(StdString       , domain_group_ref) 
     8 
     9/* GLOBAL */ 
    510DECLARE_ATTRIBUTE(int             , ni_glo) 
    611DECLARE_ATTRIBUTE(int             , nj_glo) 
    712 
     13/* LOCAL */ 
    814DECLARE_ATTRIBUTE(int             , ibegin) 
    915DECLARE_ATTRIBUTE(int             , iend) 
    1016DECLARE_ATTRIBUTE(int             , ni) 
    1117 
     18/* LOCAL */ 
    1219DECLARE_ATTRIBUTE(int             , jbegin) 
    1320DECLARE_ATTRIBUTE(int             , jend) 
    1421DECLARE_ATTRIBUTE(int             , nj) 
    1522 
     23/* LOCAL */ 
    1624DECLARE_ATTRIBUTE(ARRAY(bool, 2)  , mask) 
    1725 
     26/* GLOBAL */ 
    1827DECLARE_ATTRIBUTE(int             , data_dim) 
     28 
     29/* LOCAL */ 
    1930DECLARE_ATTRIBUTE(int             , data_ni) 
    2031DECLARE_ATTRIBUTE(int             , data_nj) 
     
    2233DECLARE_ATTRIBUTE(int             , data_jbegin) 
    2334 
     35/* GLOBAL */ 
    2436DECLARE_ATTRIBUTE(int             , zoom_ni) 
    2537DECLARE_ATTRIBUTE(int             , zoom_nj) 
     
    2739DECLARE_ATTRIBUTE(int             , zoom_jbegin) 
    2840 
     41/* LOCAL */ 
    2942DECLARE_ATTRIBUTE(int             , data_n_index) 
    3043DECLARE_ATTRIBUTE(ARRAY(int, 1)   , data_i_index) 
    3144DECLARE_ATTRIBUTE(ARRAY(int, 1)   , data_j_index) 
    3245 
     46/* LOCAL */ 
    3347DECLARE_ATTRIBUTE(ARRAY(double, 1), lonvalue) 
    3448DECLARE_ATTRIBUTE(ARRAY(double, 1), latvalue) 
  • XMLIO_V2/dev/dev_rv/src/xmlio/fake_client/fake_nemo.f90

    r179 r180  
    2121      REAL(kind = 8), DIMENSION(10000)   :: real_array 
    2222      INTEGER                           :: rankGrp, error 
    23       INTEGER                           :: ibegin, iend, jbegin, jend 
     23      INTEGER                           :: ibegin, iend, jbegin, jend, data_ni, data_ibegin 
    2424      TYPE(XDate)                       :: init_date_nemo  = XDate(1985, 03, 15, 17, 35, 00) 
    2525      TYPE(XHandle)                     :: nemo_style_ctxt = NULLHANDLE 
     
    2727                                           temp_mod_  = NULLHANDLE, & 
    2828                                           temp_mod__ = NULLHANDLE 
     29 
     30 
    2931 
    3032      CALL MPI_COMM_RANK(comm_client, rankGrp, error) 
     
    197199      IF (rankGrp .EQ. 0) THEN 
    198200         ibegin = 1 
    199          iend   = 50 
     201         iend   = 51 
    200202         jbegin = 1 
    201203         jend   = 50 
     204         data_ni     = 50 
     205         data_ibegin = 0 
    202206      ELSE IF (rankGrp .EQ. 1) THEN 
    203          ibegin = 51 
     207         ibegin = 50 
    204208         iend   = 100 
    205209         jbegin = 1 
    206210         jend   = 50 
     211         data_ni     = 50 
     212         data_ibegin = 1 
    207213      END IF 
    208214 
     
    220226                                 iend_          = iend,           & 
    221227                                 jbegin_        = jbegin,         & 
    222                                  jend_          = jend) 
     228                                 jend_          = jend,           & 
     229                                 data_ni_       = data_ni,        & 
     230                                 data_ibegin_   = data_ibegin) 
    223231 
    224232      CALL xml_tree_add(parent_hdl  = temp_mod_,  & 
     
    232240         iend   = 90 
    233241         jbegin = 1 
    234          jend   = 10 
     242         jend   = 10         
    235243      ELSE IF (rankGrp .EQ. 1) THEN 
    236244         ibegin = 1 
     
    249257                                 data_dim_      = 2,              & 
    250258                                 ni_glo_        = 90,             & 
    251                                  nj_glo_        = 40,             & 
     259                                 nj_glo_        = 20,             & 
    252260                                 ibegin_        = ibegin,         & 
    253261                                 iend_          = iend,           & 
  • XMLIO_V2/dev/dev_rv/src/xmlio/manager/tree_manager.cpp

    r179 r180  
    178178         const ENodeType genum = CContextGroup::GetType(); 
    179179         const ENodeType denum = CDomain::GetType(); 
     180         const ENodeType ienum = CGrid::GetType(); 
    180181          
    181182         os.write (reinterpret_cast<const char*>(&genum) , sizeof(ENodeType));  
     
    202203            std::vector<boost::shared_ptr<CDomain> > & alldomain =  
    203204               CDomain::GetAllVectobject(context->getId()); 
     205            std::vector<boost::shared_ptr<CGrid> > & allgrid =  
     206               CGrid::GetAllVectobject(context->getId()); 
     207                
    204208            const StdSize alldomain_size = alldomain.size();  
     209            const StdSize allgrid_size   = allgrid.size(); 
    205210             
    206211            os.write (reinterpret_cast<const char*>(&alldomain_size), sizeof(StdSize)); 
    207              
     212            os.write (reinterpret_cast<const char*>(&allgrid_size), sizeof(StdSize)); 
     213             
     214            // Écriture successive des informations binaires de domaine. 
    208215            for (StdSize j = 0; j < alldomain_size; j++) 
    209216            { 
     
    222229                  os.write (id.data(), idsize * sizeof(char));          
    223230               }          
    224                domain->toBinary(os); 
    225                 
     231               domain->toBinary(os);                
     232            } 
     233             
     234            // Écriture successive des informations binaires de grille. 
     235            for (StdSize j = 0; j < allgrid_size; j++) 
     236            { 
     237               boost::shared_ptr<CGrid> grid = allgrid[j]; 
     238               bool hid = grid->hasId(); 
     239                
     240               os.write (reinterpret_cast<const char*>(&ienum), sizeof(ENodeType));  
     241               os.write (reinterpret_cast<const char*>(&hid), sizeof(bool)); 
     242                
     243               if (hid) 
     244               { 
     245                  const StdString & id = grid->getId(); 
     246                  const StdSize idsize   = id.size(); 
     247                      
     248                  os.write (reinterpret_cast<const char*>(&idsize), sizeof(StdSize)); 
     249                  os.write (id.data(), idsize * sizeof(char));          
     250               }          
     251               grid->toBinary(os);                
    226252            } 
    227253         } 
     
    276302            std::vector<boost::shared_ptr<CDomain> > & alldomain =  
    277303               CDomain::GetAllVectobject(context->getId()); 
     304            std::vector<boost::shared_ptr<CGrid> > & allgrid =  
     305               CGrid::GetAllVectobject(context->getId()); 
     306                
     307            const StdSize allgrid_size = allgrid.size(); 
    278308            const StdSize alldomain_size = alldomain.size();  
     309             
    279310            StdSize read_alldomain_size = 0;  
     311            StdSize read_allgrid_size = 0;  
    280312             
    281313            is.read (reinterpret_cast<char*>(&read_alldomain_size), sizeof(StdSize)); 
     314            is.read (reinterpret_cast<char*>(&read_allgrid_size), sizeof(StdSize)); 
    282315             
    283316            if (alldomain_size != read_alldomain_size) 
     
    286319                     << "] Bad domain group size !"); 
    287320                      
     321            if (alldomain_size != read_alldomain_size) 
     322               ERROR("CTreeManager::DomainsFromBinary(StdIStream & is)", 
     323                     << "[ read_allgrid_size = " << read_allgrid_size  
     324                     << "] Bad grid group size !"); 
     325                      
     326            // Lecture successive des informations binaires de domaine. 
    288327            for (StdSize j = 0; j < alldomain_size; j++) 
    289328            { 
     
    312351               domain->fromBinary(is); 
    313352            } 
     353             
     354            // Lecture successive des informations binaires de grille. 
     355            for (StdSize j = 0; j < allgrid_size; j++) 
     356            { 
     357               boost::shared_ptr<CGrid> grid = allgrid[j]; 
     358               bool hid = grid->hasId(); 
     359               ENodeType rrenum = Unknown; 
     360                
     361               is.read (reinterpret_cast<char*>(&rrenum), sizeof(ENodeType)); 
     362               is.read (reinterpret_cast<char*>(&hid), sizeof(bool)); 
     363                
     364               if (rrenum != CGrid::GetType()) 
     365                  ERROR("CTreeManager::DomainsFromBinary(StdIStream & is)", 
     366                        << "[ rrenum = " << rrenum << "] Bad type !"); 
     367 
     368               if (hid) 
     369               { 
     370                  StdSize size  = 0; 
     371                  is.read (reinterpret_cast<char*>(&size), sizeof(StdSize)); 
     372                  StdString id(size, ' '); 
     373                  is.read (const_cast<char *>(id.data()), size * sizeof(char)); 
     374                   
     375                  if (grid->getId().compare(id) != 0) 
     376                     ERROR("CTreeManager::DomainsFromBinary(StdIStream & is)", 
     377                           << "[ id = " << id << "] Bad id !");  
     378               } 
     379               grid->fromBinary(is); 
     380            } 
     381             
    314382         } 
    315383      } 
  • XMLIO_V2/dev/dev_rv/src/xmlio/manager/xios_manager.cpp

    r179 r180  
    22 
    33#include "tree_manager.hpp" 
     4#include "data_treatment.hpp" 
    45 
    56namespace xmlioserver 
    67{ 
    78      /// ////////////////////// Définitions ////////////////////// /// 
     9       
    810      void CXIOSManager::Initialise(XIOSType type, int * argc, char *** argv) 
    911      { 
     
    3335      std::vector<StdString> CXIOSManager::ExeOptions; 
    3436 
    35       CXIOSManager::XIOSType CXIOSManager::Type = CLIENT; 
     37      CXIOSManager::XIOSType   CXIOSManager::Type    = CLIENT; 
     38      CXIOSManager::XIOSStatus CXIOSManager::Status  = LOC_UNUSED; 
    3639 
    3740      StdString     CXIOSManager::ClientName("unknown name"); 
     
    7275         oss << StdString("data/def/def_server_end.") 
    7376             << CMPIManager::GetCommRank(CMPIManager::GetCommWorld()); 
    74          CTreeManager::PrintTreeToFile(oss.str());          
     77         CTreeManager::PrintTreeToFile(oss.str()); 
     78          
     79         //data::CDataTreatment dt;       
    7580      } 
    7681       
     
    166171                  isIncl = true; 
    167172                  CXIOSManager::ClientName = clientName; 
     173                  CXIOSManager::Status = LOC_CLIENT; 
    168174               } 
    169175               if (currentRank == start) 
     
    171177                  isClient = false; isIncl_  = true; 
    172178                  CXIOSManager::Comm_Client_Server = comm_; 
     179                  CXIOSManager::Status = LOC_SERVER; 
    173180               }                
    174181               if (clieindex.size() == nbClient) 
     
    209216      void CXIOSManager::RunClient(comm::MPIComm comm_client) 
    210217      { 
     218         CXIOSManager::Status  = LOC_CLIENT_SERVER; 
    211219         (CXIOSManager::Clients.begin()->second.entry)(comm_client, comm_client, comm_client); 
    212220      } 
     
    221229 
    222230         if (nbClient < nbClientPServer) 
    223             ERROR("CXIOSManager::AddClient(clientName, nbClient, nbClientPServer, entry_point)", 
     231            ERROR("CXIOSManager::AddClient(...)",  
    224232                  << "nbClient < nbClientPServer"); 
     233                   
    225234         if ((nbClient % nbClientPServer) != 0) 
    226             ERROR("CXIOSManager::AddClient(clientName, nbClient, nbClientPServer, entry_point)", 
     235            ERROR("CXIOSManager::AddClient(...)", 
    227236                  << " (nbClient % nbClientPServer) != 0 !"); 
     237                   
    228238         if ((nbprocess-nbprocess_used) < (nbClient + nbClient/nbClientPServer)) 
    229             ERROR("CXIOSManager::AddClient(clientName, nbClient, nbClientPServer, entry_point)", 
     239            ERROR("CXIOSManager::AddClient(...)", 
    230240                  << " Pas assez de processus disponibles !"); 
     241                   
    231242         if (CXIOSManager::Clients.find(clientName) != CXIOSManager::Clients.end()) 
    232             ERROR("CXIOSManager::AddClient(clientName, nbClient, nbClientPServer, entry_point)", 
     243            ERROR("CXIOSManager::AddClient(...)", 
    233244                  << " Un client portant le même nom existe déjà !"); 
    234245 
     
    332343         } 
    333344      } 
     345       
     346      //--------------------------------------------------------------- 
     347       
     348      CXIOSManager::XIOSType   CXIOSManager::GetType(void) 
     349      { 
     350         return (CXIOSManager::Type); 
     351      } 
     352       
     353      //--------------------------------------------------------------- 
     354       
     355      CXIOSManager::XIOSStatus CXIOSManager::GetStatus(void) 
     356      { 
     357         return (CXIOSManager::Status); 
     358      } 
     359       
     360      //--------------------------------------------------------------- 
     361       
     362      StdString  CXIOSManager::GetClientName(void) 
     363      { 
     364         return (CXIOSManager::ClientName); 
     365      } 
    334366 
    335367      ///-------------------------------------------------------------- 
  • XMLIO_V2/dev/dev_rv/src/xmlio/manager/xios_manager.hpp

    r178 r180  
    1717         typedef enum _xios_type 
    1818         { CLIENT_SERVER = 0 , CLIENT, SERVER } XIOSType; 
     19          
     20         typedef enum _xios_status 
     21         { LOC_UNUSED = 0, LOC_CLIENT, LOC_SERVER, LOC_CLIENT_SERVER }  XIOSStatus; 
    1922 
    2023         typedef struct 
     
    4851 
    4952         /// Accesseurs statiques /// 
     53         static XIOSType   GetType(void); 
     54         static XIOSStatus GetStatus(void); 
     55         static StdString  GetClientName(void); 
     56          
    5057         static StdSize GetNbClient(void); 
    5158         static StdSize GetNbLocClient(const StdString & clientName = CXIOSManager::ClientName); 
     
    5360         static StdSize GetNbServer(void); 
    5461         static StdSize GetNbLocServer(const StdString & clientName = CXIOSManager::ClientName); 
    55  
     62          
    5663      private : 
    5764       
     
    5966         static void ShowInformation_CS(comm::MPIComm comm_client_server); 
    6067 
    61          /// variables privées /// 
     68         /// Variables statiques privées /// 
    6269         static StdString ExeName; 
    6370         static std::vector<StdString> ExeOptions; 
    6471 
    65          static XIOSType Type; 
    66          static StdString ClientName; 
    67          static comm::MPIComm Comm_Client_Server; 
    68          static comm::MPIComm Comm_Server; 
     72         static XIOSType   Type; 
     73         static XIOSStatus Status; 
     74         static StdString  ClientName; 
     75         static comm::MPIComm Comm_Client_Server, Comm_Server; 
    6976         static xios_map<StdString, XIOSClient> Clients; 
    7077 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.cpp

    r168 r180  
    44#include "object_template_impl.hpp" 
    55#include "group_template_impl.hpp" 
     6 
     7#include <algorithm> 
    68 
    79namespace xmlioserver { 
     
    1315      : CObjectTemplate<CDomain>(), CDomainAttributes() 
    1416      , isChecked(false), local_mask(new CMask()), relFiles() 
     17      , ibegin_sub(), iend_sub(), jbegin_sub(), jend_sub() 
    1518   { /* Ne rien faire de plus */ } 
    1619 
     
    1821      : CObjectTemplate<CDomain>(id), CDomainAttributes() 
    1922      , isChecked(false), local_mask(new CMask()), relFiles() 
     23      , ibegin_sub(), iend_sub(), jbegin_sub(), jend_sub() 
    2024   { /* Ne rien faire de plus */ } 
    2125 
     
    3034   } 
    3135 
     36   //---------------------------------------------------------------- 
     37 
    3238   bool CDomain::IsWritten(const StdString & filename) const 
    3339   { 
     
    3541   } 
    3642 
     43   //---------------------------------------------------------------- 
     44 
    3745   void CDomain::addRelFile(const StdString & filename) 
    3846   { 
    3947      this->relFiles.insert(filename); 
     48   } 
     49 
     50   //---------------------------------------------------------------- 
     51 
     52   void CDomain::fromBinary(StdIStream & is) 
     53   { 
     54      SuperClass::fromBinary(is); 
     55       
     56      this->ibegin_sub.push_back(this->ibegin.getValue()); 
     57      this->jbegin_sub.push_back(this->jbegin.getValue()); 
     58      this->iend_sub.push_back(this->iend.getValue()); 
     59      this->jend_sub.push_back(this->jend.getValue());       
     60       
     61#define CLEAR_ATT(name_)\ 
     62      SuperClassAttribute::operator[](#name_)->clear() 
     63 
     64         CLEAR_ATT(mask); 
     65         CLEAR_ATT(data_n_index); 
     66         CLEAR_ATT(data_i_index); 
     67         CLEAR_ATT(data_j_index); 
     68          
     69         CLEAR_ATT(data_ni); 
     70         CLEAR_ATT(data_nj); 
     71         CLEAR_ATT(data_ibegin); 
     72         CLEAR_ATT(data_jbegin); 
     73          
     74         CLEAR_ATT(ni); 
     75         CLEAR_ATT(nj); 
     76          
     77         CLEAR_ATT(latvalue); 
     78         CLEAR_ATT(lonvalue); 
     79#undef CLEAR_ATT 
     80 
     81      this->ibegin.setValue(*std::min_element(this->ibegin_sub.begin(),this->ibegin_sub.end())); 
     82      this->jbegin.setValue(*std::min_element(this->jbegin_sub.begin(),this->jbegin_sub.end())); 
     83      this->iend.setValue(*std::max_element(this->iend_sub.begin(),this->iend_sub.end())); 
     84      this->jend.setValue(*std::max_element(this->jend_sub.begin(),this->jend_sub.end())); 
     85       
     86      this->checkGlobalDomain(); 
     87      this->checkLocalIDomain(); 
     88      this->checkLocalJDomain(); 
     89      this->completeMask(); 
     90       
     91      this->isChecked = true; 
    4092   } 
    4193 
     
    150202         mask.setValue(__arr); 
    151203      } 
    152  
    153204   } 
    154205 
     
    157208 
    158209   void CDomain::checkDomainData(void) 
    159    { 
     210   {      
    160211      if (!data_dim.isEmpty() && 
    161212         !(data_dim.getValue() == 1 || data_dim.getValue() == 2)) 
     
    252303         { 
    253304            const int dni = data_ni.getValue() * data_nj.getValue(); 
     305             
    254306            ARRAY_CREATE(__arri, int, 1, [dni]); 
    255307            ARRAY_CREATE(__arrj, int, 1, [dni]);                
     
    289341   void CDomain::completeMask(void) 
    290342   { 
    291       this->local_mask->resize(data_ni.getValue(), data_nj.getValue()); 
     343      this->local_mask->resize(ni.getValue(), nj.getValue()); 
    292344      /*this->local_mask->setDataPosition 
    293345         (data_dim.getValue(), data_ni.getValue(), data_nj.getValue(), 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.hpp

    r173 r180  
    6363 
    6464      public : 
     65       
     66         /// Autres /// 
     67         virtual void fromBinary(StdIStream & is); 
    6568 
    6669         /// Accesseurs /// 
     
    9093         std::set<StdString> relFiles; 
    9194 
     95         std::vector<int> ibegin_sub, iend_sub, jbegin_sub, jend_sub; 
     96 
    9297   }; // class CDomain 
    9398 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.cpp

    r168 r180  
    3434 
    3535   const ARRAY(int, 1) & CGrid::getStoreIndex(void) const 
    36    { return (this->storeIndex ); } 
     36   {  
     37      return (this->storeIndex ); 
     38   } 
     39 
     40   //--------------------------------------------------------------- 
     41 
    3742   const ARRAY(int, 1) & CGrid::getOutIIndex(void)  const 
    38    { return (this->out_i_index ); } 
     43   {  
     44      return (this->out_i_index );  
     45   } 
     46 
     47   //--------------------------------------------------------------- 
     48 
    3949   const ARRAY(int, 1) & CGrid::getOutJIndex(void)  const 
    40    { return (this->out_j_index ); } 
     50   {  
     51      return (this->out_j_index );  
     52   } 
     53 
     54   //--------------------------------------------------------------- 
     55 
    4156   const ARRAY(int, 1) & CGrid::getOutLIndex(void)  const 
    42    { return (this->out_l_index ); } 
     57   {  
     58      return (this->out_l_index );  
     59   } 
     60 
     61   //--------------------------------------------------------------- 
    4362 
    4463   const boost::shared_ptr<CAxis>   CGrid::getRelAxis  (void) const 
    45    { return (this->axis ); } 
     64   {  
     65      return (this->axis );  
     66   } 
     67 
     68   //--------------------------------------------------------------- 
     69 
    4670   const boost::shared_ptr<CDomain> CGrid::getRelDomain(void) const 
    47    { return (this->domain ); } 
    48  
    49    bool CGrid::hasAxis(void) const { return (this->withAxis); } 
     71   {  
     72      return (this->domain );  
     73   } 
     74 
     75   //--------------------------------------------------------------- 
     76 
     77   bool CGrid::hasAxis(void) const  
     78   {  
     79      return (this->withAxis);  
     80   } 
    5081 
    5182   //--------------------------------------------------------------- 
     
    5990      this->isChecked = true; 
    6091   } 
     92 
     93   //--------------------------------------------------------------- 
    6194 
    6295   void CGrid::solveDomainRef(void) 
     
    76109   } 
    77110 
     111   //--------------------------------------------------------------- 
     112 
    78113   void CGrid::solveAxisRef(void) 
    79114   { 
     
    95130 
    96131   void CGrid::computeIndex(void) 
    97    { 
     132   {     
    98133      const int ni   = domain->ni.getValue() , 
    99134                nj   = domain->nj.getValue() , 
     
    113148                    data_j_index = domain->data_j_index.getValue() ; 
    114149 
    115       /*std::cout << data_n_index        << " : " 
    116                   << data_i_index.size() << " : " 
    117                   << data_j_index.size() << std::endl;*/ 
     150      /*std::cout << data_n_index  << " : " 
     151                  << data_i_index  << " : " 
     152                  << data_j_index  << std::endl; */ 
    118153 
    119154      ARRAY(bool, 2) mask = domain->mask.getValue() ; 
     
    204239   } 
    205240 
     241   //--------------------------------------------------------------- 
     242 
    206243   template <> 
    207244      void CGrid::outputField 
     
    211248         (*field)[(*out_i_index)[n]][(*out_j_index)[n]] = (*stored)[n] ; 
    212249   } 
     250 
     251   //--------------------------------------------------------------- 
    213252 
    214253   template <> 
     
    230269         (*stored)[i] = data[(*storeIndex)[i]] ; 
    231270   } 
     271    
     272   //--------------------------------------------------------------- 
     273    
     274   void CGrid::toBinary  (StdOStream & os) const 
     275   { 
     276      SuperClass::toBinary(os); 
     277      this->storeIndex->toBinary(os); 
     278      this->out_i_index->toBinary(os); 
     279      this->out_j_index->toBinary(os); 
     280      this->out_l_index->toBinary(os); 
     281   } 
     282 
     283   //--------------------------------------------------------------- 
     284    
     285   void CGrid::fromBinary(StdIStream & is) 
     286   { 
     287      SuperClass::fromBinary(is); 
     288       
     289      ARRAY_CREATE(storeIndex_ , int, 1, [1]); 
     290      ARRAY_CREATE(out_l_index_, int, 1, [1]); 
     291      ARRAY_CREATE(out_i_index_, int, 1, [1]); 
     292      ARRAY_CREATE(out_j_index_, int, 1, [1]); 
     293       
     294      storeIndex_ ->fromBinary(is); 
     295      out_i_index_->fromBinary(is); 
     296      out_j_index_->fromBinary(is); 
     297      out_l_index_->fromBinary(is); 
     298       
     299   } 
    232300 
    233301   ///--------------------------------------------------------------- 
  • XMLIO_V2/dev/dev_rv/src/xmlio/node/grid.hpp

    r173 r180  
    4949         /// Traitements /// 
    5050         void solveReference(void); 
     51 
     52         virtual void toBinary  (StdOStream & os) const; 
     53         virtual void fromBinary(StdIStream & is); 
    5154 
    5255         /// Tests /// 
  • XMLIO_V2/dev/dev_rv/src/xmlio/output/nc4_data_output.cpp

    r157 r180  
    124124 
    125125               this->writeMaskAttributes(maskid, 
    126                   domain->data_dim.getValue(), 
     126                  domain->data_dim.getValue()/*, 
    127127                  domain->data_ni.getValue(), 
    128128                  domain->data_nj.getValue(), 
    129129                  domain->data_ibegin.getValue(), 
    130                   domain->data_jbegin.getValue()); 
     130                  domain->data_jbegin.getValue()*/); 
    131131 
    132132               SuperClassWriter::definition_end(); 
  • XMLIO_V2/dev/dev_rv/src/xmlio/output/nc4_data_output.hpp

    r157 r180  
    5858            void writeMaskAttributes(const StdString & mask_name, 
    5959                                     int data_dim, 
    60                                      int data_ni, 
    61                                      int data_nj, 
    62                                      int data_ibegin, 
    63                                      int data_jbegin); 
     60                                     int data_ni     = 0, 
     61                                     int data_nj     = 0, 
     62                                     int data_ibegin = 0, 
     63                                     int data_jbegin = 0); 
    6464 
    6565            void writeAxisAttributes(const StdString & axis_name, 
Note: See TracChangeset for help on using the changeset viewer.