ESYS13
Revision_
|
00001 00002 /******************************************************* 00003 * 00004 * Copyright (c) 2003-2012 by University of Queensland 00005 * Earth Systems Science Computational Center (ESSCC) 00006 * http://www.uq.edu.au/esscc 00007 * 00008 * Primary Business: Queensland, Australia 00009 * Licensed under the Open Software License version 3.0 00010 * http://www.opensource.org/licenses/osl-3.0.php 00011 * 00012 *******************************************************/ 00013 00014 #ifndef __WEIPA_DOMAINCHUNK_H__ 00015 #define __WEIPA_DOMAINCHUNK_H__ 00016 00017 #include <weipa/weipa.h> 00018 00019 class DBfile; 00020 00021 namespace escript { 00022 class AbstractDomain; 00023 } 00024 00025 namespace weipa { 00026 00027 typedef enum { 00028 NODE_CENTERED=0, 00029 ZONE_CENTERED 00030 } Centering; 00031 00032 00042 class DomainChunk 00043 { 00044 public: 00046 virtual bool initFromEscript(const escript::AbstractDomain* domain) = 0; 00047 00049 virtual bool initFromFile(const std::string& filename) = 0; 00050 00052 virtual bool writeToSilo(DBfile* dbfile, const std::string& pathInSilo, 00053 const StringVec& labels, 00054 const StringVec& units, 00055 bool writeMeshData) = 0; 00056 00059 virtual void reorderGhostZones(int ownIndex) = 0; 00060 00062 virtual void removeGhostZones(int ownIndex) = 0; 00063 00065 virtual StringVec getMeshNames() const = 0; 00066 00068 virtual StringVec getVarNames() const = 0; 00069 00071 virtual ElementData_ptr getElementsByName(const std::string& name) const=0; 00072 00074 virtual NodeData_ptr getMeshByName(const std::string& name) const = 0; 00075 00077 virtual DataVar_ptr getDataVarByName(const std::string& name) const = 0; 00078 00081 virtual Centering getCenteringForFunctionSpace(int fsCode) const = 0; 00082 00084 virtual NodeData_ptr getMeshForFunctionSpace(int fsCode) const = 0; 00085 00087 virtual ElementData_ptr getElementsForFunctionSpace(int fsCode) const = 0; 00088 00090 virtual NodeData_ptr getNodes() const = 0; 00091 00094 virtual std::string getSiloPath() const = 0; 00095 00097 virtual void setSiloPath(const std::string& path) = 0; 00098 00099 protected: 00101 virtual ~DomainChunk() {} 00102 }; 00103 00104 } // namespace weipa 00105 00106 #endif // __WEIPA_DOMAINCHUNK_H__ 00107