Index: XIOS/trunk/src/distribution_client.cpp
===================================================================
--- XIOS/trunk/src/distribution_client.cpp	(revision 1561)
+++ XIOS/trunk/src/distribution_client.cpp	(revision 1562)
@@ -14,5 +14,5 @@
    : CDistribution(rank, 0)
    , axisDomainOrder_()
-   , nLocal_(), nGlob_(), nBeginLocal_(), nBeginGlobal_(),nZoomBegin_(), nZoomEnd_()
+   , nLocal_(), nGlob_(), nBeginLocal_(), nBeginGlobal_()
    , dataNIndex_(), dataDims_(), dataBegin_(), dataIndex_(), domainMasks_(), axisMasks_()
    , gridMask_(), indexMap_()
@@ -22,5 +22,5 @@
    , infoIndex_(), isComputed_(false)
    , elementLocalIndex_(), elementGlobalIndex_(), elementIndexData_()
-   , elementZoomMask_(), elementNLocal_(), elementNGlobal_()
+   , elementNLocal_(), elementNGlobal_()
 {
   readDistributionInfo(grid);
@@ -153,6 +153,4 @@
   nBeginLocal_.resize(this->dims_,0);
   nBeginGlobal_.resize(this->dims_,0);
-  nZoomBegin_.resize(this->dims_);
-  nZoomEnd_.resize(this->dims_);
 
   // Data_n_index of domain or axis (For now, axis uses its size as data_n_index
@@ -172,5 +170,4 @@
   elementGlobalIndex_.resize(numElement_);
   elementIndexData_.resize(numElement_);
-  elementZoomMask_.resize(numElement_);
   elementNLocal_.resize(numElement_);
   elementNGlobal_.resize(numElement_);
@@ -195,6 +192,4 @@
       nBeginLocal_.at(indexMap_[idx]+1) = 0;
       nBeginGlobal_.at(indexMap_[idx]+1) = domList[domIndex]->jbegin;
-      nZoomBegin_.at((indexMap_[idx]+1)) = 0; //domList[domIndex]->global_zoom_jbegin;
-      nZoomEnd_.at((indexMap_[idx]+1))   = domList[domIndex]->nj_glo.getValue()- 1; //domList[domIndex]->global_zoom_jbegin + domList[domIndex]->global_zoom_nj-1;
 
       dataBegin_.at(indexMap_[idx]+1) = domList[domIndex]->data_jbegin.getValue();
@@ -207,6 +202,4 @@
       nBeginLocal_.at(indexMap_[idx]) = 0;
       nBeginGlobal_.at(indexMap_[idx]) = domList[domIndex]->ibegin;
-      nZoomBegin_.at((indexMap_[idx])) = 0; // domList[domIndex]->global_zoom_ibegin;
-      nZoomEnd_.at((indexMap_[idx]))   = domList[domIndex]->ni_glo.getValue() -1; //domList[domIndex]->global_zoom_ibegin + domList[domIndex]->global_zoom_ni-1;
 
       dataBegin_.at(indexMap_[idx]) = domList[domIndex]->data_ibegin.getValue();
@@ -229,6 +222,4 @@
       nBeginLocal_.at(indexMap_[idx]) = 0;
       nBeginGlobal_.at(indexMap_[idx]) = axisList[axisIndex]->begin.getValue();
-      nZoomBegin_.at((indexMap_[idx])) = 0; //axisList[axisIndex]->global_zoom_begin;
-      nZoomEnd_.at((indexMap_[idx])) = axisList[axisIndex]->n_glo.getValue() - 1; //axisList[axisIndex]->global_zoom_begin + axisList[axisIndex]->global_zoom_n-1;
 
       dataBegin_.at(indexMap_[idx]) = axisList[axisIndex]->data_begin.getValue();
@@ -251,6 +242,4 @@
       nBeginLocal_.at(indexMap_[idx]) = 0;
       nBeginGlobal_.at(indexMap_[idx]) = 1;
-      nZoomBegin_.at((indexMap_[idx])) = 0;
-      nZoomEnd_.at((indexMap_[idx])) = 0;
 
       dataBegin_.at(indexMap_[idx]) = 0;
@@ -303,9 +292,6 @@
       elementLocalIndex_[i].resize(count);
       elementGlobalIndex_[i].resize(count);
-      elementZoomMask_[i].resize(count);
-      elementZoomMask_[i] = false;
       count = 0;
       CArray<bool,1>& tmpIndexElementData = elementIndexData_[i];
-      CArray<bool,1>& tmpZoomMaskElement = elementZoomMask_[i];
       CArray<int,1>& tmpLocalElementIndex = elementLocalIndex_[i];
       CArray<size_t,1>& tmpGlobalElementIndex = elementGlobalIndex_[i];
@@ -319,11 +305,4 @@
           localIndex = tmpLocalElementIndex(count) = iIdx + jIdx * nLocal_[indexMap_[i]];
           tmpGlobalElementIndex(count) = (infoIndex_[indexMap_[i]])(localIndex) + ((infoIndex_[indexMap_[i]+1])(localIndex))*nGlob_[indexMap_[i]];
-          if ((((infoIndex_[indexMap_[i]])(localIndex)) <= nZoomEnd_[indexMap_[i]])
-             && (nZoomBegin_[indexMap_[i]] <= ((infoIndex_[indexMap_[i]])(localIndex)))
-             && (((infoIndex_[indexMap_[i]+1])(localIndex)) <= nZoomEnd_[indexMap_[i]+1])
-             && (nZoomBegin_[indexMap_[i]+1] <= ((infoIndex_[indexMap_[i]+1])(localIndex))))
-          {
-            tmpZoomMaskElement(count) = true;
-          }
           ++count;
         }
