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

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

Big update on on going work related to data distribution and transfer between clients and servers.

  • move all related file into distribution directorie
  • implement the concept of data "View"
  • implement the concept of "connector" which make the data transfer between 2 differents "Views"

YM

  • Property svn:executable set to *
File size: 1.1 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) ;
31  } ;
32}
33
34#endif
Note: See TracBrowser for help on using the repository browser.