ESScript  Revision_4488
DomainChunk.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15 
16 #ifndef __WEIPA_DOMAINCHUNK_H__
17 #define __WEIPA_DOMAINCHUNK_H__
18 
19 #include <weipa/weipa.h>
20 
21 class DBfile;
22 
23 namespace escript {
24  class AbstractDomain;
25 }
26 
27 namespace weipa {
28 
29 typedef enum {
32 } Centering;
33 
34 
45 {
46 public:
48  virtual bool initFromEscript(const escript::AbstractDomain* domain) = 0;
49 
51  virtual bool initFromFile(const std::string& filename) = 0;
52 
54  virtual bool writeToSilo(DBfile* dbfile, const std::string& pathInSilo,
55  const StringVec& labels,
56  const StringVec& units,
57  bool writeMeshData) = 0;
58 
61  virtual void reorderGhostZones(int ownIndex) = 0;
62 
64  virtual void removeGhostZones(int ownIndex) = 0;
65 
67  virtual StringVec getMeshNames() const = 0;
68 
70  virtual StringVec getVarNames() const = 0;
71 
73  virtual ElementData_ptr getElementsByName(const std::string& name) const=0;
74 
76  virtual NodeData_ptr getMeshByName(const std::string& name) const = 0;
77 
79  virtual DataVar_ptr getDataVarByName(const std::string& name) const = 0;
80 
83  virtual Centering getCenteringForFunctionSpace(int fsCode) const = 0;
84 
86  virtual NodeData_ptr getMeshForFunctionSpace(int fsCode) const = 0;
87 
89  virtual ElementData_ptr getElementsForFunctionSpace(int fsCode) const = 0;
90 
92  virtual NodeData_ptr getNodes() const = 0;
93 
96  virtual std::string getSiloPath() const = 0;
97 
99  virtual void setSiloPath(const std::string& path) = 0;
100 
101 protected:
103  virtual ~DomainChunk() {}
104 };
105 
106 } // namespace weipa
107 
108 #endif // __WEIPA_DOMAINCHUNK_H__
109