Index: /XIOS/trunk/src/node/context.cpp
===================================================================
--- /XIOS/trunk/src/node/context.cpp	(revision 644)
+++ /XIOS/trunk/src/node/context.cpp	(revision 645)
@@ -388,6 +388,4 @@
     if (hasClient)
     {
-      //this->buildAllExpressionOfEnabledFields();
-      //buildAllExpressionOfFieldsWithReadAccess();
       this->buildFilterGraphOfEnabledFields();
       buildFilterGraphOfFieldsWithReadAccess();
@@ -421,13 +419,4 @@
      {
        this->enabledFiles[i]->solveAllRefOfEnabledFields(sendToServer);
-     }
-   }
-
-   void CContext::buildAllExpressionOfEnabledFields()
-   {
-     int size = this->enabledFiles.size();
-     for (int i = 0; i < size; ++i)
-     {
-       this->enabledFiles[i]->buildAllExpressionOfEnabledFields();
      }
    }
@@ -476,15 +465,5 @@
   {
     for (size_t i = 0; i < fieldsWithReadAccess.size(); ++i)
-    {
       fieldsWithReadAccess[i]->solveAllReferenceEnabledField(false);
-      // Ensure that the instant data will be properly saved
-      fieldsWithReadAccess[i]->getInstantData();
-    }
-  }
-
-  void CContext::buildAllExpressionOfFieldsWithReadAccess()
-  {
-    for (size_t i = 0; i < fieldsWithReadAccess.size(); ++i)
-      fieldsWithReadAccess[i]->buildAllExpressionEnabledField();
   }
 
Index: /XIOS/trunk/src/node/context.hpp
===================================================================
--- /XIOS/trunk/src/node/context.hpp	(revision 644)
+++ /XIOS/trunk/src/node/context.hpp	(revision 645)
@@ -103,5 +103,4 @@
          // Some functions to process context
          void findAllEnabledFields(void);
-         void processEnabledFiles(void);
          void solveAllInheritance(bool apply=true);
          void findEnabledFiles(void);
@@ -111,5 +110,4 @@
          void createFileHeader(void );
          void solveAllRefOfEnabledFields(bool sendToServer);
-         void buildAllExpressionOfEnabledFields();
          void buildFilterGraphOfEnabledFields();
          void startPrefetchingOfEnabledReadModeFiles();
@@ -117,5 +115,4 @@
          void findFieldsWithReadAccess(void);
          void solveAllRefOfFieldsWithReadAccess();
-         void buildAllExpressionOfFieldsWithReadAccess();
          void buildFilterGraphOfFieldsWithReadAccess();
          void postProcessing();
@@ -227,9 +224,4 @@
         // virtual void toBinary  (StdOStream & os) const;
         // virtual void fromBinary(StdIStream & is);
-        // void solveAllGridRef(void);
-        // void solveAllOperation(void);
-        // void solveAllExpression(void);
-        // void solveFieldRefInheritance(bool apply);
-
    }; // class CContext
 
Index: /XIOS/trunk/src/node/field.cpp
===================================================================
--- /XIOS/trunk/src/node/field.cpp	(revision 644)
+++ /XIOS/trunk/src/node/field.cpp	(revision 645)
@@ -32,12 +32,8 @@
       , refObject(), baseRefObject()
       , grid(), file()
-      , freq_operation(), freq_write()
-      , nstep(0), nstepMax(0), isEOF(false)
-      , last_Write(), last_operation()
-      , foperation(), hasInstantData(false), hasExpression(false)
-      , active(false) , hasOutputFile(false),hasFieldOut(false), slotUpdateDate(NULL)
-      , processed(false), domAxisIds_("", ""), areAllReferenceSolved(false), areAllExpressionBuilt(false)
+      , nstep(0), nstepMax(0)
+      , hasOutputFile(false)
+      , domAxisIds_("", ""), areAllReferenceSolved(false)
       , isReadDataRequestPending(false)
-      , filterSources_()
    { setVirtualVariableGroup(); }
 
@@ -46,24 +42,12 @@
       , refObject(), baseRefObject()
       , grid(), file()
-      , freq_operation(), freq_write()
-      , nstep(0), nstepMax(0), isEOF(false)
-      , last_Write(), last_operation()
-      , foperation(), hasInstantData(false), hasExpression(false)
-      , active(false), hasOutputFile(false), hasFieldOut(false), slotUpdateDate(NULL)
-      , processed(false), domAxisIds_("", ""), areAllReferenceSolved(false), areAllExpressionBuilt(false)
+      , nstep(0), nstepMax(0)
+      , hasOutputFile(false)
+      , domAxisIds_("", ""), areAllReferenceSolved(false)
       , isReadDataRequestPending(false)
-      , filterSources_()
    { setVirtualVariableGroup(); }
 
    CField::~CField(void)
-   {
-//      this->grid.reset();
-//      this->file.reset();
-      this->foperation.reset();
-      if (hasExpression) delete expression;
-      if (slotUpdateDate != NULL) delete slotUpdateDate;
-
-   }
-
+   {}
 
   //----------------------------------------------------------------
@@ -95,34 +79,6 @@
       this->getVirtualVariableGroup()->solveDescInheritance(apply, NULL);
    }
-   //----------------------------------------------------------------
-   //----------------------------------------------------------------
-
-   bool CField::updateDataServer
-      (const CDate& currDate,
-       const std::deque< CArray<double, 1>* > storedClient)
-   {
-      const CDate opeDate      = *last_operation + freq_operation;
-      const CDate writeDate    = *last_Write     + freq_write;
-
-      if (opeDate <= currDate)
-      {
-         if (this->data.numElements() != this->grid->storeIndex[0]->numElements())
-         {
-            this->data.resize(this->grid->storeIndex[0]->numElements());
-         }
-         CArray<double,1> input(data.numElements());
-         this->grid->inputFieldServer(storedClient, input);
-         (*this->foperation)(input);
-         *last_operation = currDate;
-      }
-      if (writeDate < (currDate + freq_operation))
-      {
-         this->foperation->final();
-         this->incrementNStep();
-         *last_Write = writeDate;
-         return true;
-      }
-      return false;
-   }
+
+  //----------------------------------------------------------------
 
   bool CField::dispatchEvent(CEventServer& event)
@@ -163,53 +119,4 @@
       }
     }
-  }
-
-  void CField::sendUpdateData(void)
-  {
-    CContext* context = CContext::getCurrent();
-    CContextClient* client = context->client;
-
-    CEventClient event(getType(),EVENT_ID_UPDATE_DATA);
-
-    map<int,CArray<int, 1>* >::iterator it;
-    list<shared_ptr<CMessage> > list_msg;
-    list< CArray<double,1>* > list_data;
-
-    if (!grid->doGridHaveDataDistributed())
-    {
-       if (0 == client->clientRank)
-       {
-          for(it=grid->storeIndex_toSrv.begin();it!=grid->storeIndex_toSrv.end();it++)
-          {
-            int rank=(*it).first ;
-            CArray<int,1>& index = *(it->second) ;
-            CArray<double,1> data_tmp(index.numElements()) ;
-            for(int n=0;n<data_tmp.numElements();n++) data_tmp(n)=data(index(n)) ;
-
-            list_msg.push_back(shared_ptr<CMessage>(new CMessage)) ;
-            list_data.push_back(new CArray<double,1>(data_tmp)) ;
-            *list_msg.back()<<getId()<<*list_data.back() ;
-            event.push(rank,1,*list_msg.back()) ;
-          }
-          client->sendEvent(event) ;
-       } else client->sendEvent(event);
-    }
-    else
-    {
-      for(it=grid->storeIndex_toSrv.begin();it!=grid->storeIndex_toSrv.end();it++)
-      {
-        int rank=(*it).first ;
-        CArray<int,1>& index = *(it->second) ;
-        CArray<double,1> data_tmp(index.numElements()) ;
-        for(int n=0;n<data_tmp.numElements();n++) data_tmp(n)=data(index(n)) ;
-        list_msg.push_back(shared_ptr<CMessage>(new CMessage)) ;
-        list_data.push_back(new CArray<double,1>(data_tmp)) ;
-        *list_msg.back()<<getId()<<*list_data.back() ;
-        event.push(rank,grid->nbSenders[rank],*list_msg.back()) ;
-      }
-      client->sendEvent(event) ;
-    }
-
-    for (list< CArray<double,1>* >::iterator it = list_data.begin(); it != list_data.end(); it++) delete *it;
   }
 
@@ -467,4 +374,6 @@
     std::map<int, CArray<double,1> > data;
 
+    bool isEOF = false;
+
     for (int i = 0; i < ranks.size(); i++)
     {
@@ -484,37 +393,4 @@
       serverSourceFilter->streamDataFromServer(lastDataRequestedFromServer, data);
 
-    /*for (int i = 0; i < ranks.size(); i++)
-    {
-      int rank = ranks[i];
-      *buffers[i] >> record;
-      isEOF = (record == size_t(-1));
-
-      if (!isEOF)
-      {
-        CArray<int,1>& index = *grid->storeIndex_toSrv[rank];
-        CArray<double,1> data_tmp(index.numElements());
-        *buffers[i] >> data_tmp;
-        for (int n = 0; n < data_tmp.numElements(); n++)
-          instantData(index(n)) = data_tmp(n);
-      }
-      else
-        break;
-    }
-
-    if (!isEOF)
-    {
-      for (list< pair<CField*, int> >::iterator it = fieldDependency.begin(); it != fieldDependency.end(); ++it)
-        it->first->setSlot(it->second);
-
-      if (!hasExpression) // Should be always true ?
-      {
-        const std::vector<CField*>& refField = getAllReference();
-        std::vector<CField*>::const_iterator it = refField.begin(), end = refField.end();
-
-        for (; it != end; it++) (*it)->setDataFromExpression(instantData);
-        if (hasFieldOut) updateDataFromExpression(instantData);
-      }
-    }*/
-
     isReadDataRequestPending = false;
   }
