/[escript]/branches/split/weipa/src/RipleyDomain.h
ViewVC logotype

Contents of /branches/split/weipa/src/RipleyDomain.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4724 - (show annotations)
Thu Mar 6 05:22:12 2014 UTC (5 years, 1 month ago) by jfenwick
File MIME type: text/plain
File size: 2815 byte(s)
Work towards parallel domains

1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2014 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 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16
17 #ifndef __WEIPA_RIPLEYDOMAIN_H__
18 #define __WEIPA_RIPLEYDOMAIN_H__
19
20 #include <weipa/DomainChunk.h>
21 #include <weipa/RipleyElements.h>
22 #include <boost/enable_shared_from_this.hpp>
23
24 namespace weipa {
25
26 /// \brief Represents a full Ripley domain including nodes and elements.
27 ///
28 /// This class represents a Ripley domain including nodes, cells, and face
29 /// elements. It provides functionality to read a domain from a file
30 /// (generated by the domain's dump() method) or directly through an instance
31 /// of RipleyDomain.
32 ///
33 /// Once initialised, the domain can be saved to a Silo file or its nodes
34 /// and elements accessed through the respective methods.
35 class RipleyDomain : public DomainChunk, public boost::enable_shared_from_this<RipleyDomain>
36 {
37 public:
38 RipleyDomain();
39 RipleyDomain(const RipleyDomain& m);
40 virtual ~RipleyDomain() {}
41 virtual bool initFromEscript(const escript::AbstractDomain* domain);
42 virtual bool initFromFile(const std::string& filename);
43 virtual bool writeToSilo(DBfile* dbfile, const std::string& pathInSilo,
44 const StringVec& labels, const StringVec& units,
45 bool writeMeshData);
46 virtual void reorderGhostZones(int ownIndex);
47 virtual void removeGhostZones(int ownIndex);
48 virtual StringVec getMeshNames() const;
49 virtual StringVec getVarNames() const;
50 virtual ElementData_ptr getElementsByName(const std::string& name) const;
51 virtual NodeData_ptr getMeshByName(const std::string& name) const;
52 virtual DataVar_ptr getDataVarByName(const std::string& name) const;
53 virtual Centering getCenteringForFunctionSpace(int fsCode) const;
54 virtual NodeData_ptr getMeshForFunctionSpace(int fsCode) const;
55 virtual ElementData_ptr getElementsForFunctionSpace(int fsCode) const;
56 virtual NodeData_ptr getNodes() const { return nodes; }
57 virtual std::string getSiloPath() const { return siloPath; }
58 virtual void setSiloPath(const std::string& path) { siloPath = path; }
59
60 private:
61 bool initialized;
62 RipleyNodes_ptr nodes;
63 RipleyElements_ptr cells;
64 RipleyElements_ptr faces;
65 std::string siloPath;
66 };
67
68 } // namespace weipa
69
70 #endif // __WEIPA_RIPLEYDOMAIN_H__
71

  ViewVC Help
Powered by ViewVC 1.1.26