@@ -360,9 +339,6 @@
       elementLocalIndex_[i].resize(count);
       elementGlobalIndex_[i].resize(count);
-      elementZoomMask_[i].resize(count);
-      elementZoomMask_[i] = false;
       count = 0;
       CArray<bool,1>& tmpIndexElementData = elementIndexData_[i];
-      CArray<bool,1>& tmpZoomMaskElement = elementZoomMask_[i];
       CArray<int,1>& tmpLocalElementIndex = elementLocalIndex_[i];
       CArray<size_t,1>& tmpGlobalElementIndex = elementGlobalIndex_[i];
@@ -373,9 +349,4 @@
           iIdx = tmpLocalElementIndex(count) = getAxisIndex((dataIndex_[indexMap_[i]])(j), dataBegin_[indexMap_[i]], nLocal_[indexMap_[i]]);
           tmpGlobalElementIndex(count) = (infoIndex_[indexMap_[i]])(iIdx);
-          if ((((infoIndex_[indexMap_[i]])(iIdx)) <= nZoomEnd_[indexMap_[i]])
-             && (nZoomBegin_[indexMap_[i]] <= ((infoIndex_[indexMap_[i]])(iIdx))))
-          {
-            tmpZoomMaskElement(count) = true;
-          }
           ++count;
         }
@@ -404,6 +375,4 @@
       elementGlobalIndex_[i].resize(count);
       elementGlobalIndex_[i] = 0;
-      elementZoomMask_[i].resize(count);
-      elementZoomMask_[i] = true;
     }
   }
@@ -440,5 +409,5 @@
   std::vector<StdSize> currentGlobalIndex(numElement_,0);
   int innerLoopSize = eachElementSize[0];
-  size_t idx = 0, indexLocalDataOnClientCount = 0, indexSend2ServerCount = 0;
+  size_t idx = 0, indexLocalDataOnClientCount = 0;
   size_t ssize = 1;
   for (int i = 0; i < numElement_; ++i) ssize *= eachElementSize[i];
@@ -475,11 +444,4 @@
       {
         ++indexLocalDataOnClientCount;
-        bool isIndexOnServer = true;
-
-        for (int idxElement = 0; idxElement < this->numElement_; ++idxElement)
-        {
-          isIndexOnServer = isIndexOnServer && elementZoomMask_[idxElement](idxLoop[idxElement]);
-        }
-        if (isIndexOnServer) ++indexSend2ServerCount;
       }
     }
@@ -490,12 +452,12 @@
   // Now allocate these arrays
   localDataIndex_.resize(indexLocalDataOnClientCount);
-  localMaskIndex_.resize(indexSend2ServerCount);
-  localMaskedDataIndex_.resize(indexSend2ServerCount);
-  globalDataIndex_.rehash(std::ceil(indexLocalDataOnClientCount/globalDataIndex_.max_load_factor())); //globalLocalDataSendToServerMap_.reserve(indexSend2ServerCount);
-  globalLocalDataSendToServerMap_.rehash(std::ceil(indexSend2ServerCount/globalLocalDataSendToServerMap_.max_load_factor())); //globalLocalDataSendToServerMap_.reserve(indexSend2ServerCount);
+  localMaskIndex_.resize(indexLocalDataOnClientCount);
+  localMaskedDataIndex_.resize(indexLocalDataOnClientCount);
+  globalDataIndex_.rehash(std::ceil(indexLocalDataOnClientCount/globalDataIndex_.max_load_factor()));
+  globalLocalDataSendToServerMap_.rehash(std::ceil(indexLocalDataOnClientCount/globalLocalDataSendToServerMap_.max_load_factor()));
 
   // We need to loop with data index
   idxLoop.assign(numElement_,0);