@@ -553,4 +429,11 @@
    }
 
+   func::CFunctor::ETimeType CField::getOperationTimeType() const
+   {
+     return operationTimeType;
+   }
+
+   //----------------------------------------------------------------
+
    void CField::incrementNStep(void)
    {
@@ -570,47 +453,7 @@
    //----------------------------------------------------------------
 
-   const CDuration& CField::getFreqOperation(void) const
-   {
-      return this->freq_operation;
-   }
-
-   //----------------------------------------------------------------
-
-   const CDuration& CField::getFreqWrite(void) const
-   {
-      return this->freq_write;
-   }
-
-   //----------------------------------------------------------------
-
-   boost::shared_ptr<func::CFunctor> CField::getFieldOperation(void) const
-   {
-      return this->foperation;
-   }
-
    bool CField::isActive(void) const
    {
       return !this->refObject.empty();
-   }
-
-   //----------------------------------------------------------------
-
-   CArray<double, 1> CField::getData(void) const
-   {
-      return(this->data);
-   }
-
-   //----------------------------------------------------------------
-
-   boost::shared_ptr<CDate> CField::getLastWriteDate(void) const
-   {
-      return(this->last_Write);
-   }
-
-   //----------------------------------------------------------------
-
-   boost::shared_ptr<CDate> CField::getLastOperationDate(void) const
-   {
-      return(this->last_operation);
    }
 
@@ -637,7 +480,10 @@
           if (hasDirectFieldReference()) getDirectFieldReference()->solveAllReferenceEnabledField(false);
         }
-
-        solveOperation();
+        else if (context->hasServer)
+          solveServerOperation();
+
         solveGridReference();
+
+        lastDataRequestedFromServer.setRelCalendar(*context->getCalendar());
      }
      solveGridDomainAxisRef(doSending2Sever);
@@ -654,111 +500,48 @@
    }
 
