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