source: XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/grid_elements.hpp @ 2230

Last change on this file since 2230 was 1960, checked in by ymipsl, 4 years ago

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

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#ifndef __GRID_ELEMENTS_HPP__
2#define __GRID_ELEMENTS_HPP__
3
4#include "xios_spl.hpp"
5#include "array_new.hpp"
6#include "element.hpp"
7
8namespace xios
9{
10  class CGridLocalView ;
11  class CGridLocalConnector ;
12
13  class CGridLocalElements 
14  {
15    private:
16      std::vector<CLocalElement*> elements_ ;
17      std::vector<CGridLocalView*> views_= std::vector<CGridLocalView*>(CElementView::numViewType_) ;
18      std::map<pair<CElementView::type,CElementView::type>, CGridLocalConnector*> connectors_ ;
19      vector<bool> localMask_ ;
20 
21    public:
22      CGridLocalElements(vector<CLocalElement*> elements) : elements_(elements) {}
23      CGridLocalElements(vector<CLocalElement*> elements, vector<bool>& localMask) : elements_(elements), localMask_(localMask) {}
24
25      bool hasLocalMask() { return !localMask_.empty() ;}
26      vector<bool>& getLocalMask(void) { return localMask_ ;}
27
28      std::vector<CLocalElement*>& getElements(void) { return elements_ ; }
29      CGridLocalView* getView(CElementView::type type) ;
30      CGridLocalConnector* getConnector(CElementView::type srcType, CElementView::type dstType, bool withMask=false) ;
31  } ;
32}
33
34#endif
Note: See TracBrowser for help on using the repository browser.