/[escript]/trunk/escript/src/NullDomain.h
ViewVC logotype

Contents of /trunk/escript/src/NullDomain.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1811 - (show annotations)
Thu Sep 25 23:11:13 2008 UTC (11 years ago) by ksteube
File MIME type: text/plain
File size: 4522 byte(s)
Copyright updated in all files

1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2008 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
15 #if !defined escript_NullDomain_20040604_H
16 #define escript_NullDomain_20040604_H
17 #include "system_dep.h"
18
19 #include "AbstractDomain.h"
20
21 #include <string>
22
23 namespace escript {
24
25 /**
26 \brief
27 NullDomain provides a null value for domain. Needed for the construction
28 of a default FunctionSpace.
29
30 Description:
31 NullDomain provides a null value for domain. Needed for the construction
32 of a default FunctionSpace. Inherits from AbstractDomain and overrides its
33 methods.
34 This domain supports a single type of FunctionSpace for which canTag is true.
35 This compromise is needed to allow the default contructor of DataTagged to
36 have a FunctionSpace which supports tagging.
37 See notes on the borrowListOfTagsInUse() method.
38 */
39
40 class NullDomain : public AbstractDomain {
41
42 public:
43
44 /**
45 \brief
46 Default constructor for NullDomain.
47
48 Description:
49 Default constructor for NullDomain.
50
51 */
52 ESCRIPT_DLL_API
53 NullDomain();
54
55 /**
56 \brief
57 Returns true if the given integer is a valid function space type
58 for this domain.
59 */
60 ESCRIPT_DLL_API
61 virtual bool isValidFunctionSpaceType(int functionSpaceType) const;
62
63 /**
64 \brief
65 Return a description for this domain.
66 */
67 ESCRIPT_DLL_API
68 virtual std::string getDescription() const;
69
70 /**
71 \brief
72 Return a continuous FunctionSpace.
73 */
74 ESCRIPT_DLL_API
75 virtual int getContinuousFunctionCode() const;
76
77 /**
78 \brief
79 Return a function FunctionSpace.
80 */
81 ESCRIPT_DLL_API
82 virtual int getFunctionCode() const;
83
84 /**
85 \brief
86 Return a function on boundary FunctionSpace.
87 */
88 ESCRIPT_DLL_API
89 virtual int getFunctionOnBoundaryCode() const;
90
91 /**
92 \brief
93 Return a FunctionSpace.
94 */
95 ESCRIPT_DLL_API
96 virtual int getFunctionOnContactZeroCode() const;
97
98 /**
99 \brief
100 Return a FunctionSpace.
101 */
102 ESCRIPT_DLL_API
103 virtual int getFunctionOnContactOneCode() const;
104
105 /**
106 \brief
107 Return a FunctionSpace.
108 */
109 ESCRIPT_DLL_API
110 virtual int getSolutionCode() const;
111
112 /**
113 \brief
114 Return a FunctionSpace.
115 */
116 ESCRIPT_DLL_API
117 virtual int getReducedSolutionCode() const;
118
119 /**
120 \brief
121 Return a FunctionSpace.
122 */
123 ESCRIPT_DLL_API
124 virtual int getDiracDeltaFunctionCode() const;
125
126 /**
127 \brief
128 Return the number of data points per sample, and the number of samples as a pair.
129 \param functionSpaceCode Input - Code for the function space type.
130 \return pair, first - number of data points per sample, second - number of samples
131 */
132 ESCRIPT_DLL_API
133 virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;
134
135 /**
136 \brief
137 Return the tag key for the given sample number.
138 \param functionSpaceType Input - The function space type.
139 \param sampleNo Input - The sample number.
140 */
141 ESCRIPT_DLL_API
142 virtual int getTagFromSampleNo(int functionSpaceType, int sampleNo) const;
143
144 /**
145 \brief
146 Return a borrowed pointer to the sample reference number id list
147 \param functionSpaceType Input - The function space type.
148 */
149 ESCRIPT_DLL_API
150 virtual int* borrowSampleReferenceIDs(int functionSpaceType) const;
151
152 /**
153 \brief
154 */
155 ESCRIPT_DLL_API
156 virtual int getDim() const;
157
158 /**
159 \brief
160 Return true if given domains are equal.
161 */
162 ESCRIPT_DLL_API
163 virtual bool operator==(const AbstractDomain& other) const;
164 ESCRIPT_DLL_API
165 virtual bool operator!=(const AbstractDomain& other) const;
166
167 /**
168 \brief Checks if this domain allows tags for the specified functionSpaceCode.
169 */
170 ESCRIPT_DLL_API
171 virtual
172 bool canTag(int functionSpaceCode) const;
173
174 /**
175 \brief
176 return the number of tags in use.
177 For this class the answer is always 1(the default tag).
178 */
179 ESCRIPT_DLL_API
180 virtual int getNumberOfTagsInUse(int functionSpaceCode) const;
181
182 /**
183 \brief returns a pointer to an array with the tags used.
184 For this class the answer will always be {0}
185 */
186 ESCRIPT_DLL_API
187 virtual int* borrowListOfTagsInUse(int functionSpaceCode) const;
188
189 protected:
190
191 private:
192
193 };
194
195 } // end of namespace
196
197 #endif

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26