Index: XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.cpp
===================================================================
--- XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.cpp	(revision 183)
+++ XMLIO_V2/dev/dev_rv/src/xmlio/node/domain.cpp	(revision 184)
@@ -41,4 +41,20 @@
    {
       return (this->relFiles);
+   }
+
+   //----------------------------------------------------------------
+   
+   bool CDomain::hasZoom(void) const
+   {
+      return ((this->zoom_ni.getValue() != this->ni_glo.getValue()) && 
+              (this->zoom_nj.getValue() != this->nj_glo.getValue()));
+   }
+   
+   //----------------------------------------------------------------
+   
+   bool CDomain::isEmpty(void) const
+   {
+      return ((this->zoom_ni_loc.getValue() == 0) || 
+              (this->zoom_nj_loc.getValue() == 0));
    }
 
@@ -196,5 +212,5 @@
       if (!zoom_ibegin.isEmpty())
       {
-         int zoom_iend = zoom_jbegin.getValue() + zoom_nj.getValue() - 1;
+         int zoom_iend = zoom_ibegin.getValue() + zoom_ni.getValue() - 1;
          int zoom_jend = zoom_jbegin.getValue() + zoom_nj.getValue() - 1;
          
@@ -203,5 +219,5 @@
          iend_mask   = min (iend.getValue(), zoom_iend);
          jend_mask   = min (jend.getValue(), zoom_jend);
-         
+                 
          ibegin_mask -= ibegin.getValue();
          jbegin_mask -= jbegin.getValue();
@@ -211,9 +227,11 @@
       
       //~ std::cout << "-------------------" << std::endl
-      //~           << "zoom : " << std::boolalpha << (!zoom_ibegin.isEmpty()) << std::endl
-      //~           << "size : " << ni.getValue()  << " X " << nj.getValue()   << std::endl
-      //~           << "i : " << ibegin_mask << ", " << iend_mask << std::endl
-      //~           << "j : " << jbegin_mask << ", " << jend_mask << std::endl
-      //~           << "-------------------" << std::endl;
+                //~ << "zoom : " << std::boolalpha << this->hasZoom() << std::endl
+                //~ << "size : " << ni.getValue()  << " X " << nj.getValue()   << std::endl
+                //~ << "it : " << ibegin.getValue() << ", " << iend.getValue() << std::endl
+                //~ << "jt : " << jbegin.getValue() << ", " << jend.getValue() << std::endl
+                //~ << "im : " << ibegin_mask << ", " << iend_mask << std::endl
+                //~ << "jm : " << jbegin_mask << ", " << jend_mask << std::endl
+                //~ << "-------------------" << std::endl;
 
       if (!mask.isEmpty())
@@ -250,5 +268,4 @@
             }
          }
-               
                
          mask.setValue(__arr);
@@ -436,4 +453,5 @@
    void CDomain::checkZoom(void)
    {
+      // RÃ©solution et vÃ©rification des donnÃ©es globales de zoom.
       if (!this->zoom_ni.isEmpty() || !this->zoom_nj.isEmpty() ||
           !this->zoom_ibegin.isEmpty() || !this->zoom_jbegin.isEmpty())
@@ -447,14 +465,66 @@
          else
          {
-            int zoom_iend = zoom_jbegin.getValue() + zoom_nj.getValue() - 1;
+            int zoom_iend = zoom_ibegin.getValue() + zoom_ni.getValue() - 1;
             int zoom_jend = zoom_jbegin.getValue() + zoom_nj.getValue() - 1;
                 
             if (zoom_ibegin.getValue() < 1  || zoom_jbegin.getValue() < 1 ||
-                zoom_iend > iend.getValue() || zoom_jend > jend.getValue())
+                zoom_iend > ni_glo.getValue() || zoom_jend > nj_glo.getValue())
                ERROR("CDomain::checkZoom(void)",
                      << "Zoom mal dÃ©fini,"
                      << " vÃ©rifiez les valeurs zoom_ni, zoom_nj, zoom_ibegin, zoom_ibegin") ;
          }
-      }   
+      }
+      else
+      {
+         this->zoom_ni.setValue(this->ni_glo.getValue()); 
+         this->zoom_nj.setValue(this->nj_glo.getValue());
+         this->zoom_ibegin.setValue(1);
+         this->zoom_jbegin.setValue(1);
+      }
+      // RÃ©solution des donnÃ©es locales de zoom.
+      {
+         int zoom_iend = zoom_ibegin.getValue() + zoom_ni.getValue() - 1;
+         int zoom_jend = zoom_jbegin.getValue() + zoom_nj.getValue() - 1;
+         
+         if ((zoom_ibegin.getValue() > iend.getValue()) || 
+             (zoom_iend < ibegin.getValue()))
+         {
+            zoom_ni_loc.setValue(0);
+            zoom_ibegin_loc.setValue(-1);
+         }
+         else
+         {
+            int zoom_ibegin_loc_ = (zoom_ibegin.getValue() > ibegin.getValue()) 
+                                 ? zoom_ibegin.getValue()
+                                 : ibegin.getValue();
+            int zoom_iend_loc_  = (zoom_iend < iend.getValue()) 
+                                 ? zoom_iend
+                                 : iend.getValue();
+            int zoom_ni_loc_ = zoom_iend_loc_ - zoom_ibegin_loc_ + 1;
+            
+            zoom_ni_loc.setValue(zoom_ni_loc_);
+            zoom_ibegin_loc.setValue(zoom_ibegin_loc_-ibegin.getValue()+1);
+         }
+         
+         if ((zoom_jbegin.getValue() > jend.getValue()) || 
+             (zoom_jend < jbegin.getValue()))
+         {
+            zoom_nj_loc.setValue(0);
+            zoom_jbegin_loc.setValue(-1);
+         }
+         else
+         {
+            int zoom_jbegin_loc_ = (zoom_jbegin.getValue() > jbegin.getValue()) 
+                                 ? zoom_jbegin.getValue()
+                                 : jbegin.getValue();
+            int zoom_jend_loc_  = (zoom_jend < jend.getValue()) 
+                                 ? zoom_jend
+                                 : jend.getValue();
+            int zoom_nj_loc_ = zoom_jend_loc_ - zoom_jbegin_loc_ + 1;
+            
+            zoom_nj_loc.setValue(zoom_nj_loc_);
+            zoom_jbegin_loc.setValue(zoom_jbegin_loc_-jbegin.getValue()+1);
+         }
+      }
    }
 
