Index: XMLIO_V2/dev/dev_rv/src/XMLIO/grid.hpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/XMLIO/grid.hpp	(revision 120)
+++ XMLIO_V2/dev/dev_rv/src/XMLIO/grid.hpp	(revision 122)
@@ -13,8 +13,12 @@
          CGrid(void) : ObjectTemplate<CGrid>(), GridAttribut(), hasAxis(false), axis(NULL), domain(NULL)
          { /* Ne rien faire de plus */ }
+
          CGrid(const string& _id) : ObjectTemplate<CGrid>(_id), GridAttribut(), hasAxis(false), axis(NULL), domain(NULL)
          { /* Ne rien faire de plus */ }
 
          static string GetName(void) { return ("grid"); }
+
+         const CAxis* getRelAxis(void) const { return (axis); }
+         const CDomain* getRelDomain(void) const { return (domain); }
 
          inline void solveReference(void) ;
@@ -24,11 +28,13 @@
          inline void computeIndex(void);
 
-         inline void storeField(const Array<double,1>& field, Array<double,1>& stored);
-         inline void storeField(const Array<double,2>& field, Array<double,1>& stored);
-         inline void storeField(const Array<double,3>& field, Array<double,1>& stored);
-         inline void storeField(const double* const data, Array<double,1>& stored);
-
-         inline void outputField(const Array<double,1>& stored, Array<double,2>& outField);
-         inline void outputField(const Array<double,1>& stored, Array<double,3>& outField);
+         bool _hasAxis(void) const { return (hasAxis); }
+
+         inline void storeField(const Array<double, 1>& field, Array<double, 1>& stored);
+         inline void storeField(const Array<double, 2>& field, Array<double, 1>& stored);
+         inline void storeField(const Array<double, 3>& field, Array<double, 1>& stored);
+         inline void storeField(const double* const data, Array<double, 1>& stored);
+
+         inline void outputField(const Array<double,1>& stored, Array<double, 2>& outField);
+         inline void outputField(const Array<double,1>& stored, Array<double, 3>& outField);
 
          inline static CGrid* CreateObject(const CDomain* const a_domain, const CAxis* const a_axis);
@@ -77,4 +83,5 @@
    void CGrid::solveReference(void)
    {
+
       static bool isReferenceSolved = false;
       if (isReferenceSolved) return;
@@ -94,5 +101,5 @@
          if (CDomain::HasObject(domain_ref))
          {
-           domain=CDomain::GetObject(domain_ref) ;
+           domain = CDomain::GetObject(domain_ref) ;
            domain->check() ;
          }
@@ -115,4 +122,5 @@
    void CGrid::computeIndex(void)
    {
+
       int ni = domain->ni ;
       int nj = domain->nj ;
@@ -123,7 +131,7 @@
       int data_jbegin  = (data_dim == 2) ? (int)domain->data_jbegin : -1;
 
-      Array<int,1>& data_i_index =* domain->data_i_index ;
-      Array<int,1>& data_j_index =* domain->data_j_index ;
-      Array<bool,2>& mask =* domain->mask ;
+      Array<int, 1>& data_i_index =* domain->data_i_index ;
+      Array<int, 1>& data_j_index =* domain->data_j_index ;
+      Array<bool, 2>& mask =* domain->mask ;
       int i, j, l, n ;
       int count, indexCount ;
@@ -131,5 +139,5 @@
       for(indexCount=0, l=0; l<size ; l++)
       {
-         for(n=0, indexCount=0; n<data_n_index; n++)
+         for(n=0; n<data_n_index; n++)
          {
             if (data_dim == 1)
@@ -137,5 +145,5 @@
                i = (data_i_index(n) + data_ibegin) % ni ;
                j = (data_i_index(n) + data_ibegin) / ni ;
-               cout<<i<<" "<<j<<" "<<mask(i,j)<<endl ;
+               //cout<<i<<" "<<j<<" "<<mask(i,j)<<endl ;
             }
             else
@@ -143,5 +151,5 @@
                i = data_i_index(n) + data_ibegin ;
                j = data_j_index(n) + data_jbegin ;
-               cout<<i<<" "<<j<<" "<<mask(i,j)<<endl ;
+               //cout<<i<<" "<<j<<" "<<mask(i,j)<<endl ;
             }
 
@@ -157,5 +165,5 @@
       for(count=0, indexCount=0, l=0; l<size; l++)
       {
-         for(n=0; n<data_n_index; n++)
+         for(n=0; n<data_n_index; n++, count++)
          {
             if (data_dim == 1)
@@ -164,5 +172,5 @@
                j = (data_i_index(n) + data_ibegin) / ni ;
             }
-            else
+            else // (dat_dim == 2)
             {
                i = data_i_index(n) + data_ibegin ;
@@ -172,5 +180,5 @@
             if (i>=0 && i<ni && j>=0 && j<nj && mask(i,j))
             {
-               storeIndex(indexCount) = n ;
+               storeIndex(indexCount) = count ;
                out_l_index(indexCount) = l ;
                out_i_index(indexCount) = i ;
@@ -178,13 +186,25 @@
                indexCount++ ;
             }
-            count++ ;
          }
       }
 
+      /** Pour tests
+
       cout << "Out of CGrid::ComputeIndex" << endl ;
+
+      cout << "storeIndex : " << endl ;
       cout << storeIndex << endl ;
+
+      cout << "out_i_index : " << endl ;
       cout << out_i_index << endl ;
+
+      cout << "out_j_index : " << endl ;
       cout << out_j_index << endl ;
+
+      cout << "out_l_index : " << endl ;
       cout << out_l_index << endl ;
+
+      **/
+
    }
 
