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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 ; 
Note: See TracChangeset for help on using the changeset viewer.