/[escript]/trunk/weipa/src/RipleyDomain.h
ViewVC logotype

Contents of /trunk/weipa/src/RipleyDomain.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3792 - (show annotations)
Wed Feb 1 06:16:25 2012 UTC (7 years, 1 month ago) by caltinay
File MIME type: text/plain
File size: 2628 byte(s)
Merged ripley rectangular domain into trunk.

1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2012 by University of Queensland
5 * Earth Systems Science Computational Center (ESSCC)
6 * http://www.uq.edu.au/esscc
7 *
8 * Primary Business: Queensland, Australia
9 * Licensed under the Open Software License version 3.0
10 * http://www.opensource.org/licenses/osl-3.0.php
11 *
12 *******************************************************/
13
14 #ifndef __WEIPA_RIPLEYDOMAIN_H__
15 #define __WEIPA_RIPLEYDOMAIN_H__
16
17 #include <weipa/DomainChunk.h>
18 #include <weipa/RipleyElements.h>
19 #include <boost/enable_shared_from_this.hpp>
20
21 namespace weipa {
22
23 /// \brief Represents a full Ripley domain including nodes and elements.
24 ///
25 /// This class represents a Ripley domain including nodes, cells, and face
26 /// elements. It provides functionality to read a domain from a file
27 /// (generated by the domain's dump() method) or directly through an instance
28 /// of RipleyDomain.
29 ///
30 /// Once initialised, the domain can be saved to a Silo file or its nodes
31 /// and elements accessed through the respective methods.
32 class RipleyDomain : public DomainChunk, public boost::enable_shared_from_this<RipleyDomain>
33 {
34 public:
35 RipleyDomain();
36 RipleyDomain(const RipleyDomain& m);
37 virtual ~RipleyDomain() {}
38 virtual bool initFromEscript(const escript::AbstractDomain* domain);
39 virtual bool initFromFile(const std::string& filename);
40 virtual bool writeToSilo(DBfile* dbfile, const std::string& pathInSilo,
41 const StringVec& labels, const StringVec& units,
42 bool writeMeshData);
43 virtual void reorderGhostZones(int ownIndex);
44 virtual void removeGhostZones(int ownIndex);
45 virtual StringVec getMeshNames() const;
46 virtual StringVec getVarNames() const;
47 virtual ElementData_ptr getElementsByName(const std::string& name) const;
48 virtual NodeData_ptr getMeshByName(const std::string& name) const;
49 virtual DataVar_ptr getDataVarByName(const std::string& name) const;
50 virtual Centering getCenteringForFunctionSpace(int fsCode) const;
51 virtual NodeData_ptr getMeshForFunctionSpace(int fsCode) const;
52 virtual ElementData_ptr getElementsForFunctionSpace(int fsCode) const;
53 virtual NodeData_ptr getNodes() const { return nodes; }
54 virtual std::string getSiloPath() const { return siloPath; }
55 virtual void setSiloPath(const std::string& path) { siloPath = path; }
56
57 private:
58 bool initialized;
59 RipleyNodes_ptr nodes;
60 RipleyElements_ptr cells;
61 RipleyElements_ptr faces;
62 std::string siloPath;
63 };
64
65 } // namespace weipa
66
67 #endif // __WEIPA_RIPLEYDOMAIN_H__
68

  ViewVC Help
Powered by ViewVC 1.1.26