-   void CField::buildAllExpressionEnabledField()
-   {
-     if (!areAllReferenceSolved) solveAllReferenceEnabledField(true);
-     if (!areAllExpressionBuilt)
-     {
-       areAllExpressionBuilt = true;
-       if (hasDirectFieldReference() && (grid_ref.isEmpty())) baseRefObject->buildAllExpressionEnabledField();
-       buildExpression();
-       active = true;
-     }
-   }
-
-   //----------------------------------------------------------------
-
-   void  CField::solveOperation(void)
-   {
-      using namespace func;
-
+   //----------------------------------------------------------------
+
+   void CField::solveServerOperation(void)
+   {
       CContext* context = CContext::getCurrent();
 
       if (!context->hasServer || !hasOutputFile) return;
 
-      StdString id;
-      if (hasId()) id = getId();
-      else if (!name.isEmpty()) id = name;
-      else if (hasDirectFieldReference()) id = baseRefObject->getId();
-
-      if (freq_op.isEmpty()) freq_op.setValue(TimeStep);
-
-      if (operation.isEmpty())
-      {
-         ERROR("CField::solveOperation(void)",
-               << "[ id = " << id << "]"
-               << "Impossible to define an operation for this field !");
-      }
+      if (freq_op.isEmpty())
+        freq_op.setValue(TimeStep);
 
       if (freq_offset.isEmpty())
         freq_offset.setValue(NoneDu);
 
-//      if (CXIOSManager::GetStatus() == CXIOSManager::LOC_SERVER)
-      if (context->hasServer)
-      {
-         if (hasOutputFile)
-         {
-           this->freq_operation_srv = this->file->output_freq.getValue();
-           this->freq_write_srv = this->file->output_freq.getValue();
-         }
-         this->lastlast_Write_srv = boost::shared_ptr<CDate>
-                        (new CDate(context->getCalendar()->getInitDate()));
-         this->last_Write_srv     = boost::shared_ptr<CDate>
-                        (new CDate(context->getCalendar()->getInitDate()));
-         this->last_operation_srv = boost::shared_ptr<CDate>
-                        (new CDate(context->getCalendar()->getInitDate()));
-//         this->foperation_srv     =
-//             boost::shared_ptr<func::CFunctor>(new CInstant(this->data_srv));
-
-         if (hasOutputFile)
-         {
-           const CDuration toffset = this->freq_operation_srv - freq_offset.getValue() - context->getCalendar()->getTimeStep();
-           *this->last_operation_srv   = *this->last_operation_srv - toffset;
-         }
-      }
-
-//      if (context->hasClient)
-//      {
-         this->freq_operation = freq_op.getValue();
-         if (hasOutputFile) this->freq_write = this->file->output_freq.getValue();
-         if (hasFieldOut)
-         {
-           this->freq_write = this->fieldOut->freq_op.getValue();
-         }
-         this->last_Write     = boost::shared_ptr<CDate>
-                        (new CDate(context->getCalendar()->getInitDate()));
-         this->last_operation = boost::shared_ptr<CDate>
-                        (new CDate(context->getCalendar()->getInitDate()));
-
-         const CDuration toffset = this->freq_operation - freq_offset.getValue() - context->getCalendar()->getTimeStep();
-         *this->last_operation   = *this->last_operation - toffset;
-
-         lastDataRequestedFromServer.setRelCalendar(*context->getCalendar());
-
-        if (operation.get() == "once") isOnceOperation = true;
-        else isOnceOperation = false;
-        isFirstOperation = true;
+      freq_operation_srv = file->output_freq.getValue();
+      freq_write_srv     = file->output_freq.getValue();
+
+      lastlast_Write_srv = boost::shared_ptr<CDate>(new CDate(context->getCalendar()->getInitDate()));
+      last_Write_srv     = boost::shared_ptr<CDate>(new CDate(context->getCalendar()->getInitDate()));
+      last_operation_srv = boost::shared_ptr<CDate>(new CDate(context->getCalendar()->getInitDate()));
+
+      const CDuration toffset = freq_operation_srv - freq_offset.getValue() - context->getCalendar()->getTimeStep();
+      *last_operation_srv     = *last_operation_srv - toffset;
+
+      if (operation.isEmpty())
+        ERROR("void CField::solveServerOperation(void)",
+              << "An operation must be defined for field \"" << getId() << "\".");
+
+      boost::shared_ptr<func::CFunctor> functor;
+      CArray<double, 1> dummyData;
 
 #define DECLARE_FUNCTOR(MType, mtype) \
-   if (operation.getValue().compare(#mtype) == 0) \
-   { \
-      if (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true) \
+      if (operation.getValue().compare(#mtype) == 0) \
       { \
-        boost::shared_ptr<func::CFunctor> foperation_(new C##MType(this->data,default_value)); \
-        this->foperation = foperation_; \
-      } \
-      else \
-      { \
-        boost::shared_ptr<func::CFunctor> foperation_(new C##MType(this->data)); \
-        this->foperation = foperation_; \
-      } \
-      return; \
-   }
+        functor.reset(new func::C##MType(dummyData)); \
+      }
 
 #include "functor_type.conf"
 
-         ERROR("CField::solveOperation(void)",
-               << "[ operation = " << operation.getValue() << "]"
-               << "The operation is not defined !");
-//      }
+      if (!functor)
+        ERROR("void CField::solveServerOperation(void)",
+              << "\"" << operation << "\" is not a valid operation.");
+
+      operationTimeType = functor->timeType();
    }
 
@@ -974,13 +757,4 @@
    }
 
-   CGrid* CField::getGridRefOfBaseReference()
-   {
-     solveRefInheritance(true);
-     solveBaseReference();
-     baseRefObject->solveGridReference();
-
-     return baseRefObject->grid;
-   }
-
    void CField::solveTransformedGrid()
    {
@@ -988,124 +762,4 @@
          && grid_ref.getValue() != getDirectFieldReference()->grid_ref.getValue() && !grid->isTransformed())
        grid->transformGrid(getDirectFieldReference()->grid);
-
-     /*if (!grid_ref.isEmpty() && (!field_ref.isEmpty()))
-     {
-       CField* fieldRef  = this;
-       CGrid* gridRefOfFieldRef = 0;
-       while (fieldRef->hasDirectFieldReference())
-       {
-         if ((!(fieldRef->grid_ref.isEmpty())) &&
-             (fieldRef->grid_ref.getValue() != grid_ref.getValue()))
-         {
-           gridRefOfFieldRef = fieldRef->getGridRefOfBaseReference();
-           fieldRef->addReference(this);
-           fieldRef->solveGridDomainAxisRef(false);
-           break;
-         }
-         CField* tmp = fieldRef->getDirectFieldReference();
-         fieldRef = tmp;
-       }
-
-       if ((0 == gridRefOfFieldRef) &&
-           (!(fieldRef->grid_ref.isEmpty())) &&
-           (fieldRef->grid_ref.getValue() != grid_ref.getValue()))
-       {
-         gridRefOfFieldRef = fieldRef->getGridRefOfBaseReference();
-         fieldRef->addReference(this);
-         fieldRef->solveGridDomainAxisRef(false);
-       }
-
-       CGrid* relGridRef = CGrid::get(grid_ref.getValue());
-       if ((0 != gridRefOfFieldRef) && (relGridRef != gridRefOfFieldRef) && (!(relGridRef->isTransformed())))
-       {
-         relGridRef->transformGrid(gridRefOfFieldRef);
-         filterSources_.push_back(fieldRef);
-       }
-     }*/
-   }
-
-   const std::vector<CField*>& CField::getFilterSources()
-   {
-     return filterSources_;
-   }
-
-   void CField::applyFilter(const CArray<double, 1>& dataToSend, CArray<double,1>& dataToReceive)
-   {
-     std::vector<CField*>::iterator  itFilterSrc, iteFilterSrc;
-     if (!filterSources_.empty())
-     {
-        itFilterSrc = filterSources_.begin(); iteFilterSrc = filterSources_.end();
-        dataToReceive = 0.0; // Reset all data destination
-        for (; itFilterSrc != iteFilterSrc; ++itFilterSrc)
-        {
-          if (0 != grid->getTransformations())
-          {
-             const std::map<int, CArray<int,1>* >& localIndexToSend = grid->getTransformations()->getLocalIndexToSendFromGridSource();
-             const std::map<int,std::vector<std::vector<std::pair<int,double> > > >& localIndexToReceive = grid->getTransformations()->getLocalIndexToReceiveOnGridDest();
-
-             sendAndReceiveTransformedData(localIndexToSend, dataToSend,
-                                           localIndexToReceive, dataToReceive);
-          }
-
-        }
-     }
-   }
-
-   void CField::sendAndReceiveTransformedData(const std::map<int, CArray<int,1>* >& localIndexToSend,
-                                              const CArray<double, 1>& dataSrc,
-                                              const std::map<int,std::vector<std::vector<std::pair<int,double> > > >& localIndexToReceive,
-                                              CArray<double,1>& dataDest)
-   {
-     CContext* context = CContext::getCurrent();
-     CContextClient* client=context->client;
-
-     // Sending data from field sources to do transformations
-     std::map<int, CArray<int,1>* >::const_iterator itbSend = localIndexToSend.begin(), itSend,
-                                                    iteSend = localIndexToSend.end();
-     int sendBuffSize = 0;
-     for (itSend = itbSend; itSend != iteSend; ++itSend) sendBuffSize = (sendBuffSize < (itSend->second)->numElements())
-                                                                        ? (itSend->second)->numElements(): sendBuffSize;
-     double* sendBuff;
-     if (0 != sendBuffSize) sendBuff = new double [sendBuffSize];
-     for (itSend = itbSend; itSend != iteSend; ++itSend)
-     {
-       int destRank = itSend->first;
-       CArray<int,1>* localIndex_p = itSend->second;
-       int countSize = localIndex_p->numElements();
-       for (int idx = 0; idx < countSize; ++idx)
-       {
-         sendBuff[idx] = dataSrc((*localIndex_p)(idx));
-       }
-       MPI_Send(sendBuff, countSize, MPI_DOUBLE, destRank, 12, client->intraComm);
-     }
-
-     // Receiving data on destination fields
-     std::map<int,std::vector<std::vector<std::pair<int,double> > > >::const_iterator itbRecv = localIndexToReceive.begin(), itRecv,
-                                                                  iteRecv = localIndexToReceive.end();
-     int recvBuffSize = 0;
-     for (itRecv = itbRecv; itRecv != iteRecv; ++itRecv) recvBuffSize = (recvBuffSize < (itRecv->second).size())
-                                                                        ? (itRecv->second).size() : recvBuffSize;
-     double* recvBuff;
-     if (0 != recvBuffSize) recvBuff = new double [recvBuffSize];
-     for (itRecv = itbRecv; itRecv != iteRecv; ++itRecv)
-     {
-       MPI_Status status;
-       int srcRank = itRecv->first;
-       int countSize = (itRecv->second).size();
-       MPI_Recv(recvBuff, recvBuffSize, MPI_DOUBLE, srcRank, 12, client->intraComm, &status);
-       for (int idx = 0; idx < countSize; ++idx)
-       {
-         const std::vector<std::pair<int,double> >& localIndex_p = (itRecv->second)[idx];
-         int numIndex = localIndex_p.size();
-         for (int i = 0; i < numIndex; ++i)
-         {
-//           if ((localIndex_p)[i].first >= dataDest.numElements() )
-           dataDest((localIndex_p)[i].first) += recvBuff[idx] * ((localIndex_p)[i].second);
-         }
-       }
-     }
-
-     if (0 != sendBuffSize) delete [] sendBuff;
-     if (0 != recvBuffSize) delete [] recvBuff;
    }
 
@@ -1221,129 +875,4 @@
       }
     }
-
-  CArray<double,1>* CField::getInstantData(void)
-  {
-    if (!hasInstantData)
-    {
-      instantData.resize(grid->storeIndex_client.numElements());
-      hasInstantData = true;
-    }
-    return &instantData;
-  }
-
-  void CField::addDependency(CField* field, int slotId)
-  {
-    fieldDependency.push_back(pair<CField*,int>(field,slotId));
-  }
-
-  void CField::buildExpression(void)
-  {
-    if (content.size() > 0)
-    {
-      CSimpleNodeExpr* simpleExpr;// = parseExpr(content+'\0');
-      expression = CFieldNode::newNode(simpleExpr);
-      delete simpleExpr;
-      set<string> instantFieldIds;
-      map<string,CField*> associatedInstantFieldIds;
-      expression->getInstantFieldIds(instantFieldIds);
-      for (set<string>::iterator it = instantFieldIds.begin(); it != instantFieldIds.end(); ++it)
-      {
-        if (*it != "this")
-        {
-          if (CField::has(*it))
-          {
-            CField* field = CField::get(*it);
-//            field->processEnabledField();
-            field->buildAllExpressionEnabledField();
-            associatedInstantFieldIds[*it] = field;
-          }
-          else  ERROR("void CField::buildExpression(void)", << " Field " << *it << " does not exist");
-        }
-      }
-
-      set<string> averageFieldIds;
-      map<string,CField*> associatedAverageFieldIds;
-
-      expression->getAverageFieldIds(averageFieldIds);
-      for (set<string>::iterator it = averageFieldIds.begin(); it != averageFieldIds.end(); ++it)
-      {
-        if (CField::has(*it))
-        {
-           CFieldGroup* root = CFieldGroup::get("field_definition");
-           CField* averageField = root->createChild();
-           CField* instantField = root->createChild();
-           averageField->field_ref = *it;
-           averageField->hasFieldOut = true;
-           averageField->fieldOut = instantField;
-           instantField->freq_op = freq_op;
-//           averageField-> processEnabledField();
-           averageField->buildAllExpressionEnabledField();
-           instantField->SuperClassAttribute::setAttributes(averageField, true);
-           instantField->field_ref.reset();
-           instantField->operation.reset();
-
-//           instantField-> processEnabledField();
-           instantField->buildAllExpressionEnabledField();
-           associatedAverageFieldIds[*it] = instantField;
-        }
-        else ERROR("void CField::buildExpression(void)", << " Field " << *it << " does not exist");
-      }
-
-      expression->reduce(this,associatedInstantFieldIds,associatedAverageFieldIds);
-
-      slots.resize(instantFieldIds.size() + averageFieldIds.size());
-      resetSlots();
-      int slotId = 0;
-      set<CField*> fields;
-      expression->getFields(fields);
-      for (set<CField*>::iterator it = fields.begin(); it != fields.end(); ++it, ++slotId) (*it)->addDependency(this,slotId);
-      hasExpression = true;
-    }
-  }
-
-  void CField::resetSlots(void)
-  {
-    for (vector<bool>::iterator it = slots.begin(); it != slots.end(); ++it) *it = false;
-  }
-
-  bool CField::slotsFull(void)
-  {
-    bool ret = true;
-    for (vector<bool>::iterator it = slots.begin(); it != slots.end(); ++it) ret &= *it;
-    return ret;
-  }
-
-  void CField::setSlot(int slotId)
-  {
-    CContext* context = CContext::getCurrent();
-    const CDate& currDate = context->getCalendar()->getCurrentDate();
-    if (slotUpdateDate == NULL || currDate != *slotUpdateDate)
-    {
-      resetSlots();
-      if (slotUpdateDate == NULL) slotUpdateDate = new CDate(currDate);
-      else *slotUpdateDate = currDate;
-    }
-    slots[slotId] = true;
-    if (slotsFull())
-    {
-      CArray<double,1> expr(expression->compute());
-
-      if (hasInstantData)
-      {
-        instantData = expr;
-        for (list< pair<CField *,int> >::iterator it = fieldDependency.begin(); it != fieldDependency.end(); ++it)
-          if (it->first != this) it->first->setSlot(it->second);
-      }
-
-      if (hasOutputFile) updateDataFromExpression(expr);
-
-      const std::vector<CField*>& refField = getAllReference();
-      for (std::vector<CField*>::const_iterator it = refField.begin(); it != refField.end(); it++)
-      {
-        if (!(*it)->hasExpression)
-          (*it)->setDataFromExpression(expr);
-      }
-    }
-  }
 
    /*!
@@ -1484,123 +1013,3 @@
 
    DEFINE_REF_FUNC(Field,field)
-
-//  void CField::addReference(CField* field)
-//  {
-//    refObject.push_back(field);
-//  }
-//
-//   //----------------------------------------------------------------
-//
-//   bool CField::hasDirectFieldReference(void) const
-//   {
-//     return !this->field_ref.isEmpty();
-//   }
-//
-//   //----------------------------------------------------------------
-//
-//   const StdString& CField::getBaseFieldId(void) const
-//   {
-//      return this->getBaseFieldReference()->getId();
-//   }
-//
-//   //----------------------------------------------------------------
-//
-//   /*!
-//   \brief Get pointer to direct field to which the current field refers.
-//   */
-//   CField* CField::getDirectFieldReference(void) const
-//   {
-//      if (this->field_ref.isEmpty())
-//         return this->getBaseFieldReference();
-//
-//      if (!CField::has(this->field_ref.getValue()))
-//         ERROR("CField::getDirectFieldReference(void)",
-//               << "[ ref_name = " << this->field_ref.getValue() << "]"
-//               << " invalid field name !");
-//
-//      return CField::get(this->field_ref.getValue());
-//   }
-//
-//   //----------------------------------------------------------------
-//
-//   CField* CField::getBaseFieldReference(void) const
-//   {
-//      return baseRefObject;
-//   }
-//
-//   //----------------------------------------------------------------
-//
-//   const std::vector<CField*>& CField::getAllReference(void) const
-//   {
-//      return refObject;
-//   }
-//
-//   /*!
-//   \brief Searching for all reference of a field
-//   If a field refers to (an)other field(s), we will search for all its referenced parents.
-//   Moreover, if any father, direct or indirect (e.g: two levels up), has non-empty attributes,
-//   all its attributes will be added to the current field
-//   \param [in] apply Flag to specify whether current field uses attributes of its father
-//               in case the attribute is empty (true) or its attributes are replaced by ones of its father (false)
-//   */
-//   void CField::solveRefInheritance(bool apply)
-//   {
-//      std::set<CField *> sset;
-//      CField* refer_sptr;
-//      CField* refer_ptr = this;
-//
-//      while (refer_ptr->hasDirectFieldReference())
-//      {
-//         refer_sptr = refer_ptr->getDirectFieldReference();
-//         refer_ptr  = refer_sptr;
-//
-//         if(sset.end() != sset.find(refer_ptr))
-//         {
-//            DEBUG (<< "Circular dependency stopped for field object on "
-//                   << "\"" + refer_ptr->getId() + "\" !");
-//            break;
-//         }
-//
-//         SuperClassAttribute::setAttributes(refer_ptr, apply);
-//         sset.insert(refer_ptr);
-//      }
-//   }
-//
-//   /*!
-//   \brief Only on SERVER side. Remove all field_ref from current field
-//   On creating a new field on server side, redundant "field_ref" is still kept in the attribute list
-//   of the current field. This function removes this from current field
-//   */
-//   void CField::removeRefInheritance()
-//   {
-//     if (this->field_ref.isEmpty()) return;
-//     this->clearAttribute("field_ref");
-//   }
-//
-//   void CField::solveBaseReference(void)
-//   {
-//      std::set<CField *> sset;
-//      CField* refer_sptr;
-//      CField* refer_ptr = this;
-//
-//      if (this->hasDirectFieldReference())  baseRefObject = getDirectFieldReference();
-//      else  baseRefObject = CField::get(this);
-//
-//      while (refer_ptr->hasDirectFieldReference())
-//      {
-//         refer_sptr = refer_ptr->getDirectFieldReference();
-//         refer_ptr  = refer_sptr;
-//
-//         if(sset.end() != sset.find(refer_ptr))
-//         {
-//            DEBUG (<< "Circular dependency stopped for field object on "
-//                   << "\"" + refer_ptr->getId() + "\" !");
-//            break;
-//         }
-//
-//         sset.insert(refer_ptr);
-//      }
-//
-//      if (hasDirectFieldReference()) baseRefObject->addReference(this);
-//   }
 } // namespace xios
Index: /XIOS/trunk/src/node/field.hpp
===================================================================
--- /XIOS/trunk/src/node/field.hpp	(revision 644)
+++ /XIOS/trunk/src/node/field.hpp	(revision 645)
@@ -78,17 +78,10 @@
          CFile* getRelFile(void) const ;
 
+         func::CFunctor::ETimeType getOperationTimeType() const;
+
       public :
 
          StdSize getNStep(void) const;
 
-         const CDuration & getFreqOperation(void) const;
-         const CDuration & getFreqWrite(void) const;
-
-         boost::shared_ptr<CDate> getLastWriteDate(void) const;
-         boost::shared_ptr<CDate> getLastOperationDate(void) const;
-
-         boost::shared_ptr<func::CFunctor> getFieldOperation(void) const;
-
-         CArray<double, 1> getData(void) const;
          template <int N> void getData(CArray<double, N>& _data) const;
 
@@ -101,34 +94,17 @@
          void resetNStepMax();
 
-         template <int N> bool updateData(const CArray<double, N>&   data);
-         template <int N> bool updateFilteredData(CArray<double, N>&   data);
-         template<int N>
-         void updateDataWithoutOperation(const CArray<double, N>& _data, CArray<double,1>& updatedData);
-         bool updateDataFromExpression(const CArray<double, 1>&   data);
-         void setDataFromExpression(const CArray<double, 1>& _data) ;
-
-         bool updateDataServer
-               (const CDate & currDate,
-                const std::deque< CArray<double, 1>* > storedClient);
-
          std::map<int, StdSize> getGridDataSize();
 
        public :
          bool isActive(void) const;
-         bool active ;
          bool hasOutputFile ;
-         bool hasFieldOut ;
 
          /// Traitements ///
-         void processEnabledField(void) ;
-
          void solveGridReference(void);
-         void solveOperation(void);
+         void solveServerOperation(void);
          void solveCheckMaskIndex(bool doSendingIndex);
          void solveAllReferenceEnabledField(bool doSending2Sever);
-         void buildAllExpressionEnabledField();
          void solveGridDomainAxisRef(bool checkAtt);
          void solveTransformedGrid();
-         CGrid* getGridRefOfBaseReference();
 
          void buildFilterGraph(CGarbageCollector& gc, bool enableOutput);
@@ -149,5 +125,4 @@
         template <int N> void setData(const CArray<double, N>& _data) ;
         static bool dispatchEvent(CEventServer& event) ;
-        void sendUpdateData(void) ;
         void sendUpdateData(const CArray<double,1>& data);
         static void recvUpdateData(CEventServer& event) ;
@@ -170,5 +145,4 @@
         void invertScaleFactorAddOffset(double scaleFactor, double addOffset);
         void parse(xml::CXMLNode & node) ;
-        CArray<double,1>* getInstantData(void)  ;
 
         void setVirtualVariableGroup(CVariableGroup* newVVariableGroup);
@@ -191,10 +165,4 @@
         const std::pair<StdString, StdString>& getRefDomainAxisIds();
 
-        const std::vector<CField*>& getFilterSources();
-        void applyFilter(const CArray<double, 1>& dataToSend, CArray<double,1>& dataToReceive);
-        void sendAndReceiveTransformedData(const std::map<int, CArray<int,1>* >& localIndexToSend,
-                                           const CArray<double, 1>& dataSrc,
-                                           const std::map<int,std::vector<std::vector<std::pair<int,double> > > >& localIndexToReceive,
-                                           CArray<double,1>& dataDest);
       public :
          /// PropriÃ©tÃ©s privÃ©es ///
@@ -203,46 +171,27 @@
          CGrid*  grid ;
          CFile*  file;
-         CField* fieldOut ;
-
-         CDuration freq_operation, freq_write;
+
          CDuration freq_operation_srv, freq_write_srv;
 
          StdSize nstep, nstepMax;
          bool isEOF;
-         boost::shared_ptr<CDate>    last_Write, last_operation;
-         boost::shared_ptr<CDate>    lastlast_Write_srv,last_Write_srv, last_operation_srv;
+         boost::shared_ptr<CDate> lastlast_Write_srv, last_Write_srv, last_operation_srv;
          CDate lastDataRequestedFromServer;
 
-         boost::shared_ptr<func::CFunctor> foperation;
          map<int,boost::shared_ptr<func::CFunctor> > foperation_srv;
 
-         CArray<double, 1> data;
-         CArray<double, 1> instantData;
-         CArray<double, 1> filteredData;
-         bool hasInstantData ;
          map<int, CArray<double,1>* > data_srv ;
-         bool isOnceOperation ;
-         bool isFirstOperation ;
          string content ;
 
-         list< pair<CField *,int> > fieldDependency ;
-         void buildExpression(void) ;
-         void addDependency(CField* field, int slotId) ;
-         void resetSlots(void) ;
-         vector<bool> slots ;
-         CDate* slotUpdateDate ;
-         CFieldNode * expression ;
-         bool hasExpression ;
-         bool slotsFull(void) ;
-         void setSlot(int slotId);
-         bool processed ;
          bool areAllReferenceSolved;
-         bool areAllExpressionBuilt;
          std::pair<StdString,StdString> domAxisIds_;
          bool isReadDataRequestPending;
-         std::vector<CField*> filterSources_;
+
          DECLARE_REF_FUNC(Field,field)
 
       private:
+         //! The type of operation attached to the field
+         func::CFunctor::ETimeType operationTimeType;
+
          //! The output pin of the filter providing the instant data for the field
          boost::shared_ptr<COutputPin> instantDataFilter;
Index: /XIOS/trunk/src/node/field_impl.hpp
===================================================================
--- /XIOS/trunk/src/node/field_impl.hpp	(revision 644)
+++ /XIOS/trunk/src/node/field_impl.hpp	(revision 645)
@@ -23,264 +23,5 @@
       ERROR("void CField::setData(const CArray<double, N>& _data)",
             << "Impossible to receive data from the model for a field [ id = " << getId() << " ] with a reference or an arithmetic operation.");
-
-    /*if (hasInstantData)
-    {
-      grid->inputField(_data, instantData);
-      for(list< pair<CField *,int> >::iterator it=fieldDependency.begin(); it!=fieldDependency.end(); ++it)  it->first->setSlot(it->second);
-    }
-
-    if (!hasExpression)
-    {
-      const std::vector<CField*>& refField=getAllReference();
-      std::vector<CField*>::const_iterator  it = refField.begin(), end = refField.end(),
-                                            itFilterSrc, iteFilterSrc;
-
-      for (; it != end; it++)
-      {
-        const std::vector<CField*>& fieldFilterSources = (*it)->getFilterSources();
-        if (!fieldFilterSources.empty())
-        {
-          itFilterSrc  = fieldFilterSources.begin();
-          iteFilterSrc = fieldFilterSources.end();
-          for (; itFilterSrc != iteFilterSrc; ++itFilterSrc)
-          {
-            (*itFilterSrc)->updateDataWithoutOperation(_data, (*itFilterSrc)->data);
-            if ((*it)->filteredData.numElements() != (*it)->grid->storeIndex_client.numElements())
-            {
-               (*it)->filteredData.resize((*it)->grid->storeIndex_client.numElements());
-            }
-            (*it)->applyFilter((*itFilterSrc)->data, (*it)->filteredData);
-          }
-          if ((*it)->hasOutputFile || (*it)->hasFieldOut) (*it)->updateFilteredData((*it)->filteredData);
-        }
-        else
-        {
-          (*it)->setData(_data);
-        }
-      }
-      if (hasOutputFile || hasFieldOut) updateData(_data);
-    }*/
   }
-
-  void CField::setDataFromExpression(const CArray<double, 1>& _data)
-  {
-    if (hasInstantData)
-    {
-      instantData=_data;
-      for(list< pair<CField *,int> >::iterator it=fieldDependency.begin(); it!=fieldDependency.end(); ++it)  it->first->setSlot(it->second);
-    }
-
-    if (!hasExpression)
-    {
-      const std::vector<CField*>& refField=getAllReference();
-      std::vector<CField*>::const_iterator  it = refField.begin(), end = refField.end();
-
-      for (; it != end; it++) (*it)->setDataFromExpression(_data);
-      if (hasOutputFile || hasFieldOut) updateDataFromExpression(_data);
-    }
-  }
-
-   template<int N>
-   void CField::updateDataWithoutOperation(const CArray<double, N>& _data, CArray<double,1>& updatedData)
-   {
-     if (updatedData.numElements() != this->grid->storeIndex_client.numElements())
-     {
-        updatedData.resize(this->grid->storeIndex_client.numElements());
-        this->grid->inputField(_data, updatedData);
-     }
-   }
-
-   template<int N>
-   bool CField::updateFilteredData(CArray<double, N>& filteredData)
-   {
-      CContext* context=CContext::getCurrent();
-      const CDate & currDate = context->getCalendar()->getCurrentDate();
-      const CDate opeDate      = *last_operation + freq_operation;
-      const CDate writeDate    = *last_Write     + freq_write;
-      bool doOperation, doWrite;
-
-
-      info(50) << "CField::updateData " << currDate <<  " : send data to " << this->getBaseFieldId() << std::endl;
-      info(50) << "Next operation "  << opeDate<<std::endl;
-
-      doOperation = (opeDate <= currDate);
-      if (isOnceOperation)
-        if (isFirstOperation) doOperation=true;
-        else doOperation=false;
-
-      if (doOperation)
-      {
-         if (this->data.numElements() != filteredData.numElements())
-         {
-            this->data.resize(filteredData.numElements());
-         }
-
-         (*this->foperation)(filteredData);
-
-         *last_operation = currDate;
-         info(50) << "(*last_operation = currDate) : " << *last_operation << " = " << currDate << std::endl;
-      }
-
-      doWrite = (writeDate < (currDate + freq_operation));
-      if (isOnceOperation)
-      {
-        if(isFirstOperation)
-        {
-          doWrite=true;
-          isFirstOperation=false;
-        }
-        else doWrite=false;
-      }
-
-      if (doWrite)
-      {
-         this->foperation->final();
-         *last_Write = writeDate;
-         if (hasOutputFile)
-         {
-           info(50) << "(*last_Write = currDate) : " << *last_Write << " = " << currDate << std::endl;
-           CTimer::get("XIOS Send Data").resume();
-           sendUpdateData();
-           CTimer::get("XIOS Send Data").suspend();
-         }
-
-//         if (hasFieldOut)
-//         {
-//           fieldOut->setDataFromExpression(data);
-//         }
-         return (true);
-      }
-
-      return (false);
-   }
-
-   template <int N>
-   bool CField::updateData(const CArray<double, N>& _data)
-   {
-      CContext* context=CContext::getCurrent();
-      const CDate & currDate = context->getCalendar()->getCurrentDate();
-      const CDate opeDate      = *last_operation + freq_operation;
-      const CDate writeDate    = *last_Write     + freq_write;
-      bool doOperation, doWrite;
-
-
-      info(50) << "CField::updateData " << currDate <<  " : send data to " << this->getBaseFieldId() << std::endl;
-      info(50) << "Next operation "  << opeDate<<std::endl;
-
-      doOperation = (opeDate <= currDate);
-      if (isOnceOperation)
-        if (isFirstOperation) doOperation=true;
-        else doOperation=false;
-
-      if (doOperation)
-      {
-         if (this->data.numElements() != this->grid->storeIndex_client.numElements())
-         {
-            this->data.resize(this->grid->storeIndex_client.numElements());
-         }
-
-         CArray<double,1> input(data.numElements());
-         this->grid->inputField(_data, input);
-         (*this->foperation)(input);
-
-         *last_operation = currDate;
-         info(50) << "(*last_operation = currDate) : " << *last_operation << " = " << currDate << std::endl;
-      }
-
-      doWrite = (writeDate < (currDate + freq_operation));
-      if (isOnceOperation)
-      {
-        if(isFirstOperation)
-        {
-          doWrite=true;
-          isFirstOperation=false;
-        }
-        else doWrite=false;
-      }
-
-      if (doWrite)
-      {
-         this->foperation->final();
-         *last_Write = writeDate;
-         if (hasOutputFile)
-         {
-           info(50) << "(*last_Write = currDate) : " << *last_Write << " = " << currDate << std::endl;
-           CTimer::get("XIOS Send Data").resume();
-           sendUpdateData();
-           CTimer::get("XIOS Send Data").suspend();
-         }
-
-         if (hasFieldOut)
-         {
-           fieldOut->setDataFromExpression(data);
-         }
-         return (true);
-      }
-
-      return (false);
-   }
-
-   bool CField::updateDataFromExpression(const CArray<double, 1>& _data)
-   {
-      CContext* context=CContext::getCurrent();
-      const CDate & currDate = context->getCalendar()->getCurrentDate();
-      const CDate opeDate      = *last_operation + freq_operation;
-      const CDate writeDate    = *last_Write     + freq_write;
-      bool doOperation, doWrite;
-
-
-      info(50) << "CField::updateData " << currDate <<  " : send data to " << this->getBaseFieldId() << std::endl;
-      info(50) << "Next operation "  << opeDate<<std::endl;
-
-      doOperation = (opeDate <= currDate);
-      if (isOnceOperation)
-        if (isFirstOperation) doOperation=true;
-        else doOperation=false;
-
-      if (doOperation)
-      {
-         if (this->data.numElements() != this->grid->storeIndex_client.numElements())
-         {
-            this->data.resize(this->grid->storeIndex_client.numElements());
-         }
-
-        (*this->foperation)(_data);
-
-         *last_operation = currDate;
-         info(50) << "(*last_operation = currDate) : " << *last_operation << " = " << currDate << std::endl;
-      }
-
-      doWrite = (writeDate < (currDate + freq_operation));
-      if (isOnceOperation)
-      {
-        if(isFirstOperation)
-        {
-          doWrite=true;
-          isFirstOperation=false;
-        }
-        else doWrite=false;
-      }
-
-      if (doWrite)
-      {
-         this->foperation->final();
-         *last_Write = writeDate;
-         if (hasOutputFile)
-         {
-           info(50) << "(*last_Write = currDate) : " << *last_Write << " = " << currDate << std::endl;
-           CTimer::get("XIOS Send Data").resume();
-           sendUpdateData();
-           CTimer::get("XIOS Send Data").suspend();
-         }
-
-         if (hasFieldOut)
-         {
-           fieldOut->setDataFromExpression(data);
-         }
-         return (true);
-      }
-
-      return (false);
-   }
 
   template <int N>
@@ -294,16 +35,4 @@
         ERROR("void CField::getData(CArray<double, N>& _data) const",
               << "Impossible to access field data, all the records of the field [ id = " << getId() << " ] have been already read.");
-
-      /*CContext* context = CContext::getCurrent();
-      const CDate& currentDate = context->getCalendar()->getCurrentDate();
-
-      while (isReadDataRequestPending)
-        context->checkBuffersAndListen();
-
-      if (isEOF)
-        ERROR("void CField::getData(CArray<double, N>& _data) const",
-              << "Impossible to access field data, all the records of the field [ id = " << getId() << " ] have been already read.");
-
-      grid->outputField(instantData, _data);*/
     }
     else
