escript  Revision_
RipleyDomain.h
Go to the documentation of this file.
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_RIPLEYDOMAIN_H__
00018 #define __WEIPA_RIPLEYDOMAIN_H__
00019 
00020 #include <weipa/DomainChunk.h>
00021 #include <weipa/RipleyElements.h>
00022 #include <boost/enable_shared_from_this.hpp>
00023 
00024 namespace weipa {
00025 
00035 class RipleyDomain : public DomainChunk, public boost::enable_shared_from_this<RipleyDomain>
00036 {
00037 public:
00038     RipleyDomain();
00039     RipleyDomain(const RipleyDomain& m);
00040     virtual ~RipleyDomain() {}
00041     virtual bool initFromEscript(const escript::AbstractDomain* domain);
00042     virtual bool initFromFile(const std::string& filename);
00043     virtual bool writeToSilo(DBfile* dbfile, const std::string& pathInSilo,
00044                              const StringVec& labels, const StringVec& units,
00045                              bool writeMeshData);
00046     virtual void reorderGhostZones(int ownIndex);
00047     virtual void removeGhostZones(int ownIndex);
00048     virtual StringVec getMeshNames() const;
00049     virtual StringVec getVarNames() const;
00050     virtual ElementData_ptr getElementsByName(const std::string& name) const;
00051     virtual NodeData_ptr getMeshByName(const std::string& name) const;
00052     virtual DataVar_ptr getDataVarByName(const std::string& name) const;
00053     virtual Centering getCenteringForFunctionSpace(int fsCode) const;
00054     virtual NodeData_ptr getMeshForFunctionSpace(int fsCode) const;
00055     virtual ElementData_ptr getElementsForFunctionSpace(int fsCode) const;
00056     virtual NodeData_ptr getNodes() const { return nodes; }
00057     virtual std::string getSiloPath() const { return siloPath; }
00058     virtual void setSiloPath(const std::string& path)  { siloPath = path; }
00059 
00060 private:
00061     bool initialized;
00062     RipleyNodes_ptr    nodes;
00063     RipleyElements_ptr cells;
00064     RipleyElements_ptr faces;
00065     std::string        siloPath;
00066 };
00067 
00068 } // namespace weipa
00069 
00070 #endif // __WEIPA_RIPLEYDOMAIN_H__
00071