Changeset 1988 for XIOS/dev/dev_ym/XIOS_COUPLING/src/node
- Timestamp:
- 12/14/20 09:59:23 (4 years ago)
- 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 1119 1119 for(auto field : fileInField) 1120 1120 { 1121 field->sendFieldToInputFileServer() ; 1121 1122 field->connectToServerInput(garbageCollector) ; // connect the field to server filter 1122 field->sendFieldToInputFileServer() ;1123 1123 fileInFields_.push_back(field) ; 1124 1124 } -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field.cpp
r1984 r1988 777 777 // new 778 778 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) ; 780 780 lastFilter->connectOutput(filters.first, 0); 781 781 lastFilter = filters.second; … … 827 827 grid_->solveElementsRefInheritance() ; 828 828 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 830 834 if (fileIn_->isClientSide()) fileIn_->readFieldAttributesValues(this); 831 835 grid_->checkElementsAttributes() ; 832 grid_->solveDomainAxisBaseRef();836 // grid_->solveDomainAxisBaseRef(); 833 837 // probably in future tag grid incomplete if coming from a reading 834 838 instantDataFilter=inputFilter ; … … 845 849 grid_->solveElementsRefInheritance() ; 846 850 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) ; 848 852 grid_ = newGrid ; 849 853 grid_ref=grid_->getId() ; // for server … … 1638 1642 CContext::getCurrent()->sendContextToFileServer(client); 1639 1643 getRelFile()->sendFileToFileServer(client); 1640 grid_->sendGridToFileServer(client); 1644 sentGrid_ = grid_-> duplicateSentGrid() ; 1645 sentGrid_->sendGridToFileServer(client); 1641 1646 read_access=true ; // not the best solution, but on server side, the field must be a starting point of the workflow 1642 1647 // 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 176 176 177 177 } 178 178 179 179 // grid->solveElementsRefInheritance(true); 180 180 grid->computeElements() ; 181 181 return grid; 182 182 } … … 1905 1905 1906 1906 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) 1908 1908 TRY 1909 1909 { … … 1982 1982 transformationPath.removeNextTransform() ; 1983 1983 dstDomain->setTransformationPaths(transformationPath) ; 1984 newGrid->addDomain(dstDomain->getId()) ;1985 1984 } 1985 newGrid->addDomain(dstDomain->getId()) ; 1986 1986 algo = dstDomain->getTransformationAlgorithm() ; 1987 1987 } … … 2009 2009 transformationPath.removeNextTransform() ; 2010 2010 dstAxis->setTransformationPaths(transformationPath) ; 2011 newGrid->addAxis(dstAxis->getId()) ;2012 2011 } 2012 newGrid->addAxis(dstAxis->getId()) ; 2013 2013 algo = dstAxis->getTransformationAlgorithm() ; 2014 2014 } … … 2036 2036 transformationPath.removeNextTransform() ; 2037 2037 dstScalar->setTransformationPaths(transformationPath) ; 2038 newGrid->addScalar(dstScalar->getId()) ;2039 2038 } 2039 newGrid->addScalar(dstScalar->getId()) ; 2040 2040 algo = dstScalar->getTransformationAlgorithm() ; 2041 2041 } … … 2098 2098 if (hadTransform) 2099 2099 { 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 } 2103 2106 2104 2107 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) ; 2106 2109 outputFilter->connectOutput(filters.first,0) ; 2107 2110 outputFilter=filters.second ; -
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.hpp
r1984 r1988 236 236 void setGenerated(); 237 237 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, 239 239 double defaultValue, CGrid*& newGrid) ; 240 240 private:
Note: See TracChangeset
for help on using the changeset viewer.