Index: /XIOS/trunk/src/node/file.cpp
===================================================================
--- /XIOS/trunk/src/node/file.cpp	(revision 644)
+++ /XIOS/trunk/src/node/file.cpp	(revision 645)
@@ -572,21 +572,4 @@
    //----------------------------------------------------------------
 
-//   void CFile::processEnabledFile(void)
-//   {
-//     if (output_freq.isEmpty()) ERROR("void CFile::processEnabledFile(void)",
-//                                       <<"File attribute <<output_freq>> is undefined");
-//     solveFieldRefInheritance(true) ;
-//     getEnabledFields() ;
-//     processEnabledFields() ;
-//   }
-
-//   void CFile::processEnabledFields(void)
-//   {
-//      for (unsigned int i = 0; i < this->enabledFields.size(); i++)
-//      {
-//        this->enabledFields[i]->processEnabledField() ;
-//      }
-//   }
-
    /*!
    \brief Resolve all reference of active fields.
@@ -607,19 +590,4 @@
 
    /*!
-   \brief Contruct all expression related to active fields.
-      Each field can do some expressions which appear on the xml file, and itself can be
-   a result of an expression among some other fields. This function builds all possible expression
-   relating to active fields.
-   */
-   void CFile::buildAllExpressionOfEnabledFields()
-   {
-     int size = this->enabledFields.size();
-     for (int i = 0; i < size; ++i)
-     {
-       this->enabledFields[i]->buildAllExpressionEnabledField();
-     }
-   }
-
-   /*!
     * Constructs the filter graph for each active field.
     *
@@ -670,24 +638,4 @@
 
    //----------------------------------------------------------------
-
-   void CFile::solveEFGridRef(void)
-   {
-      for (unsigned int i = 0; i < this->enabledFields.size(); i++)
-         this->enabledFields[i]->solveGridReference();
-   }
-
-   //----------------------------------------------------------------
-
-   void CFile::solveEFOperation(void)
-   {
-      for (unsigned int i = 0; i < this->enabledFields.size(); i++)
-         this->enabledFields[i]->solveOperation();
-   }
-
-   void CFile::solveEFExpression(void)
-   {
-      for (unsigned int i = 0; i < this->enabledFields.size(); i++)
-         this->enabledFields[i]->buildExpression();
-   }
 
    /*!
Index: /XIOS/trunk/src/node/file.hpp
===================================================================
--- /XIOS/trunk/src/node/file.hpp	(revision 644)
+++ /XIOS/trunk/src/node/file.hpp	(revision 645)
@@ -103,11 +103,6 @@
          // Some processing on file
          void solveFieldRefInheritance(bool apply);
-         void solveEFGridRef(void);
-         void solveEFOperation(void);
-         void solveEFExpression(void);
          void processEnabledFile(void) ;
-         void processEnabledFields(void) ;
          void solveAllRefOfEnabledFields(bool sendToServer);
-         void buildAllExpressionOfEnabledFields();
          void buildFilterGraphOfEnabledFields(CGarbageCollector& gc);
          void prefetchEnabledReadModeFields();
Index: /XIOS/trunk/src/output/nc4_data_output.cpp
===================================================================
--- /XIOS/trunk/src/output/nc4_data_output.cpp	(revision 644)
+++ /XIOS/trunk/src/output/nc4_data_output.cpp	(revision 645)
@@ -827,5 +827,5 @@
          }
 
-         bool wtime   = !(!field->operation.isEmpty() && field->foperation->timeType() == func::CFunctor::once);
+         bool wtime   = !(!field->operation.isEmpty() && field->getOperationTimeType() == func::CFunctor::once);
 
          if (wtime)
@@ -836,6 +836,6 @@
            //     << "_" << field->getRelFile()->output_freq.getValue();
           //oss
-            if (field->foperation->timeType() == func::CFunctor::instant) coodinates.push_back(string("time_instant"));
-            else if (field->foperation->timeType() == func::CFunctor::centered) coodinates.push_back(string("time_centered"));
+            if (field->getOperationTimeType() == func::CFunctor::instant) coodinates.push_back(string("time_instant"));
+            else if (field->getOperationTimeType() == func::CFunctor::centered) coodinates.push_back(string("time_centered"));
             dims.push_back(timeid);
          }
@@ -1136,12 +1136,12 @@
          StdOStringStream oss;
          string timeAxisId ;
-         if (field->foperation->timeType() == func::CFunctor::instant)  timeAxisId="time_instant" ;
-         else if (field->foperation->timeType() == func::CFunctor::centered)  timeAxisId="time_centered" ;
+         if (field->getOperationTimeType() == func::CFunctor::instant)  timeAxisId="time_instant" ;
+         else if (field->getOperationTimeType() == func::CFunctor::centered)  timeAxisId="time_centered" ;
 
          StdString timeBoundId("time_counter_bounds");
 
          StdString timeAxisBoundId;
-         if (field->foperation->timeType() == func::CFunctor::instant)  timeAxisBoundId="time_instant_bounds" ;
-         else if (field->foperation->timeType() == func::CFunctor::centered)  timeAxisBoundId="time_centered_bounds" ;
+         if (field->getOperationTimeType() == func::CFunctor::instant)  timeAxisBoundId="time_instant_bounds" ;
+         else if (field->getOperationTimeType() == func::CFunctor::centered)  timeAxisBoundId="time_centered_bounds" ;
 
          CArray<double,1> time_data(1) ;
@@ -1150,18 +1150,18 @@
          CArray<double,1> time_data_bound(2);
 
-        bool wtime   = !(!field->operation.isEmpty() && (field->foperation->timeType() == func::CFunctor::once));
+        bool wtime   = !(!field->operation.isEmpty() && (field->getOperationTimeType() == func::CFunctor::once));
 
         if (wtime)
         {
           time_counter(0)= (Time(*field->last_Write_srv) + Time(*field->lastlast_Write_srv)) / 2;
-          if (field->foperation->timeType() == func::CFunctor::instant)
+          if (field->getOperationTimeType() == func::CFunctor::instant)
             time_data(0) = Time(*field->last_Write_srv);
-          else if (field->foperation->timeType() == func::CFunctor::centered) time_data(0) = time_counter(0);
+          else if (field->getOperationTimeType() == func::CFunctor::centered) time_data(0) = time_counter(0);
 
           time_counter_bound(0) = Time(*field->lastlast_Write_srv);
           time_counter_bound(1) = Time(*field->last_Write_srv);
-          if (field->foperation->timeType() == func::CFunctor::instant)
+          if (field->getOperationTimeType() == func::CFunctor::instant)
             time_data_bound(0) = time_data_bound(1) = Time(*field->last_Write_srv);
-          else if (field->foperation->timeType() == func::CFunctor::centered)
+          else if (field->getOperationTimeType() == func::CFunctor::centered)
           {
             time_data_bound(0) = time_counter_bound(0);
@@ -1253,6 +1253,5 @@
          StdOStringStream oss;
 
-//         if (field->operation.getValue().compare("once") == 0) return ;
-         if (field->foperation->timeType() == func::CFunctor::once) return ;
+         if (field->getOperationTimeType() == func::CFunctor::once) return ;
 
 //         oss << "time_" << field->operation.getValue()
@@ -1260,6 +1259,6 @@
 
 //         StdString axisid = oss.str();
-//         if (field->foperation->timeType() == func::CFunctor::centered) axisid="time_centered" ;
-//         else if (field->foperation->timeType() == func::CFunctor::instant) axisid="time_instant" ;
+//         if (field->getOperationTimeType() == func::CFunctor::centered) axisid="time_centered" ;
+//         else if (field->getOperationTimeType() == func::CFunctor::instant) axisid="time_instant" ;
 
          StdString axisid("time_centered") ;
@@ -1268,5 +1267,5 @@
          StdString timeBoundId("axis_nbounds");
 
-         if (field->foperation->timeType() == func::CFunctor::instant)
+         if (field->getOperationTimeType() == func::CFunctor::instant)
          {
             axisid = "time_instant";
Index: OS/trunk/src/parse_expr/expr_node.cpp
===================================================================
--- /XIOS/trunk/src/parse_expr/expr_node.cpp	(revision 644)
+++ 	(revision )
@@ -1,65 +1,0 @@
-#include "expr_node.hpp"
-#include "field.hpp"
-
-namespace xios
-{
-
-  CScalarNode* CScalarNode::newNode(CSimpleNodeExpr* simpleNode)
-  {
-    if (simpleNode->nodeType==CSimpleNodeExpr::scalarDouble) return new CScalarDouble(simpleNode) ;
-    else if (simpleNode->nodeType==CSimpleNodeExpr::scalarVariable) return new CScalarVariable(simpleNode) ;
-    else if (simpleNode->nodeType==CSimpleNodeExpr::opScalar) return new COperatorScalarNode(simpleNode) ;
-    else if (simpleNode->nodeType==CSimpleNodeExpr::opScalarScalar) return new COperatorScalarScalarNode(simpleNode) ;
-    else 
-    {
-      ERROR("CScalarNode* CScalarNode::allocateChild(CSimpleNodeExpr* simpleNode)",<<"Non coherent node")
-      return NULL;
-    }
-  };
-
-
-  CFieldNode* CFieldNode::newNode(CSimpleNodeExpr* simpleNode)
-  {
-    if (simpleNode->nodeType==CSimpleNodeExpr::fieldInstant) return new CInstantFieldNode(simpleNode) ;
-    else if (simpleNode->nodeType==CSimpleNodeExpr::fieldAverage) return new  CAverageFieldNode(simpleNode) ;
-    else if (simpleNode->nodeType==CSimpleNodeExpr::opFieldScalar) return new COperatorFieldScalarNode(simpleNode) ;
-    else if (simpleNode->nodeType==CSimpleNodeExpr::opScalarField) return new COperatorScalarFieldNode(simpleNode) ;
-    else if (simpleNode->nodeType==CSimpleNodeExpr::opFieldField) return new COperatorFieldFieldNode(simpleNode) ;
-    else if (simpleNode->nodeType==CSimpleNodeExpr::opField) return new COperatorFieldNode(simpleNode) ;
-    else 
-    {
-      ERROR("CScalarNode* CScalarNode::allocateChild(CSimpleNodeExpr* simpleNode)",<<"Non coherent node")
-      return NULL;
-    }
-  };
-
-  void CInstantFieldNode::reduce(CField* thisField, map<string,CField*>& associatedInstantField, map<string,CField*>& associatedAverageField)
-  {
-    if (!reduced)
-    {
-      if (fieldId=="this")
-      {
-        field=thisField ;
-        array=thisField->getInstantData() ;
-        reduced=true ;
-      }
-      else
-      {
-        field=associatedInstantField[fieldId] ;
-        array=field->getInstantData() ;
-        reduced=true ;
-      }
-    }
-  }   
-
-  void CAverageFieldNode::reduce(CField* thisField, map<string,CField*>& associatedInstantField, map<string,CField*>& associatedAverageField)
-  {
-    if (!reduced)
-    {
-      field=associatedAverageField[fieldId] ;
-      array=field->getInstantData() ;
-      reduced=true ;
-    }
-  }
-  
-}
Index: OS/trunk/src/parse_expr/expr_node.hpp
===================================================================
--- /XIOS/trunk/src/parse_expr/expr_node.hpp	(revision 644)
+++ 	(revision )
@@ -1,439 +1,0 @@
-#ifndef __XIOS_EXPR_NODE_HPP__
-#define __XIOS_EXPR_NODE_HPP__
-
-#include "variable.hpp"
-#include "simple_node_expr.hpp"
-#include "operator_expr.hpp"
-
-namespace xios
-{
-  class CField ;
-///////////////////////////////////////
-//         class CNodeExpr           //
-///////////////////////////////////////
- 
-  class CNodeExpr 
-  {
-    public:
-    CNodeExpr(void) : reduced(false) {};
-    
-    bool reduced ;
-    bool isReduced(void) { return reduced ; }  
-    virtual ~CNodeExpr() {}
-  } ;
-
-////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////
-//         class CScalarNode           //
-///////////////////////////////////////
-
-  class CScalarNode : public CNodeExpr
-  {
-    public:
-    CScalarNode(void) : CNodeExpr() {}
-    static CScalarNode* newNode(CSimpleNodeExpr* simpleNode) ;
-    virtual void reduce(void)=0 ; 
-      
-    double val ;
-    virtual ~CScalarNode() {}
-  } ;
-
-////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////
-//      class CScalarDouble          //
-///////////////////////////////////////
-
-  class CScalarDouble : public CScalarNode
-  {
-    public :
-    
-    CScalarDouble(CSimpleNodeExpr* simpleNode) : CScalarNode()
-    {
-      strVal=simpleNode->id ;
-    }
-    
-    virtual void reduce(void)
-    {
-      if (!reduced)
-      {
-        CType<double> tval ;
-        tval.fromString(strVal) ;
-        val=tval ;
-        reduced=true ;
-      }
-    }
-    
-    virtual ~CScalarDouble() {}
-    string strVal ;
-  } ;
-
-
-////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////
-//       class CScalarVariable       //
-///////////////////////////////////////
-
-
-
-  class CScalarVariable : public CScalarNode 
-  {
-    public :
-    CScalarVariable(CSimpleNodeExpr* simpleNode) : CScalarNode()
-    {
-      varId=simpleNode->id ;
-    }
-    
-    void reduce(void)
-    {
-      if (!reduced)
-      {
-        if (CVariable::has(varId)) 
-        {
-          val=CVariable::get(varId)->getData<double>() ;
-          reduced=true ;
-        }
-        else ERROR("void CScalarVariable::reduce(void)",<<" Variable "<<varId<<" does not exist")
-      }
-    }
-    virtual ~CScalarVariable() {}
-    string varId ;
-  } ;
-
-////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////
-//      class COperatorScalarNode    //
-///////////////////////////////////////
-
-
-  class COperatorScalarNode : public CScalarNode
-  {
-    public :
-    COperatorScalarNode(CSimpleNodeExpr* simpleNode) : CScalarNode()
-    {
-      opId=simpleNode->id ;
-      child=newNode(simpleNode->children[0]) ;
-    }
-    
-    void reduce(void)
-    {
-      child->reduce() ;
-      op=operatorExpr.getOpScalar(opId) ;
-      if (child->isReduced())
-      {
-       val=op(child->val) ;
-       reduced=true ;
-      }
-    }
-        
-    virtual ~COperatorScalarNode() { delete child; }
-    
-    CScalarNode* child ;
-    string opId ;
-    double (*op)(double) ;
-  } ;
-
-////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////
-//   class COperatorScalarScalarNode       //
-/////////////////////////////////////////////
-
-  class COperatorScalarScalarNode : public CScalarNode
-  {
-    public : 
-    COperatorScalarScalarNode(CSimpleNodeExpr* simpleNode) : CScalarNode()
-    {
-      opId=simpleNode->id ;
-      child1=newNode(simpleNode->children[0]) ;
-      child2=newNode(simpleNode->children[1]) ;
-    }
-    
-    void reduce(void)
-    {
-      child1->reduce() ;
-      child2->reduce() ;
-      op=operatorExpr.getOpScalarScalar(opId) ;
-      if (child1->isReduced() && child2->isReduced())
-      {
-        op=operatorExpr.getOpScalarScalar(opId) ;
-        val=op(child1->val,child2->val) ;
-        reduced=true ;
-      }
-    }
-    
-    virtual ~COperatorScalarScalarNode()
-    {
-      delete child1 ;
-      delete child2 ;
-    }
-    
-    CScalarNode* child1 ;
-    CScalarNode* child2 ;
-    double (*op)(double,double) ;
-    string opId ;
-  } ;
-
-  
-////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////
-//         class CFieldNode          //
-///////////////////////////////////////
-
-
-  class CFieldNode : public CNodeExpr
-  {
-    public:
-    CFieldNode(void) : CNodeExpr() {}
-    static CFieldNode* newNode(CSimpleNodeExpr* simpleNode) ;
-    virtual void reduce(CField* thisField, map<string,CField*>& associatedInstantField, map<string,CField*>& associatedAverageField) =0 ; 
-    virtual CArray<double,1> compute(void)=0 ;
-    virtual void getFieldIds(set<string>& fieldIds)=0 ;
-    virtual void getInstantFieldIds(set<string>& fieldIds)=0 ;
-    virtual void getAverageFieldIds(set<string>& fieldIds)=0 ;
-    virtual void getFields(set<CField*>& fields)=0 ;
-    virtual void getInstantFields(set<CField*>& fields)=0 ;
-    virtual void getAverageFields(set<CField*>& fields)=0 ;
-      
-    virtual ~CFieldNode() {}
-  } ;
-
-
-////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////
-//       class CInstantFieldNode     //
-///////////////////////////////////////  
-
-  class CInstantFieldNode : public CFieldNode
-  {
-    public:
-    CInstantFieldNode(CSimpleNodeExpr* simpleNode) : CFieldNode(), fieldId(simpleNode->id) {}
-    virtual void reduce(CField* thisField, map<string,CField*>& associatedInstantField, map<string,CField*>& associatedAverageField) ; 
-    virtual CArray<double,1> compute(void) { return CArray<double,1>(*array);}
-    virtual ~CInstantFieldNode() { }
-    virtual void getFieldIds(set<string>& fieldIds) { fieldIds.insert(fieldId) ;}
-    virtual void getInstantFieldIds(set<string>& fieldIds) { fieldIds.insert(fieldId) ;}
-    virtual void getAverageFieldIds(set<string>& fieldIds) { }
-    virtual void getFields(set<CField*>& fields) { fields.insert(field) ;}
-    virtual void getInstantFields(set<CField*>& fields) { fields.insert(field) ;}
-    virtual void getAverageFields(set<CField*>& fields) { }
-       
-    string fieldId;
-    CField* field ;
-    CArray<double,1>* array ;
-  };
-
-
-
-////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////
-//       class CAverageFieldNode     //
-///////////////////////////////////////
-
-
-  class CAverageFieldNode : public CFieldNode
-  {
-    public:
-    
-    CAverageFieldNode(CSimpleNodeExpr* simpleNode) : CFieldNode(), fieldId(simpleNode->id) {}
-    
-    virtual void reduce(CField* thisField, map<string,CField*>& associatedInstantField, map<string,CField*>& associatedAverageField) ; 
-    virtual CArray<double,1> compute(void) { return CArray<double,1>(*array); }
-    virtual void getFieldIds(set<string>& fieldIds) { fieldIds.insert(fieldId) ;}
-    virtual void getInstantFieldIds(set<string>& fieldIds) { }
-    virtual void getAverageFieldIds(set<string>& fieldIds) { fieldIds.insert(fieldId) ;}
-    virtual void getFields(set<CField*>& fields) { fields.insert(field) ;}
-    virtual void getInstantFields(set<CField*>& fields) { } 
-    virtual void getAverageFields(set<CField*>& fields) { fields.insert(field) ;}
-    virtual ~CAverageFieldNode() {}
-    string fieldId;
-    CField* field ;
-    CArray<double,1>* array ;
-  };
-
-
-////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////
-//         class COperatorFieldNode  //
-///////////////////////////////////////
-  
-  class COperatorFieldNode : public CFieldNode
-  {
-    public:
-    
-    COperatorFieldNode(CSimpleNodeExpr* simpleNode) : CFieldNode(), opId(simpleNode->id)
-    {
-      child=newNode(simpleNode->children[0]) ;
-    }
-    
-    virtual void reduce(CField* thisField, map<string,CField*>& associatedInstantField, map<string,CField*>& associatedAverageField) 
-    {
-      child->reduce(thisField, associatedInstantField, associatedAverageField) ;
-      op=operatorExpr.getOpField(opId) ;
-      reduced=true ;
-    }
-    
-    virtual void getFieldIds(set<string>& fieldIds) {child-> getFieldIds(fieldIds);}
-    virtual void getInstantFieldIds(set<string>& fieldIds) {child->  getInstantFieldIds(fieldIds) ;}
-    virtual void getAverageFieldIds(set<string>& fieldIds) {child->  getAverageFieldIds(fieldIds) ;}
-    virtual void getFields(set<CField*>& fields) { child-> getFields(fields) ;}
-    virtual void getInstantFields(set<CField*>& fields) {child-> getInstantFields(fields) ; } 
-    virtual void getAverageFields(set<CField*>& fields) {child-> getAverageFields(fields) ; }    
-    virtual CArray<double,1> compute(void)
-    {
-      return op(child->compute()) ;
-    }
-    virtual ~COperatorFieldNode() { delete child; }
-     
-    CFieldNode* child ;
-    string opId ;
-    CArray<double,1> (*op)( const CArray<double,1>&) ;
-  };
-
-
-////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////
-//     COperatorFieldFieldNode       //
-///////////////////////////////////////
-
-  
-  class COperatorFieldFieldNode : public CFieldNode
-  {
-    public:
-    
-    COperatorFieldFieldNode(CSimpleNodeExpr* simpleNode) : CFieldNode(),opId(simpleNode->id) 
-    {
-      child1=newNode(simpleNode->children[0]) ;
-      child2=newNode(simpleNode->children[1]) ;
-    }
-    
-    virtual void reduce(CField* thisField, map<string,CField*>& associatedInstantField, map<string,CField*>& associatedAverageField)
-    {
-      child1->reduce(thisField, associatedInstantField, associatedAverageField) ;
-      child2->reduce(thisField, associatedInstantField, associatedAverageField) ;
-      op=operatorExpr.getOpFieldField(opId) ;
-      reduced=true ;
-    }
-
-    virtual void getFieldIds(set<string>& fieldIds) {child1-> getFieldIds(fieldIds); child2-> getFieldIds(fieldIds);}
-    virtual void getInstantFieldIds(set<string>& fieldIds) {child1-> getInstantFieldIds(fieldIds); child2-> getInstantFieldIds(fieldIds);}
-    virtual void getAverageFieldIds(set<string>& fieldIds) {child1-> getAverageFieldIds(fieldIds); child2-> getAverageFieldIds(fieldIds);}
-    virtual void getFields(set<CField*>& fields) {child1-> getFields(fields); child2-> getFields(fields);}
-    virtual void getInstantFields(set<CField*>& fields) {child1-> getInstantFields(fields); child2-> getInstantFields(fields);}
-    virtual void getAverageFields(set<CField*>& fields) {child1-> getAverageFields(fields); child2-> getAverageFields(fields);}
-
-    virtual CArray<double,1> compute(void)
-    {
-      return op(child1->compute(),child2->compute()) ;
-    }
-    
-    virtual ~COperatorFieldFieldNode() { delete child1; delete child2 ; }
-
-    CFieldNode* child1 ;
-    CFieldNode* child2 ;
-    string opId ;
-    CArray<double,1> (*op)( const CArray<double,1>&,const CArray<double,1>&) ;    
-  };
-
-
-////////////////////////////////////////////////////////////////////////
-
-////////////////////////////////////////////
-//   class COperatorScalarFieldNode       //
-////////////////////////////////////////////
-  
-  class COperatorScalarFieldNode : public CFieldNode
-  {
-    public:
-    
-    COperatorScalarFieldNode(CSimpleNodeExpr* simpleNode) : CFieldNode(), opId(simpleNode->id)
-    {
-      child1=CScalarNode::newNode(simpleNode->children[0]) ;
-      child2=newNode(simpleNode->children[1]) ;
-    }
-    
-    virtual void reduce(CField* thisField, map<string,CField*>& associatedInstantField, map<string,CField*>& associatedAverageField)
-    {
-      child1->reduce() ;
-      child2->reduce(thisField, associatedInstantField, associatedAverageField) ;
-      op=operatorExpr.getOpScalarField(opId) ;
-      reduced=true ;
-    }
-   
-    virtual void getFieldIds(set<string>& fieldIds) {child2-> getFieldIds(fieldIds);}
-    virtual void getInstantFieldIds(set<string>& fieldIds) {child2-> getInstantFieldIds(fieldIds);}
-    virtual void getAverageFieldIds(set<string>& fieldIds) {child2-> getAverageFieldIds(fieldIds);}
-    virtual void getFields(set<CField*>& fields) {child2-> getFields(fields);}
-    virtual void getInstantFields(set<CField*>& fields) {child2-> getInstantFields(fields);}
-    virtual void getAverageFields(set<CField*>& fields) {child2-> getAverageFields(fields);}
-
-    virtual CArray<double,1> compute(void)
-    {
-      return op(child1->val,child2->compute()) ;
-    }    
-    
-    ~COperatorScalarFieldNode() { delete child1 ; delete child2 ; }
-    
-    CScalarNode* child1 ;
-    CFieldNode* child2 ;
-    string opId ;
-    CArray<double,1> (*op)(double,const CArray<double,1>&) ;        
-  };
-
-
-////////////////////////////////////////////////////////////////////////
-
-///////////////////////////////////////////
-//    class COperatorFieldScalarNode     //
-///////////////////////////////////////////
-  
-  class COperatorFieldScalarNode : public CFieldNode
-  {
-    public:
-    
-    COperatorFieldScalarNode(CSimpleNodeExpr* simpleNode) : CFieldNode(), opId(simpleNode->id)
-    {
-      child1=newNode(simpleNode->children[0]) ;
-      child2=CScalarNode::newNode(simpleNode->children[1]) ;
-    }
-    
-    virtual void reduce(CField* thisField, map<string,CField*>& associatedInstantField, map<string,CField*>& associatedAverageField)
-    {
-      child1->reduce(thisField, associatedInstantField, associatedAverageField) ;
-      child2->reduce() ;
-      op=operatorExpr.getOpFieldScalar(opId) ;
-      reduced=true ;
-    }
-    
-    virtual CArray<double,1> compute(void)
-    {
-      return op(child1->compute(),child2->val) ;
-    }
-    
-    virtual void getFieldIds(set<string>& fieldIds) {child1-> getFieldIds(fieldIds);}
-    virtual void getInstantFieldIds(set<string>& fieldIds) {child1-> getInstantFieldIds(fieldIds);}
-    virtual void getAverageFieldIds(set<string>& fieldIds) {child1-> getAverageFieldIds(fieldIds);}
-    virtual void getFields(set<CField*>& fields) {child1-> getFields(fields);}
-    virtual void getInstantFields(set<CField*>& fields) {child1-> getInstantFields(fields);}
-    virtual void getAverageFields(set<CField*>& fields) {child1-> getAverageFields(fields);}
-
-    ~COperatorFieldScalarNode() {delete child1, delete child2; }
-         
-    CFieldNode* child1 ;
-    CScalarNode* child2 ;
-    string opId ;
-    CArray<double,1> (*op)( const CArray<double,1>&, double) ;    
-  };
-  
-}
-
-#endif
Index: OS/trunk/src/parse_expr/simple_node_expr.hpp
===================================================================
--- /XIOS/trunk/src/parse_expr/simple_node_expr.hpp	(revision 644)
+++ 	(revision )
@@ -1,52 +1,0 @@
-#ifndef __XIOS_SIMPLE_NODE_EXPR_HPP__
-#define __XIOS_SIMPLE_NODE_EXPR_HPP__
-
-#include<string>
-#include<vector>
-
-class CSimpleNodeExpr
-{
-  public :
-
-  enum ENodeType
-  {
-    scalarDouble, scalarVariable, opScalar, opScalarScalar, 
-    fieldInstant, fieldAverage, opFieldScalar, opScalarField, opFieldField, opField 
-  } ;
-  
-  CSimpleNodeExpr(ENodeType nodeType, const std::string* str) : nodeType(nodeType)
-  {
-    id=*str ;
-  }
-
-  CSimpleNodeExpr(ENodeType nodeType, const char* str) : nodeType(nodeType)
-  {
-    id=std::string(str) ;
-  }
-  
-  void addChild(CSimpleNodeExpr* child)  
-  {
-    children.push_back(child) ;
-  }
-  
-  std::string print(void)
-  {
-    if (nodeType==scalarDouble) return id ;
-    else if (nodeType==scalarVariable) return "$"+id ;
-    else if (nodeType==fieldInstant) return id ;
-    else if (nodeType==fieldAverage) return "@"+id ;
-    else if (nodeType==opScalar || nodeType==opField) return id+"("+children[0]->print()+")" ;
-    else  return "("+children[0]->print()+id+children[1]->print()+")" ;
-  } 
-  ~CSimpleNodeExpr()
-  {
-    for(std::vector<CSimpleNodeExpr*>::iterator it=children.begin();it!=children.end();++it) delete *it ;
-  } 
-  
-  ENodeType nodeType ;
-  std::string id ;
-
-  std::vector<CSimpleNodeExpr*> children ;
-} ;
-
-#endif 
