source: XIOS/dev/dev_trunk_graph/src/distribution/grid_elements.hpp @ 2019

Last change on this file since 2019 was 2019, checked in by yushan, 3 years ago

Graph intermedia commit to a tmp branch

  • 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.