Changeset 1960


Ignore:
Timestamp:
10/12/20 11:23:54 (4 years ago)
Author:
ymipsl
Message:

Bug fix when using grid masking. Grid local connector apply systematicalling grid masking need for data coming from model.
Add a flag to chose using masking or not.

YM

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

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_elements.cpp

    r1918 r1960  
    1212  } 
    1313   
    14   CGridLocalConnector* CGridLocalElements::getConnector(CElementView::type srcType, CElementView::type dstType) 
     14  CGridLocalConnector* CGridLocalElements::getConnector(CElementView::type srcType, CElementView::type dstType, bool withMask) 
    1515  { 
    1616    auto newPair = pair<CElementView::type,CElementView::type>(srcType,dstType); 
     
    1818    if (it==connectors_.end())  
    1919    { 
    20       auto insertPair=pair<pair<CElementView::type,CElementView::type>, CGridLocalConnector*>(newPair,new CGridLocalConnector(this, srcType, dstType)) ; 
     20      auto insertPair=pair<pair<CElementView::type,CElementView::type>, CGridLocalConnector*>(newPair,new CGridLocalConnector(this, srcType, dstType, withMask)) ; 
    2121      it=connectors_.insert(insertPair).first ; 
    2222    } 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_elements.hpp

    r1918 r1960  
    2828      std::vector<CLocalElement*>& getElements(void) { return elements_ ; } 
    2929      CGridLocalView* getView(CElementView::type type) ; 
    30       CGridLocalConnector* getConnector(CElementView::type srcType, CElementView::type dstType) ; 
     30      CGridLocalConnector* getConnector(CElementView::type srcType, CElementView::type dstType, bool withMask=false) ; 
    3131  } ; 
    3232} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_local_connector.cpp

    r1918 r1960  
    1616  }  
    1717 
    18   CGridLocalConnector::CGridLocalConnector(CGridLocalElements* parent, CElementView::type srcType, CElementView::type dstType) 
     18  CGridLocalConnector::CGridLocalConnector(CGridLocalElements* parent, CElementView::type srcType, CElementView::type dstType, bool withMask) 
    1919  { 
    2020    CGridLocalView* srcView=parent->getView(srcType) ; 
     
    3131    for(auto connector : elementsConnector_) dstSize_*=connector->getDstSize() ; 
    3232 
    33     if (parent->hasLocalMask()) 
     33    if (parent->hasLocalMask() && withMask) 
    3434    { 
    3535      vector<CLocalConnector*> elementsConnector ; 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_local_connector.hpp

    r1918 r1960  
    2525       
    2626      CGridLocalConnector(const std::vector<CLocalConnector*>& elementsConnector)  ; 
    27       CGridLocalConnector(CGridLocalElements* parent, CElementView::type srcType, CElementView::type dstType) ; 
     27      CGridLocalConnector(CGridLocalElements* parent, CElementView::type srcType, CElementView::type dstType, bool withMask=false) ; 
    2828      int getSrcSize(void) { return srcSize_ ;} 
    2929      int getDstSize(void) { return dstSize_ ;} 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.cpp

    r1956 r1960  
    33883388  void CGrid::computeModelToWorkflowConnector(void) 
    33893389  { 
    3390     modelToWorkflowConnector_ = getGridLocalElements()->getConnector(CElementView::MODEL,CElementView::WORKFLOW) ; 
     3390    modelToWorkflowConnector_ = getGridLocalElements()->getConnector(CElementView::MODEL,CElementView::WORKFLOW,true) ; 
    33913391  } 
    33923392 
     
    33983398  void CGrid::computeWorkflowToModelConnector(void) 
    33993399  { 
    3400     workflowToModelConnector_ = getGridLocalElements()->getConnector(CElementView::WORKFLOW,CElementView::MODEL) ; 
     3400    workflowToModelConnector_ = getGridLocalElements()->getConnector(CElementView::WORKFLOW,CElementView::MODEL,true) ; 
    34013401  } 
    34023402 
Note: See TracChangeset for help on using the changeset viewer.