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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2548 - (hide annotations)
Mon Jul 20 06:20:06 2009 UTC (10 years, 8 months ago) by jfenwick
File MIME type: text/plain
File size: 5670 byte(s)
Updating copyright notices
1 jgs 115
2 ksteube 1312 /*******************************************************
3 ksteube 1811 *
4 jfenwick 2548 * Copyright (c) 2003-2009 by University of Queensland
5 ksteube 1811 * 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 ksteube 1312
14 ksteube 1811
15 jgs 115 #if !defined escript_NullDomain_20040604_H
16 jgs 82 #define escript_NullDomain_20040604_H
17 woo409 757 #include "system_dep.h"
18 jgs 82
19 jgs 474 #include "AbstractDomain.h"
20 jgs 82
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 jgs 115 of a default FunctionSpace. Inherits from AbstractDomain and overrides its
33     methods.
34 jfenwick 1802 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 jgs 82 */
39 jgs 115
40 jgs 82 class NullDomain : public AbstractDomain {
41    
42     public:
43    
44     /**
45     \brief
46 jgs 117 Default constructor for NullDomain.
47 jgs 82
48     Description:
49 jgs 117 Default constructor for NullDomain.
50 jgs 82
51     */
52 woo409 757 ESCRIPT_DLL_API
53 jgs 82 NullDomain();
54 jgs 115
55 jgs 82 /**
56     \brief
57     Returns true if the given integer is a valid function space type
58     for this domain.
59     */
60 woo409 757 ESCRIPT_DLL_API
61 jgs 82 virtual bool isValidFunctionSpaceType(int functionSpaceType) const;
62 jgs 115
63 jgs 82 /**
64     \brief
65 jgs 117 Return a description for this domain.
66 jgs 82 */
67 woo409 757 ESCRIPT_DLL_API
68 jgs 82 virtual std::string getDescription() const;
69 jgs 115
70 jgs 82 /**
71     \brief
72 jfenwick 2087 Return a description for the given function space type code.
73     */
74     ESCRIPT_DLL_API
75     virtual std::string functionSpaceTypeAsString(int functionSpaceType) const;
76    
77     /**
78     \brief
79     Interpolates data given on source onto target where source and target have to be given on the same domain.
80     NullDomain only has one FunctionSpace so this makes target a shallow copy of source.
81     */
82     ESCRIPT_DLL_API
83     virtual void interpolateOnDomain(escript::Data& target,const escript::Data& source) const;
84     ESCRIPT_DLL_API
85     virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;
86    
87     /**
88     \brief
89     Interpolates data given on source onto target where source and target are given on different domains.
90     We do not permit interpolation into the NullDomain so this method always throws.
91     */
92     ESCRIPT_DLL_API
93     virtual void interpolateACross(escript::Data& target, const escript::Data& source) const;
94     ESCRIPT_DLL_API
95     virtual bool probeInterpolationACross(int functionSpaceType_source,const AbstractDomain& targetDomain, int functionSpaceType_target) const;
96    
97     /**
98     \brief
99 jgs 117 Return a continuous FunctionSpace.
100 jgs 82 */
101 woo409 757 ESCRIPT_DLL_API
102 jgs 82 virtual int getContinuousFunctionCode() const;
103 jgs 115
104 jgs 82 /**
105     \brief
106 jgs 117 Return a function FunctionSpace.
107 jgs 82 */
108 woo409 757 ESCRIPT_DLL_API
109 jgs 82 virtual int getFunctionCode() const;
110 jgs 115
111 jgs 82 /**
112     \brief
113 jgs 117 Return a function on boundary FunctionSpace.
114 jgs 82 */
115 woo409 757 ESCRIPT_DLL_API
116 jgs 82 virtual int getFunctionOnBoundaryCode() const;
117 jgs 115
118 jgs 82 /**
119     \brief
120 jgs 117 Return a FunctionSpace.
121 jgs 82 */
122 woo409 757 ESCRIPT_DLL_API
123 jgs 82 virtual int getFunctionOnContactZeroCode() const;
124 jgs 115
125 jgs 82 /**
126     \brief
127 jgs 117 Return a FunctionSpace.
128 jgs 82 */
129 woo409 757 ESCRIPT_DLL_API
130 jgs 82 virtual int getFunctionOnContactOneCode() const;
131 jgs 115
132 jgs 82 /**
133     \brief
134 jgs 117 Return a FunctionSpace.
135 jgs 82 */
136 woo409 757 ESCRIPT_DLL_API
137 jgs 82 virtual int getSolutionCode() const;
138 jgs 115
139 jgs 82 /**
140     \brief
141 jgs 117 Return a FunctionSpace.
142 jgs 82 */
143 woo409 757 ESCRIPT_DLL_API
144 jgs 82 virtual int getReducedSolutionCode() const;
145 jgs 115
146 jgs 82 /**
147     \brief
148 jgs 117 Return a FunctionSpace.
149 jgs 82 */
150 woo409 757 ESCRIPT_DLL_API
151 jgs 82 virtual int getDiracDeltaFunctionCode() const;
152 jgs 115
153     /**
154 jgs 82 \brief
155     Return the number of data points per sample, and the number of samples as a pair.
156     \param functionSpaceCode Input - Code for the function space type.
157     \return pair, first - number of data points per sample, second - number of samples
158     */
159 woo409 757 ESCRIPT_DLL_API
160 jgs 82 virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;
161 jgs 115
162 jgs 82 /**
163     \brief
164     Return the tag key for the given sample number.
165     \param functionSpaceType Input - The function space type.
166     \param sampleNo Input - The sample number.
167     */
168 woo409 757 ESCRIPT_DLL_API
169 jgs 82 virtual int getTagFromSampleNo(int functionSpaceType, int sampleNo) const;
170 jgs 115
171 jgs 82 /**
172     \brief
173 gross 964 Return a borrowed pointer to the sample reference number id list
174 jgs 110 \param functionSpaceType Input - The function space type.
175 jgs 82 */
176 woo409 757 ESCRIPT_DLL_API
177 jfenwick 2487 virtual const int* borrowSampleReferenceIDs(int functionSpaceType) const;
178 jgs 115
179 jgs 110 /**
180     \brief
181     */
182 woo409 757 ESCRIPT_DLL_API
183 jgs 82 virtual int getDim() const;
184 jgs 115
185 jgs 121 /**
186     \brief
187     Return true if given domains are equal.
188     */
189 woo409 757 ESCRIPT_DLL_API
190 jgs 121 virtual bool operator==(const AbstractDomain& other) const;
191 woo409 757 ESCRIPT_DLL_API
192 jgs 121 virtual bool operator!=(const AbstractDomain& other) const;
193    
194 jfenwick 1802 /**
195     \brief Checks if this domain allows tags for the specified functionSpaceCode.
196     */
197     ESCRIPT_DLL_API
198     virtual
199     bool canTag(int functionSpaceCode) const;
200    
201     /**
202     \brief
203     return the number of tags in use.
204     For this class the answer is always 1(the default tag).
205     */
206     ESCRIPT_DLL_API
207     virtual int getNumberOfTagsInUse(int functionSpaceCode) const;
208    
209     /**
210     \brief returns a pointer to an array with the tags used.
211     For this class the answer will always be {0}
212     */
213     ESCRIPT_DLL_API
214 jfenwick 2487 virtual const int* borrowListOfTagsInUse(int functionSpaceCode) const;
215 jfenwick 1802
216 jgs 82 protected:
217    
218     private:
219 jfenwick 1802
220 jgs 82 };
221    
222     } // end of namespace
223 jgs 117
224 jgs 82 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26