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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

1 jgs 115
2 ksteube 1312 /*******************************************************
3 ksteube 1811 *
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 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 jgs 117 Return a continuous FunctionSpace.
73 jgs 82 */
74 woo409 757 ESCRIPT_DLL_API
75 jgs 82 virtual int getContinuousFunctionCode() const;
76 jgs 115
77 jgs 82 /**
78     \brief
79 jgs 117 Return a function FunctionSpace.
80 jgs 82 */
81 woo409 757 ESCRIPT_DLL_API
82 jgs 82 virtual int getFunctionCode() const;
83 jgs 115
84 jgs 82 /**
85     \brief
86 jgs 117 Return a function on boundary FunctionSpace.
87 jgs 82 */
88 woo409 757 ESCRIPT_DLL_API
89 jgs 82 virtual int getFunctionOnBoundaryCode() const;
90 jgs 115
91 jgs 82 /**
92     \brief
93 jgs 117 Return a FunctionSpace.
94 jgs 82 */
95 woo409 757 ESCRIPT_DLL_API
96 jgs 82 virtual int getFunctionOnContactZeroCode() const;
97 jgs 115
98 jgs 82 /**
99     \brief
100 jgs 117 Return a FunctionSpace.
101 jgs 82 */
102 woo409 757 ESCRIPT_DLL_API
103 jgs 82 virtual int getFunctionOnContactOneCode() const;
104 jgs 115
105 jgs 82 /**
106     \brief
107 jgs 117 Return a FunctionSpace.
108 jgs 82 */
109 woo409 757 ESCRIPT_DLL_API
110 jgs 82 virtual int getSolutionCode() const;
111 jgs 115
112 jgs 82 /**
113     \brief
114 jgs 117 Return a FunctionSpace.
115 jgs 82 */
116 woo409 757 ESCRIPT_DLL_API
117 jgs 82 virtual int getReducedSolutionCode() const;
118 jgs 115
119 jgs 82 /**
120     \brief
121 jgs 117 Return a FunctionSpace.
122 jgs 82 */
123 woo409 757 ESCRIPT_DLL_API
124 jgs 82 virtual int getDiracDeltaFunctionCode() const;
125 jgs 115
126     /**
127 jgs 82 \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 woo409 757 ESCRIPT_DLL_API
133 jgs 82 virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;
134 jgs 115
135 jgs 82 /**
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 woo409 757 ESCRIPT_DLL_API
142 jgs 82 virtual int getTagFromSampleNo(int functionSpaceType, int sampleNo) const;
143 jgs 115
144 jgs 82 /**
145     \brief
146 gross 964 Return a borrowed pointer to the sample reference number id list
147 jgs 110 \param functionSpaceType Input - The function space type.
148 jgs 82 */
149 woo409 757 ESCRIPT_DLL_API
150 gross 964 virtual int* borrowSampleReferenceIDs(int functionSpaceType) const;
151 jgs 115
152 jgs 110 /**
153     \brief
154     */
155 woo409 757 ESCRIPT_DLL_API
156 jgs 82 virtual int getDim() const;
157 jgs 115
158 jgs 121 /**
159     \brief
160     Return true if given domains are equal.
161     */
162 woo409 757 ESCRIPT_DLL_API
163 jgs 121 virtual bool operator==(const AbstractDomain& other) const;
164 woo409 757 ESCRIPT_DLL_API
165 jgs 121 virtual bool operator!=(const AbstractDomain& other) const;
166    
167 jfenwick 1802 /**
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 jgs 82 protected:
190    
191     private:
192 jfenwick 1802
193 jgs 82 };
194    
195     } // end of namespace
196 jgs 117
197 jgs 82 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26