-  idx = indexLocalDataOnClientCount = indexSend2ServerCount = 0;
+  idx = indexLocalDataOnClientCount = 0;
   ssize = 1; for (int i = 0; i < numElement_; ++i) ssize *= dataNIndex_[i];
   innerLoopSize = dataNIndex_[0];
@@ -565,17 +527,7 @@
             globalDataIndex_[globalIndex] = indexLocalDataOnClientCount;
             localDataIndex_[indexLocalDataOnClientCount] = countLocalData;
-            bool isIndexOnServer = true;
-            for (int idxElement = 0; idxElement < this->numElement_; ++idxElement)
-            {
-              isIndexOnServer = isIndexOnServer && elementZoomMask_[idxElement](correctIndexOfElement[idxElement]);
-            }
-
-            if (isIndexOnServer)
-            {
-              globalLocalDataSendToServerMap_[globalIndex] = indexLocalDataOnClientCount;
-              localMaskIndex_[indexSend2ServerCount] = gridMaskIndex;
-              localMaskedDataIndex_[indexSend2ServerCount] = indexLocalDataOnClientCount;
-              ++indexSend2ServerCount;
-            }
+            globalLocalDataSendToServerMap_[globalIndex] = indexLocalDataOnClientCount;
+            localMaskIndex_[indexLocalDataOnClientCount] = gridMaskIndex;
+            localMaskedDataIndex_[indexLocalDataOnClientCount] = indexLocalDataOnClientCount;
             ++indexLocalDataOnClientCount;
           }
@@ -644,8 +596,6 @@
   if ((tempI < 0) || (tempI > ni))
     return -1;
-  else if (tempI == ni)
+  else
     return tempI;
-  else
-    return ((tempI)%ni);
 }
 
Index: XIOS/trunk/src/distribution_client.hpp
===================================================================
--- XIOS/trunk/src/distribution_client.hpp	(revision 1561)
+++ XIOS/trunk/src/distribution_client.hpp	(revision 1562)
@@ -97,6 +97,4 @@
     std::vector<int> nBeginLocal_;//!< Begin index of each dimension (e.x: for domain, it's always 0, for axis, it's zoom_begin, ...)
     std::vector<int> nBeginGlobal_; //!< Begin index of each dimension (e.x: ibegin, jbegin, ...)
-    std::vector<int> nZoomBegin_; //!< Begin index of zoom of each dimension
-    std::vector<int> nZoomEnd_; //!< End index of zoom of each dimension
 
     // Data_n_index of domain or axis (For now, axis uses its size as data_n_index
@@ -114,5 +112,4 @@
     std::vector<CArray<size_t,1> > elementGlobalIndex_; //!< Global index of each element
     std::vector<CArray<bool,1> > elementIndexData_; //!< // The correct index of a domain has true value, the ghost one has false value
-    std::vector<CArray<bool,1> > elementZoomMask_; //!< Only zoomed region are true
     std::vector<size_t> elementNLocal_;
     std::vector<size_t> elementNGlobal_;
Index: XIOS/trunk/src/node/axis.hpp
===================================================================
--- XIOS/trunk/src/node/axis.hpp	(revision 1561)
+++ XIOS/trunk/src/node/axis.hpp	(revision 1562)
@@ -29,5 +29,4 @@
    BEGIN_DECLARE_ATTRIBUTE_MAP(CAxis)
 #  include "axis_attribute.conf"
-#  include "axis_attribute_private.conf"
    END_DECLARE_ATTRIBUTE_MAP(CAxis)
 
Index: XIOS/trunk/src/node/grid.cpp
===================================================================
--- XIOS/trunk/src/node/grid.cpp	(revision 1561)
+++ XIOS/trunk/src/node/grid.cpp	(revision 1562)
@@ -1297,5 +1297,4 @@
       const std::vector<int>& localMaskedDataIndex = clientDistribution_->getLocalMaskedDataIndexOnClient();
       const int size = localMaskedDataIndex.size();
-      
       for(int i = 0; i < size; ++i) out(localMaskedDataIndex[i]) = data[i];
    }
@@ -1305,9 +1304,5 @@
   {
     CContext* context = CContext::getCurrent();    
-//    int nbSrvPools = (context->hasServer) ? (context->hasClient ? context->clientPrimServer.size() : 1) : 1; // This should be changed soon
-//    for (int p = 0; p < nbSrvPools; ++p)
-    {
-//      CContextClient* client = (context->hasServer) ? (context->hasClient ? context->clientPrimServer[p] : context->client)
-//                                                    : context->client;
+    {
       CContextClient* client = context->client;
 
