Changeset 1988


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

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

Location:
XIOS/dev/dev_ym/XIOS_COUPLING/src
Files:
55 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/client_from_server_source_filter.cpp

    r1934 r1988  
    1818    CContext* context = CContext::getCurrent(); 
    1919    field_ = field ; 
    20     grid_= field->getGrid(); 
     20    grid_= field->getSentGrid(); 
    2121    freqOp_ = field->getRelFile()->output_freq ; 
    2222    client_= field->getRelFile()->getContextClient() ; 
  • 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: 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algo_types.hpp

    r1558 r1988  
    2626#include "domain_algorithm_zoom.hpp" 
    2727#include "domain_algorithm_interpolate.hpp" 
     28#include "domain_algorithm_generate_rectilinear.hpp" 
    2829#include "domain_algorithm_compute_connectivity.hpp" 
    2930#include "domain_algorithm_expand.hpp" 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_duplicate_scalar.cpp

    r1985 r1988  
    3030  int scalarSrcIndex = elementPositionInGridSrc2ScalarPosition[elementPositionInGrid]; 
    3131 
    32   return (new CAxisAlgorithmDuplicateScalar(axisListDestP[axisDstIndex], scalarListSrcP[scalarSrcIndex], duplicateScalar)); 
     32  return (new CAxisAlgorithmDuplicateScalar(isSource, axisListDestP[axisDstIndex], scalarListSrcP[scalarSrcIndex], duplicateScalar)); 
    3333} 
    3434CATCH 
     
    4343 
    4444 
    45 CAxisAlgorithmDuplicateScalar::CAxisAlgorithmDuplicateScalar(CAxis* axisDestination, CScalar* scalarSource, CDuplicateScalarToAxis* algo) 
    46  : CAxisAlgorithmTransformation(axisDestination, scalarSource) 
     45CAxisAlgorithmDuplicateScalar::CAxisAlgorithmDuplicateScalar(bool isSource, CAxis* axisDestination, CScalar* scalarSource, CDuplicateScalarToAxis* algo) 
     46 : CAxisAlgorithmTransformation(isSource, axisDestination, scalarSource) 
    4747{ 
    4848 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_duplicate_scalar.hpp

    r1985 r1988  
    2727{ 
    2828public: 
    29   CAxisAlgorithmDuplicateScalar(CAxis* axisDestination, CScalar* scalarSource, CDuplicateScalarToAxis* algo); 
     29  CAxisAlgorithmDuplicateScalar(bool isSource, CAxis* axisDestination, CScalar* scalarSource, CDuplicateScalarToAxis* algo); 
    3030 
    3131  virtual ~CAxisAlgorithmDuplicateScalar(); 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_extract.cpp

    r1985 r1988  
    2828  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid]; 
    2929 
    30   return (new CAxisAlgorithmExtract(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], extractAxis)); 
     30  return (new CAxisAlgorithmExtract(isSource, axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], extractAxis)); 
    3131} 
    3232CATCH 
     
    4040CATCH 
    4141 
    42 CAxisAlgorithmExtract::CAxisAlgorithmExtract(CAxis* axisDestination, CAxis* axisSource, CExtractAxis* extractAxis) 
    43 : CAxisAlgorithmTransformation(axisDestination, axisSource) 
     42CAxisAlgorithmExtract::CAxisAlgorithmExtract(bool isSource, CAxis* axisDestination, CAxis* axisSource, CExtractAxis* extractAxis) 
     43: CAxisAlgorithmTransformation(isSource, axisDestination, axisSource) 
    4444TRY 
    4545{ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_extract.hpp

    r1985 r1988  
    2222{ 
    2323public: 
    24   CAxisAlgorithmExtract(CAxis* axisDestination, CAxis* axisSource, CExtractAxis* extractAxis); 
     24  CAxisAlgorithmExtract(bool isSource, CAxis* axisDestination, CAxis* axisSource, CExtractAxis* extractAxis); 
    2525 
    2626  virtual ~CAxisAlgorithmExtract() {} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_extract_domain.cpp

    r1985 r1988  
    3434  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid]; 
    3535 
    36   return (new CAxisAlgorithmExtractDomain(axisListDestP[axisDstIndex], domainListSrcP[domainSrcIndex], extractDomain)); 
     36  return (new CAxisAlgorithmExtractDomain(isSource, axisListDestP[axisDstIndex], domainListSrcP[domainSrcIndex], extractDomain)); 
    3737} 
    3838CATCH 
     
    4747 
    4848 
    49 CAxisAlgorithmExtractDomain::CAxisAlgorithmExtractDomain(CAxis* axisDestination, CDomain* domainSource, CExtractDomainToAxis* algo) 
    50  : CAxisAlgorithmTransformation(axisDestination, domainSource), pos_(-1), reduction_(0) 
     49CAxisAlgorithmExtractDomain::CAxisAlgorithmExtractDomain(bool isSource, CAxis* axisDestination, CDomain* domainSource, CExtractDomainToAxis* algo) 
     50 : CAxisAlgorithmTransformation(isSource, axisDestination, domainSource), pos_(-1), reduction_(0) 
    5151TRY 
    5252{ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_extract_domain.hpp

    r1985 r1988  
    2828{ 
    2929public: 
    30   CAxisAlgorithmExtractDomain(CAxis* axisDestination, CDomain* domainSource, CExtractDomainToAxis* algo); 
     30  CAxisAlgorithmExtractDomain(bool isSource, CAxis* axisDestination, CDomain* domainSource, CExtractDomainToAxis* algo); 
    3131 
    3232  virtual void apply(const std::vector<std::pair<int,double> >& localIndex, 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_interpolate.cpp

    r1985 r1988  
    3838  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid]; 
    3939 
    40   return (new CAxisAlgorithmInterpolate(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], interpolateAxis)); 
     40  return (new CAxisAlgorithmInterpolate(isSource, axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], interpolateAxis)); 
    4141} 
    4242CATCH 
     
    5050CATCH 
    5151 
    52 CAxisAlgorithmInterpolate::CAxisAlgorithmInterpolate(CAxis* axisDestination, CAxis* axisSource, CInterpolateAxis* interpAxis) 
    53 : CAxisAlgorithmTransformation(axisDestination, axisSource), coordinate_(), transPosition_() 
     52CAxisAlgorithmInterpolate::CAxisAlgorithmInterpolate(bool isSource, CAxis* axisDestination, CAxis* axisSource, CInterpolateAxis* interpAxis) 
     53: CAxisAlgorithmTransformation(isSource, axisDestination, axisSource), coordinate_(), transPosition_() 
    5454TRY 
    5555{ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_interpolate.hpp

    r1985 r1988  
    2727{ 
    2828public: 
    29   CAxisAlgorithmInterpolate(CAxis* axisDestination, CAxis* axisSource, CInterpolateAxis* interpAxis); 
     29  CAxisAlgorithmInterpolate(bool isSource, CAxis* axisDestination, CAxis* axisSource, CInterpolateAxis* interpAxis); 
    3030 
    3131  virtual ~CAxisAlgorithmInterpolate() {} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_inverse.cpp

    r1985 r1988  
    3636  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid]; 
    3737 
    38   return (new CAxisAlgorithmInverse(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], inverseAxis)); 
     38  return (new CAxisAlgorithmInverse(isSource, axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], inverseAxis)); 
    3939} 
    4040CATCH 
     
    4848CATCH 
    4949 
    50 CAxisAlgorithmInverse::CAxisAlgorithmInverse(CAxis* axisDestination, CAxis* axisSource, CInverseAxis* inverseAxis) 
    51  : CAxisAlgorithmTransformation(axisDestination, axisSource) 
     50CAxisAlgorithmInverse::CAxisAlgorithmInverse(bool isSource, CAxis* axisDestination, CAxis* axisSource, CInverseAxis* inverseAxis) 
     51 : CAxisAlgorithmTransformation(isSource, axisDestination, axisSource) 
    5252TRY 
    5353{ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_inverse.hpp

    r1985 r1988  
    2525{ 
    2626public: 
    27   CAxisAlgorithmInverse(CAxis* axisDestination, CAxis* axisSource, CInverseAxis* inverseAxis); 
     27  CAxisAlgorithmInverse(bool isSource, CAxis* axisDestination, CAxis* axisSource, CInverseAxis* inverseAxis); 
    2828 
    2929  virtual ~CAxisAlgorithmInverse() {} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_reduce_axis.cpp

    r1985 r1988  
    3333  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid]; 
    3434 
    35   return (new CAxisAlgorithmReduceAxis(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], reduceAxis)); 
     35  return (new CAxisAlgorithmReduceAxis(isSource, axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], reduceAxis)); 
    3636} 
    3737CATCH 
     
    4646 
    4747 
    48 CAxisAlgorithmReduceAxis::CAxisAlgorithmReduceAxis(CAxis* axisDestination, CAxis* axisSource, CReduceAxisToAxis* algo) 
    49  : CAxisAlgorithmTransformation(axisDestination, axisSource), reduction_(0) 
     48CAxisAlgorithmReduceAxis::CAxisAlgorithmReduceAxis(bool isSource, CAxis* axisDestination, CAxis* axisSource, CReduceAxisToAxis* algo) 
     49 : CAxisAlgorithmTransformation(isSource, axisDestination, axisSource), reduction_(0) 
    5050TRY 
    5151{ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_reduce_axis.hpp

    r1985 r1988  
    2626{ 
    2727public: 
    28   CAxisAlgorithmReduceAxis(CAxis* axisDestination, CAxis* axisSource, CReduceAxisToAxis* algo); 
     28  CAxisAlgorithmReduceAxis(bool isSource, CAxis* axisDestination, CAxis* axisSource, CReduceAxisToAxis* algo); 
    2929 
    3030  virtual void apply(const std::vector<std::pair<int,double> >& localIndex, 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_reduce_domain.cpp

    r1985 r1988  
    3434  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid]; 
    3535 
    36   return (new CAxisAlgorithmReduceDomain(axisListDestP[axisDstIndex], domainListSrcP[domainSrcIndex], reduceDomain)); 
     36  return (new CAxisAlgorithmReduceDomain(isSource, axisListDestP[axisDstIndex], domainListSrcP[domainSrcIndex], reduceDomain)); 
    3737} 
    3838CATCH 
     
    4747 
    4848 
    49 CAxisAlgorithmReduceDomain::CAxisAlgorithmReduceDomain(CAxis* axisDestination, CDomain* domainSource, CReduceDomainToAxis* algo) 
    50  : CAxisAlgorithmTransformation(axisDestination, domainSource), reduction_(0) 
     49CAxisAlgorithmReduceDomain::CAxisAlgorithmReduceDomain(bool isSource, CAxis* axisDestination, CDomain* domainSource, CReduceDomainToAxis* algo) 
     50 : CAxisAlgorithmTransformation(isSource, axisDestination, domainSource), reduction_(0) 
    5151TRY 
    5252{ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_reduce_domain.hpp

    r1985 r1988  
    2727{ 
    2828public: 
    29   CAxisAlgorithmReduceDomain(CAxis* axisDestination, CDomain* domainSource, CReduceDomainToAxis* algo); 
     29  CAxisAlgorithmReduceDomain(bool isSource, CAxis* axisDestination, CDomain* domainSource, CReduceDomainToAxis* algo); 
    3030 
    3131  virtual void apply(const std::vector<std::pair<int,double> >& localIndex, 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_temporal_splitting.cpp

    r1985 r1988  
    3030  int scalarSrcIndex = elementPositionInGridSrc2ScalarPosition[elementPositionInGrid]; 
    3131 
    32   return (new CAxisAlgorithmTemporalSplitting(axisListDestP[axisDstIndex], scalarListSrcP[scalarSrcIndex], temporalSplitting)); 
     32  return (new CAxisAlgorithmTemporalSplitting(isSource, axisListDestP[axisDstIndex], scalarListSrcP[scalarSrcIndex], temporalSplitting)); 
    3333} 
    3434CATCH 
     
    4242CATCH 
    4343 
    44 CAxisAlgorithmTemporalSplitting::CAxisAlgorithmTemporalSplitting(CAxis* axisDestination, CScalar* scalarSource, CTemporalSplitting* algo) 
    45  : CAxisAlgorithmTransformation(axisDestination, scalarSource) 
     44CAxisAlgorithmTemporalSplitting::CAxisAlgorithmTemporalSplitting(bool isSource, CAxis* axisDestination, CScalar* scalarSource, CTemporalSplitting* algo) 
     45 : CAxisAlgorithmTransformation(isSource, axisDestination, scalarSource) 
    4646{ 
    4747 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_temporal_splitting.hpp

    r1985 r1988  
    2828{ 
    2929public: 
    30   CAxisAlgorithmTemporalSplitting(CAxis* axisDestination, CScalar* scalarSource, CTemporalSplitting* algo); 
     30  CAxisAlgorithmTemporalSplitting(bool isSource, CAxis* axisDestination, CScalar* scalarSource, CTemporalSplitting* algo); 
    3131 
    3232  virtual ~CAxisAlgorithmTemporalSplitting(); 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_transformation.cpp

    r1985 r1988  
    1818namespace xios { 
    1919 
    20 CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(CAxis* axisDestination, CAxis* axisSource) 
    21  : CGenericAlgorithmTransformation(), axisDest_(axisDestination), axisSrc_(axisSource), domainSrc_(0),scalarSrc_(0) 
     20CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(bool isSource, CAxis* axisDestination, CAxis* axisSource) 
     21 : CGenericAlgorithmTransformation(isSource), axisDest_(axisDestination), axisSrc_(axisSource), domainSrc_(0),scalarSrc_(0) 
    2222TRY 
    2323{ 
     
    3131CATCH 
    3232 
    33 CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(CAxis* axisDestination, CDomain* domainSource) 
    34  : CGenericAlgorithmTransformation(), axisDest_(axisDestination), axisSrc_(0), domainSrc_(domainSource),scalarSrc_(0) 
     33CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(bool isSource, CAxis* axisDestination, CDomain* domainSource) 
     34 : CGenericAlgorithmTransformation(isSource), axisDest_(axisDestination), axisSrc_(0), domainSrc_(domainSource),scalarSrc_(0) 
    3535TRY 
    3636{ 
     
    4444CATCH 
    4545 
    46 CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(CAxis* axisDestination, CScalar* scalarSource) 
    47  : CGenericAlgorithmTransformation(), axisDest_(axisDestination), axisSrc_(0), domainSrc_(0), scalarSrc_(scalarSource) 
     46CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(bool isSource, CAxis* axisDestination, CScalar* scalarSource) 
     47 : CGenericAlgorithmTransformation(isSource), axisDest_(axisDestination), axisSrc_(0), domainSrc_(0), scalarSrc_(scalarSource) 
    4848TRY 
    4949{ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_transformation.hpp

    r1985 r1988  
    2222  Algorithms for axis. 
    2323*/ 
    24 class CAxisAlgorithmTransformation : public virtual CGenericAlgorithmTransformation 
     24class CAxisAlgorithmTransformation : public /*virtual*/ CGenericAlgorithmTransformation 
    2525{ 
    2626public: 
    27   CAxisAlgorithmTransformation(CAxis* axisDestination, CAxis* axisSource); 
    28   CAxisAlgorithmTransformation(CAxis* axisDestination, CDomain* domainSource); 
    29   CAxisAlgorithmTransformation(CAxis* axisDestination, CScalar* scalarSource); 
     27  CAxisAlgorithmTransformation(bool isSource, CAxis* axisDestination, CAxis* axisSource); 
     28  CAxisAlgorithmTransformation(bool isSource, CAxis* axisDestination, CDomain* domainSource); 
     29  CAxisAlgorithmTransformation(bool isSource, CAxis* axisDestination, CScalar* scalarSource); 
    3030 
    3131  virtual ~CAxisAlgorithmTransformation(); 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_zoom.cpp

    r1985 r1988  
    2828  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid]; 
    2929 
    30   return (new CAxisAlgorithmZoom(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], zoomAxis)); 
     30  return (new CAxisAlgorithmZoom(isSource, axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], zoomAxis)); 
    3131} 
    3232CATCH 
     
    4040CATCH 
    4141 
    42 CAxisAlgorithmZoom::CAxisAlgorithmZoom(CAxis* axisDestination, CAxis* axisSource, CZoomAxis* zoomAxis) 
    43 : CAxisAlgorithmTransformation(axisDestination, axisSource) 
     42CAxisAlgorithmZoom::CAxisAlgorithmZoom(bool isSource, CAxis* axisDestination, CAxis* axisSource, CZoomAxis* zoomAxis) 
     43: CAxisAlgorithmTransformation(isSource, axisDestination, axisSource) 
    4444TRY 
    4545{ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_zoom.hpp

    r1985 r1988  
    2222{ 
    2323public: 
    24   CAxisAlgorithmZoom(CAxis* axisDestination, CAxis* axisSource, CZoomAxis* zoomAxis); 
     24  CAxisAlgorithmZoom(bool isSource, CAxis* axisDestination, CAxis* axisSource, CZoomAxis* zoomAxis); 
    2525 
    2626  virtual ~CAxisAlgorithmZoom() {} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_compute_connectivity.cpp

    r1985 r1988  
    3333  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid]; 
    3434 
    35   return (new CDomainAlgorithmComputeConnectivity(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], compute_connectivityDomain)); 
     35  return (new CDomainAlgorithmComputeConnectivity(isSource, domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], compute_connectivityDomain)); 
    3636} 
    3737CATCH 
     
    4545CATCH 
    4646 
    47 CDomainAlgorithmComputeConnectivity::CDomainAlgorithmComputeConnectivity(CDomain* domainDestination, CDomain* domainSource, 
     47CDomainAlgorithmComputeConnectivity::CDomainAlgorithmComputeConnectivity(bool isSource, CDomain* domainDestination, CDomain* domainSource, 
    4848                                                                         CComputeConnectivityDomain* compute_connectivityDomain) 
    49 : CDomainAlgorithmTransformation(domainDestination, domainSource) 
     49: CDomainAlgorithmTransformation(isSource, domainDestination, domainSource) 
    5050TRY 
    5151{ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_compute_connectivity.hpp

    r1985 r1988  
    2323{ 
    2424public: 
    25   CDomainAlgorithmComputeConnectivity(CDomain* domainDestination, CDomain* domainSource, CComputeConnectivityDomain* compute_connectivityDomain); 
     25  CDomainAlgorithmComputeConnectivity(bool isSource, CDomain* domainDestination, CDomain* domainSource, CComputeConnectivityDomain* compute_connectivityDomain); 
    2626 
    2727  virtual ~CDomainAlgorithmComputeConnectivity() {} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_expand.cpp

    r1985 r1988  
    3535  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid]; 
    3636 
    37   return (new CDomainAlgorithmExpand(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], expandDomain)); 
     37  return (new CDomainAlgorithmExpand(isSource, domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], expandDomain)); 
    3838} 
    3939CATCH 
     
    4747CATCH 
    4848 
    49 CDomainAlgorithmExpand::CDomainAlgorithmExpand(CDomain* domainDestination, 
     49CDomainAlgorithmExpand::CDomainAlgorithmExpand(bool isSource, CDomain* domainDestination, 
    5050                                               CDomain* domainSource, 
    5151                                               CExpandDomain* expandDomain) 
    52 : CDomainAlgorithmTransformation(domainDestination, domainSource), 
     52: CDomainAlgorithmTransformation(isSource, domainDestination, domainSource), 
    5353  isXPeriodic_(false), isYPeriodic_(false) 
    5454TRY 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_expand.hpp

    r1985 r1988  
    2323{ 
    2424public: 
    25   CDomainAlgorithmExpand(CDomain* domainDestination, CDomain* domainSource, CExpandDomain* expandDomain); 
     25  CDomainAlgorithmExpand(bool isSource, CDomain* domainDestination, CDomain* domainSource, CExpandDomain* expandDomain); 
    2626 
    2727  virtual ~CDomainAlgorithmExpand() {} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_extract.cpp

    r1985 r1988  
    2525  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid]; 
    2626 
    27   return (new CDomainAlgorithmExtract(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], extractDomain)); 
     27  return (new CDomainAlgorithmExtract(isSource, domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], extractDomain)); 
    2828} 
    2929CATCH 
     
    3737CATCH 
    3838 
    39 CDomainAlgorithmExtract::CDomainAlgorithmExtract(CDomain* domainDestination, CDomain* domainSource, CExtractDomain* extractDomain) 
    40 : CDomainAlgorithmTransformation(domainDestination, domainSource) 
     39CDomainAlgorithmExtract::CDomainAlgorithmExtract(bool isSource, CDomain* domainDestination, CDomain* domainSource, CExtractDomain* extractDomain) 
     40: CDomainAlgorithmTransformation(isSource, domainDestination, domainSource) 
    4141TRY 
    4242{ 
     
    238238   
    239239  domainDestination->checkAttributes() ; 
    240   computeAlgorithm(domainSource->getLocalView(CElementView::WORKFLOW), domainDestination->getLocalView(CElementView::WORKFLOW)) ; 
     240  this->computeAlgorithm(domainSource->getLocalView(CElementView::WORKFLOW), domainDestination->getLocalView(CElementView::WORKFLOW)) ; 
    241241} 
    242242CATCH 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_extract.hpp

    r1985 r1988  
    1818{ 
    1919public: 
    20   CDomainAlgorithmExtract(CDomain* domainDestination, CDomain* domainSource, CExtractDomain* extractDomain); 
     20  CDomainAlgorithmExtract(bool isSource, CDomain* domainDestination, CDomain* domainSource, CExtractDomain* extractDomain); 
    2121 
    2222  virtual ~CDomainAlgorithmExtract() {} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_generate_rectilinear.cpp

    r1985 r1988  
    1313#include "context_client.hpp" 
    1414#include "generate_rectilinear_domain.hpp" 
     15#include "grid_transformation_factory_impl.hpp" 
    1516 
    1617namespace xios { 
    1718 
    18 CDomainAlgorithmGenerateRectilinear::CDomainAlgorithmGenerateRectilinear(CDomain* domainDestination, CDomain* domainSource, 
     19 
     20CGenericAlgorithmTransformation* CDomainAlgorithmGenerateRectilinear::create(bool isSource, CGrid* gridDst, CGrid* gridSrc, 
     21                                                                     CTransformation<CDomain>* transformation, 
     22                                                                     int elementPositionInGrid, 
     23                                                                     std::map<int, int>& elementPositionInGridSrc2ScalarPosition, 
     24                                                                     std::map<int, int>& elementPositionInGridSrc2AxisPosition, 
     25                                                                     std::map<int, int>& elementPositionInGridSrc2DomainPosition, 
     26                                                                     std::map<int, int>& elementPositionInGridDst2ScalarPosition, 
     27                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition, 
     28                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     29TRY 
     30{ 
     31  std::vector<CDomain*> domainListDestP = gridDst->getDomains(); 
     32  std::vector<CDomain*> domainListSrcP  = gridSrc->getDomains(); 
     33 
     34  CGenerateRectilinearDomain* transform = dynamic_cast<CGenerateRectilinearDomain*> (transformation); 
     35  int domainDstIndex = elementPositionInGridDst2DomainPosition[elementPositionInGrid]; 
     36  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid]; 
     37 
     38  return (new CDomainAlgorithmGenerateRectilinear(isSource, domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], gridDst, gridSrc, transform)); 
     39} 
     40CATCH 
     41 
     42bool CDomainAlgorithmGenerateRectilinear::dummyRegistered_ = CDomainAlgorithmGenerateRectilinear::registerTrans(); 
     43 
     44bool CDomainAlgorithmGenerateRectilinear::registerTrans() 
     45TRY 
     46{ 
     47  return CGridTransformationFactory<CDomain>::registerTransformation(TRANS_GENERATE_RECTILINEAR_DOMAIN, create); 
     48} 
     49CATCH 
     50 
     51 
     52 
     53CDomainAlgorithmGenerateRectilinear::CDomainAlgorithmGenerateRectilinear(bool isSource, CDomain* domainDestination, CDomain* domainSource, 
    1954                                                                         CGrid* gridDest, CGrid* gridSource, 
    2055                                                                         CGenerateRectilinearDomain* genRectDomain) 
    21 : CDomainAlgorithmTransformation(domainDestination, domainSource), nbDomainDistributedPart_(0) 
     56: CDomainAlgorithmTransformation(isSource, domainDestination, domainSource), nbDomainDistributedPart_(0) 
    2257TRY 
    2358{ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_generate_rectilinear.hpp

    r1985 r1988  
    1111 
    1212#include "domain_algorithm_transformation.hpp" 
     13#include "transformation.hpp" 
    1314 
    1415namespace xios { 
     
    2728{ 
    2829public: 
    29   CDomainAlgorithmGenerateRectilinear(CDomain* domainDestination, CDomain* domainSource, 
     30  CDomainAlgorithmGenerateRectilinear(bool isSource, CDomain* domainDestination, CDomain* domainSource, 
    3031                                      CGrid* gridDest, CGrid* gridSource, 
    3132                                      CGenerateRectilinearDomain* zoomDomain); 
    3233 
    3334  virtual ~CDomainAlgorithmGenerateRectilinear() {} 
     35  static bool registerTrans(); 
    3436 
    3537protected: 
     
    4042  void computeDistributionGridDestination(CGrid* gridDest); 
    4143  void fillInAttributesDomainDestination(); 
    42  
     44  static CGenericAlgorithmTransformation* create(bool isSource, CGrid* gridDst, CGrid* gridSrc, 
     45                                                CTransformation<CDomain>* transformation, 
     46                                                int elementPositionInGrid, 
     47                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition, 
     48                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition, 
     49                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition, 
     50                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition, 
     51                                                std::map<int, int>& elementPositionInGridDst2AxisPosition, 
     52                                                std::map<int, int>& elementPositionInGridDst2DomainPosition); 
    4353private: 
    4454  int nbDomainDistributedPart_; //! Number of local domain. 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_interpolate.cpp

    r1985 r1988  
    4040  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid]; 
    4141 
    42   return (new CDomainAlgorithmInterpolate(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], interpolateDomain)); 
     42  return (new CDomainAlgorithmInterpolate(isSource, domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], interpolateDomain)); 
    4343} 
    4444CATCH 
     
    5252CATCH 
    5353 
    54 CDomainAlgorithmInterpolate::CDomainAlgorithmInterpolate(CDomain* domainDestination, CDomain* domainSource, CInterpolateDomain* interpDomain) 
    55 : CDomainAlgorithmTransformation(domainDestination, domainSource), interpDomain_(interpDomain), writeToFile_(false), readFromFile_(false) 
     54CDomainAlgorithmInterpolate::CDomainAlgorithmInterpolate(bool isSource, CDomain* domainDestination, CDomain* domainSource, CInterpolateDomain* interpDomain) 
     55: CDomainAlgorithmTransformation(isSource, domainDestination, domainSource), interpDomain_(interpDomain), writeToFile_(false), readFromFile_(false) 
    5656TRY 
    5757{ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_interpolate.hpp

    r1985 r1988  
    2727{ 
    2828public: 
    29   CDomainAlgorithmInterpolate(CDomain* domainDestination, CDomain* domainSource, CInterpolateDomain* interpDomain); 
     29  CDomainAlgorithmInterpolate(bool isSource, CDomain* domainDestination, CDomain* domainSource, CInterpolateDomain* interpDomain); 
    3030 
    3131  virtual ~CDomainAlgorithmInterpolate() {} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_reorder.cpp

    r1985 r1988  
    2828  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid]; 
    2929 
    30   return (new CDomainAlgorithmReorder(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], reorderDomain)); 
     30  return (new CDomainAlgorithmReorder(isSource, domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], reorderDomain)); 
    3131} 
    3232CATCH 
     
    4040CATCH 
    4141 
    42 CDomainAlgorithmReorder::CDomainAlgorithmReorder(CDomain* domainDestination, CDomain* domainSource, CReorderDomain* reorderDomain) 
    43 : CDomainAlgorithmTransformation(domainDestination, domainSource) 
     42CDomainAlgorithmReorder::CDomainAlgorithmReorder(bool isSource, CDomain* domainDestination, CDomain* domainSource, CReorderDomain* reorderDomain) 
     43: CDomainAlgorithmTransformation(isSource, domainDestination, domainSource) 
    4444TRY 
    4545{ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_reorder.hpp

    r1985 r1988  
    2020{ 
    2121public: 
    22   CDomainAlgorithmReorder(CDomain* domainDestination, CDomain* domainSource, CReorderDomain* reorderDomain); 
     22  CDomainAlgorithmReorder(bool isSource, CDomain* domainDestination, CDomain* domainSource, CReorderDomain* reorderDomain); 
    2323 
    2424  virtual ~CDomainAlgorithmReorder() {} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_transformation.cpp

    r1985 r1988  
    1515namespace xios { 
    1616 
    17 CDomainAlgorithmTransformation::CDomainAlgorithmTransformation(CDomain* domainDestination, CDomain* domainSource) 
    18  : CGenericAlgorithmTransformation(), domainDest_(domainDestination), domainSrc_(domainSource) 
     17CDomainAlgorithmTransformation::CDomainAlgorithmTransformation(bool isSource, CDomain* domainDestination, CDomain* domainSource) 
     18 : CGenericAlgorithmTransformation(isSource), domainDest_(domainDestination), domainSrc_(domainSource) 
    1919{ 
    2020} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_transformation.hpp

    r1985 r1988  
    2020  Algorithms for domain. 
    2121*/ 
    22 class CDomainAlgorithmTransformation : public virtual CGenericAlgorithmTransformation 
     22class CDomainAlgorithmTransformation : public /*virtual*/ CGenericAlgorithmTransformation 
    2323{ 
    2424public: 
    25   CDomainAlgorithmTransformation(CDomain* domainDestination, CDomain* domainSource); 
     25  CDomainAlgorithmTransformation(bool isSource, CDomain* domainDestination, CDomain* domainSource); 
    2626 
    2727  virtual ~CDomainAlgorithmTransformation(); 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_zoom.cpp

    r1985 r1988  
    2525  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid]; 
    2626 
    27   return (new CDomainAlgorithmZoom(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], zoomDomain)); 
     27  return (new CDomainAlgorithmZoom(isSource, domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], zoomDomain)); 
    2828} 
    2929CATCH 
     
    3737CATCH 
    3838 
    39 CDomainAlgorithmZoom::CDomainAlgorithmZoom(CDomain* domainDestination, CDomain* domainSource, CZoomDomain* zoomDomain) 
    40 : CDomainAlgorithmTransformation(domainDestination, domainSource) 
     39CDomainAlgorithmZoom::CDomainAlgorithmZoom(bool isSource, CDomain* domainDestination, CDomain* domainSource, CZoomDomain* zoomDomain) 
     40: CDomainAlgorithmTransformation(isSource, domainDestination, domainSource) 
    4141TRY 
    4242{ 
     
    275275  domainDest_->computeLocalMask(); 
    276276 
    277   computeAlgorithm(domainSource->getLocalView(CElementView::WORKFLOW), domainDestination->getLocalView(CElementView::WORKFLOW)) ; 
     277  domainDestination->checkAttributes() ; 
     278  this->computeAlgorithm(domainSource->getLocalView(CElementView::WORKFLOW), domainDestination->getLocalView(CElementView::WORKFLOW)) ; 
    278279   
    279280} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_zoom.hpp

    r1985 r1988  
    1818{ 
    1919public: 
    20   CDomainAlgorithmZoom(CDomain* domainDestination, CDomain* domainSource, CZoomDomain* zoomDomain); 
     20  CDomainAlgorithmZoom(bool isSource, CDomain* domainDestination, CDomain* domainSource, CZoomDomain* zoomDomain); 
    2121 
    2222  virtual ~CDomainAlgorithmZoom() {} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/generic_algorithm_transformation.cpp

    r1984 r1988  
    2020{ 
    2121 
    22 CGenericAlgorithmTransformation::CGenericAlgorithmTransformation() 
    23  : transformationMapping_(), transformationWeight_(), transformationPosition_(), 
     22CGenericAlgorithmTransformation::CGenericAlgorithmTransformation(bool isSource) 
     23 : isSource_(isSource), transformationMapping_(), transformationWeight_(), transformationPosition_(), 
    2424   idAuxInputs_(), type_(ELEMENT_NO_MODIFICATION_WITH_DATA), indexElementSrc_(), 
    2525   computedProcSrcNonTransformedElement_(false), eliminateRedondantSrc_(true), isDistributedComputed_(false) 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/generic_algorithm_transformation.hpp

    r1984 r1988  
    5353public: 
    5454  CGenericAlgorithmTransformation(); 
     55  CGenericAlgorithmTransformation(bool isSource); 
    5556 
    5657  virtual ~CGenericAlgorithmTransformation() {} 
     
    173174  bool eliminateRedondantSrc_ ; // flag to indicate if the transformation must select only one global source point for all proc. 
    174175                               // In this case it will choose preferentially the current process  
    175  
     176  bool isSource_ ; //flag to indicate that the algorithm is a source algorithm, that mean the grid is modified or generated but  
     177                   // no fluxes are tranformed 
    176178   
    177179// new methods for new algorithm 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/grid_generate.cpp

    r1622 r1988  
    8080      { 
    8181        genRectDomain = dynamic_cast<CGenerateRectilinearDomain*> (it->second); 
    82         algo = new CDomainAlgorithmGenerateRectilinear(domainListDestP[domainIndex], domainListSrcP[domainIndex], 
     82        algo = new CDomainAlgorithmGenerateRectilinear(true, domainListDestP[domainIndex], domainListSrcP[domainIndex], 
    8383                                                       gridDestination_, gridSource_, genRectDomain); 
    8484      } 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_extract_axis.cpp

    r1985 r1988  
    3535  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid]; 
    3636 
    37   return (new CScalarAlgorithmExtractAxis(scalarListDestP[scalarDstIndex], axisListSrcP[axisSrcIndex], extractAxis)); 
     37  return (new CScalarAlgorithmExtractAxis(isSource, scalarListDestP[scalarDstIndex], axisListSrcP[axisSrcIndex], extractAxis)); 
    3838} 
    3939CATCH 
     
    4747CATCH 
    4848 
    49 CScalarAlgorithmExtractAxis::CScalarAlgorithmExtractAxis(CScalar* scalarDestination, CAxis* axisSource, CExtractAxisToScalar* algo) 
    50  : CScalarAlgorithmTransformation(scalarDestination, axisSource), 
    51    reduction_(0) 
     49CScalarAlgorithmExtractAxis::CScalarAlgorithmExtractAxis(bool isSource, CScalar* scalarDestination, CAxis* axisSource, CExtractAxisToScalar* algo) 
     50 : CScalarAlgorithmTransformation(isSource, scalarDestination, axisSource), reduction_(0) 
    5251TRY 
    5352{ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_extract_axis.hpp

    r1985 r1988  
    2727{ 
    2828public: 
    29   CScalarAlgorithmExtractAxis(CScalar* scalarDestination, CAxis* axisSource, CExtractAxisToScalar* algo); 
     29  CScalarAlgorithmExtractAxis(bool isSource, CScalar* scalarDestination, CAxis* axisSource, CExtractAxisToScalar* algo); 
    3030 
    3131  virtual void apply(const std::vector<std::pair<int,double> >& localIndex, 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_reduce_axis.cpp

    r1985 r1988  
    3636  int axisSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid]; 
    3737 
    38   return (new CScalarAlgorithmReduceAxis(scalarListDestP[scalarDstIndex], axisListSrcP[axisSrcIndex], reduceAxis)); 
     38  return (new CScalarAlgorithmReduceAxis(isSource, scalarListDestP[scalarDstIndex], axisListSrcP[axisSrcIndex], reduceAxis)); 
    3939} 
    4040CATCH 
     
    4848CATCH 
    4949 
    50 CScalarAlgorithmReduceAxis::CScalarAlgorithmReduceAxis(CScalar* scalarDestination, CAxis* axisSource, CReduceAxisToScalar* algo) 
    51  : CScalarAlgorithmTransformation(scalarDestination, axisSource), 
    52    reduction_(0) 
     50CScalarAlgorithmReduceAxis::CScalarAlgorithmReduceAxis(bool isSource, CScalar* scalarDestination, CAxis* axisSource, CReduceAxisToScalar* algo) 
     51 : CScalarAlgorithmTransformation(isSource, scalarDestination, axisSource),reduction_(0) 
    5352TRY 
    5453{ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_reduce_axis.hpp

    r1985 r1988  
    2727{ 
    2828public: 
    29   CScalarAlgorithmReduceAxis(CScalar* scalarDestination, CAxis* axisSource, CReduceAxisToScalar* algo); 
     29  CScalarAlgorithmReduceAxis(bool isSource, CScalar* scalarDestination, CAxis* axisSource, CReduceAxisToScalar* algo); 
    3030 
    3131  virtual void apply(const std::vector<std::pair<int,double> >& localIndex, 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_reduce_domain.cpp

    r1985 r1988  
    3535  int domainSrcIndex = elementPositionInGridSrc2DomainPosition[elementPositionInGrid]; 
    3636 
    37   return (new CScalarAlgorithmReduceDomain(scalarListDestP[scalarDstIndex], domainListSrcP[domainSrcIndex], reduceDomain)); 
     37  return (new CScalarAlgorithmReduceDomain(isSource, scalarListDestP[scalarDstIndex], domainListSrcP[domainSrcIndex], reduceDomain)); 
    3838} 
    3939CATCH 
     
    4747CATCH 
    4848 
    49 CScalarAlgorithmReduceDomain::CScalarAlgorithmReduceDomain(CScalar* scalarDestination, CDomain* domainSource, CReduceDomainToScalar* algo) 
    50  : CScalarAlgorithmTransformation(scalarDestination, domainSource), 
     49CScalarAlgorithmReduceDomain::CScalarAlgorithmReduceDomain(bool isSource, CScalar* scalarDestination, CDomain* domainSource, CReduceDomainToScalar* algo) 
     50 : CScalarAlgorithmTransformation(isSource, scalarDestination, domainSource), 
    5151   reduction_(0) 
    5252TRY 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_reduce_domain.hpp

    r1985 r1988  
    2727{ 
    2828public: 
    29   CScalarAlgorithmReduceDomain(CScalar* scalarDestination, CDomain* domainSource, CReduceDomainToScalar* algo); 
     29  CScalarAlgorithmReduceDomain(bool isSource, CScalar* scalarDestination, CDomain* domainSource, CReduceDomainToScalar* algo); 
    3030 
    3131  virtual void apply(const std::vector<std::pair<int,double> >& localIndex, 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_reduce_scalar.cpp

    r1985 r1988  
    3131  int scalarSrcIndex = elementPositionInGridSrc2AxisPosition[elementPositionInGrid]; 
    3232 
    33   return (new CScalarAlgorithmReduceScalar(scalarListDestP[scalarDstIndex], scalarListSrcP[scalarSrcIndex], reduceScalar)); 
     33  return (new CScalarAlgorithmReduceScalar(isSource, scalarListDestP[scalarDstIndex], scalarListSrcP[scalarSrcIndex], reduceScalar)); 
    3434} 
    3535CATCH 
     
    4343CATCH 
    4444 
    45 CScalarAlgorithmReduceScalar::CScalarAlgorithmReduceScalar(CScalar* scalarDestination, CScalar* scalarSource, CReduceScalarToScalar* algo) 
    46  : CScalarAlgorithmTransformation(scalarDestination, scalarSource), 
    47    reduction_(0) 
     45CScalarAlgorithmReduceScalar::CScalarAlgorithmReduceScalar(bool isSource, CScalar* scalarDestination, CScalar* scalarSource, CReduceScalarToScalar* algo) 
     46 : CScalarAlgorithmTransformation(isSource, scalarDestination, scalarSource), reduction_(0) 
    4847TRY 
    4948{ 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_reduce_scalar.hpp

    r1985 r1988  
    2222{ 
    2323public: 
    24   CScalarAlgorithmReduceScalar(CScalar* scalarDestination, CScalar* scalarSource, CReduceScalarToScalar* algo); 
     24  CScalarAlgorithmReduceScalar(bool isSource, CScalar* scalarDestination, CScalar* scalarSource, CReduceScalarToScalar* algo); 
    2525 
    2626  virtual void apply(const std::vector<std::pair<int,double> >& localIndex, 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_transformation.cpp

    r1985 r1988  
    1818namespace xios { 
    1919 
    20 CScalarAlgorithmTransformation::CScalarAlgorithmTransformation(CScalar* scalarDestination, CScalar* scalarSource) 
    21  : CGenericAlgorithmTransformation(), 
     20CScalarAlgorithmTransformation::CScalarAlgorithmTransformation(bool isSource, CScalar* scalarDestination, CScalar* scalarSource) 
     21 : CGenericAlgorithmTransformation(isSource), 
    2222   scalarDest_(scalarDestination), 
    2323   scalarSrc_(scalarSource), axisSrc_(0), domainSrc_(0) 
     
    2525} 
    2626 
    27 CScalarAlgorithmTransformation::CScalarAlgorithmTransformation(CScalar* scalarDestination, CAxis* axisSource) 
    28  : CGenericAlgorithmTransformation(), 
     27CScalarAlgorithmTransformation::CScalarAlgorithmTransformation(bool isSource, CScalar* scalarDestination, CAxis* axisSource) 
     28 : CGenericAlgorithmTransformation(isSource), 
    2929   scalarDest_(scalarDestination), 
    3030   scalarSrc_(0), axisSrc_(axisSource), domainSrc_(0) 
     
    3232} 
    3333 
    34 CScalarAlgorithmTransformation::CScalarAlgorithmTransformation(CScalar* scalarDestination, CDomain* domainSource) 
    35  : CGenericAlgorithmTransformation(), 
     34CScalarAlgorithmTransformation::CScalarAlgorithmTransformation(bool isSource, CScalar* scalarDestination, CDomain* domainSource) 
     35 : CGenericAlgorithmTransformation(isSource), 
    3636   scalarDest_(scalarDestination), 
    3737   scalarSrc_(0), axisSrc_(0), domainSrc_(domainSource) 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_transformation.hpp

    r1985 r1988  
    2222  Algorithms for scalar. 
    2323*/ 
    24 class CScalarAlgorithmTransformation : public virtual CGenericAlgorithmTransformation 
     24class CScalarAlgorithmTransformation : public /*virtual*/ CGenericAlgorithmTransformation 
    2525{ 
    2626public: 
    27   CScalarAlgorithmTransformation(CScalar* scalarDestination, CScalar* scalarSource); 
    28   CScalarAlgorithmTransformation(CScalar* scalarDestination, CAxis* axisSource); 
    29   CScalarAlgorithmTransformation(CScalar* scalarDestination, CDomain* domainSource); 
     27  CScalarAlgorithmTransformation(bool isSource, CScalar* scalarDestination, CScalar* scalarSource); 
     28  CScalarAlgorithmTransformation(bool isSource, CScalar* scalarDestination, CAxis* axisSource); 
     29  CScalarAlgorithmTransformation(bool isSource, CScalar* scalarDestination, CDomain* domainSource); 
    3030 
    3131  virtual ~CScalarAlgorithmTransformation(); 
Note: See TracChangeset for help on using the changeset viewer.