Ignore:
Timestamp:
12/14/20 09:59:23 (4 years ago)
Author:
ymipsl
Message:

Update to new transformation.
Source filter working again + reading
YM

Location:
XIOS/dev/dev_ym/XIOS_COUPLING/src/node
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/context.cpp

    r1984 r1988  
    11191119      for(auto field : fileInField)  
    11201120      { 
     1121        field->sendFieldToInputFileServer() ; 
    11211122        field->connectToServerInput(garbageCollector) ; // connect the field to server filter 
    1122         field->sendFieldToInputFileServer() ; 
    11231123        fileInFields_.push_back(field) ; 
    11241124      } 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.cpp

    r1984 r1988  
    777777        // new 
    778778         
    779         std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters = grid->buildTransformationGraph(gc, gridSrc, detectMissingValues, defaultValue, newGrid) ; 
     779        std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters = grid->buildTransformationGraph(gc, false,  gridSrc, detectMissingValues, defaultValue, newGrid) ; 
    780780        lastFilter->connectOutput(filters.first, 0); 
    781781        lastFilter = filters.second; 
     
    827827         grid_->solveElementsRefInheritance() ; 
    828828         if (fileIn_->isClientSide()) fileIn_->readFieldAttributesMetaData(this); 
    829          grid_->completeGrid(); // grid generation, to be checked 
     829         CGrid* newGrid ; 
     830         std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters = grid_->buildTransformationGraph(gc, true, nullptr, detectMissingValues, defaultValue, newGrid) ; 
     831         grid_ = newGrid ; 
     832         grid_ref=grid_->getId() ; // for server  
     833         //grid_->completeGrid(); // grid generation, to be checked 
    830834         if (fileIn_->isClientSide()) fileIn_->readFieldAttributesValues(this); 
    831835         grid_->checkElementsAttributes() ; 
    832          grid_->solveDomainAxisBaseRef(); 
     836//         grid_->solveDomainAxisBaseRef(); 
    833837         // probably in future tag grid incomplete if coming from a reading 
    834838         instantDataFilter=inputFilter ; 
     
    845849        grid_->solveElementsRefInheritance() ; 
    846850        CGrid* newGrid ; 
    847         std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters = grid_->buildTransformationGraph(gc, nullptr, detectMissingValues, defaultValue, newGrid) ; 
     851        std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> > filters = grid_->buildTransformationGraph(gc, true, nullptr, detectMissingValues, defaultValue, newGrid) ; 
    848852        grid_ = newGrid ; 
    849853        grid_ref=grid_->getId() ; // for server  
     
    16381642    CContext::getCurrent()->sendContextToFileServer(client); 
    16391643    getRelFile()->sendFileToFileServer(client); 
    1640     grid_->sendGridToFileServer(client); 
     1644    sentGrid_ = grid_-> duplicateSentGrid() ; 
     1645    sentGrid_->sendGridToFileServer(client); 
    16411646    read_access=true ; // not the best solution, but on server side, the field must be a starting point of the workflow 
    16421647                       // must be replace by a better solution when implementing filters for reading and send to client 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.cpp

    r1986 r1988  
    176176 
    177177      } 
    178  
     178       
    179179 //     grid->solveElementsRefInheritance(true); 
    180  
     180      grid->computeElements() ; 
    181181      return grid; 
    182182   } 
     
    19051905 
    19061906  std::pair<std::shared_ptr<CFilter>, std::shared_ptr<CFilter> >  
    1907   CGrid::buildTransformationGraph(CGarbageCollector& gc, CGrid* gridSrc, double detectMissingValues, double defaultValue, CGrid*& newGrid) 
     1907  CGrid::buildTransformationGraph(CGarbageCollector& gc, bool isSource, CGrid* gridSrc, double detectMissingValues, double defaultValue, CGrid*& newGrid) 
    19081908  TRY 
    19091909  { 
     
    19821982            transformationPath.removeNextTransform() ; 
    19831983            dstDomain->setTransformationPaths(transformationPath) ; 
    1984             newGrid->addDomain(dstDomain->getId()) ; 
    19851984          } 
     1985          newGrid->addDomain(dstDomain->getId()) ; 
    19861986          algo = dstDomain->getTransformationAlgorithm() ; 
    19871987        } 
     
    20092009            transformationPath.removeNextTransform() ; 
    20102010            dstAxis->setTransformationPaths(transformationPath) ; 
    2011             newGrid->addAxis(dstAxis->getId()) ; 
    20122011          } 
     2012          newGrid->addAxis(dstAxis->getId()) ; 
    20132013          algo = dstAxis->getTransformationAlgorithm() ; 
    20142014        } 
     
    20362036            transformationPath.removeNextTransform() ; 
    20372037            dstScalar->setTransformationPaths(transformationPath) ; 
    2038             newGrid->addScalar(dstScalar->getId()) ; 
    20392038          } 
     2039          newGrid->addScalar(dstScalar->getId()) ; 
    20402040          algo = dstScalar->getTransformationAlgorithm() ;           
    20412041        } 
     
    20982098    if (hadTransform) 
    20992099    { 
    2100       shared_ptr<CTransformFilter> transformFilter = shared_ptr<CTransformFilter>(new CTransformFilter(gc, algo, dimBefore, dimAfter, detectMissingValues, defaultValue)) ; 
    2101       outputFilter->connectOutput(transformFilter,0) ; 
    2102       outputFilter = transformFilter ; 
     2100      if (!isSource) 
     2101      { 
     2102        shared_ptr<CTransformFilter> transformFilter = shared_ptr<CTransformFilter>(new CTransformFilter(gc, algo, dimBefore, dimAfter, detectMissingValues, defaultValue)) ; 
     2103        outputFilter->connectOutput(transformFilter,0) ; 
     2104        outputFilter = transformFilter ; 
     2105      } 
    21032106 
    21042107      gridSrc=newGrid ; 
    2105       pair<shared_ptr<CFilter>, shared_ptr<CFilter> > filters = gridSrc->buildTransformationGraph(gc, gridSrc, detectMissingValues, defaultValue, newGrid) ; 
     2108      pair<shared_ptr<CFilter>, shared_ptr<CFilter> > filters = gridSrc->buildTransformationGraph(gc, isSource, gridSrc, detectMissingValues, defaultValue, newGrid) ; 
    21062109      outputFilter->connectOutput(filters.first,0) ; 
    21072110      outputFilter=filters.second ; 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.hpp

    r1984 r1988  
    236236         void setGenerated(); 
    237237         void setTransformationAlgorithms(); 
    238          pair<shared_ptr<CFilter>, shared_ptr<CFilter> > buildTransformationGraph(CGarbageCollector& gc, CGrid* gridSrc, double detectMissingValues, 
     238         pair<shared_ptr<CFilter>, shared_ptr<CFilter> > buildTransformationGraph(CGarbageCollector& gc, bool isSource, CGrid* gridSrc, double detectMissingValues, 
    239239                                                                                  double defaultValue, CGrid*& newGrid) ; 
    240240      private: 
Note: See TracChangeset for help on using the changeset viewer.