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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3259 - (show annotations)
Mon Oct 11 01:48:14 2010 UTC (8 years, 10 months ago) by jfenwick
File MIME type: text/plain
File size: 8422 byte(s)
Merging dudley and scons updates from branches

1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2010 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_AbstractContinuousDomain_20040528_H
16 #define escript_AbstractContinuousDomain_20040528_H
17
18 #include "system_dep.h"
19 #include "AbstractDomain.h"
20
21 #include <string>
22 #include <vector>
23
24 #include "AbstractSystemMatrix.h"
25 #include "AbstractTransportProblem.h"
26
27 namespace escript {
28
29 //
30 // Forward declaration
31 class Data;
32
33 /**
34 \brief
35 AbstractContinuousDomain, base class for continuous domains.
36
37 Description:
38 AbstractContinuousDomain, base class for continuous domains.
39
40 NOTE: Most of the virtual functions would be pure virtual except
41 boost.python requires a non abstract base class.
42 */
43 class AbstractContinuousDomain : public AbstractDomain {
44
45 public:
46
47 /**
48 \brief
49 Default constructor for AbstractContinuousDomain
50
51 Description:
52 Default constructor for AbstractContinuousDomain
53
54 Preconditions:
55 Describe any preconditions
56
57 Throws:
58 Describe any exceptions thrown
59 */
60 ESCRIPT_DLL_API
61 AbstractContinuousDomain();
62
63 /**
64 \brief
65 Destructor for AbstractContinuousDomain
66
67 Description:
68 Destructor for AbstractContinuousDomain
69
70 Preconditions:
71 Describe any preconditions
72
73 Throws:
74 Describe any exceptions thrown
75 */
76 ESCRIPT_DLL_API
77 virtual ~AbstractContinuousDomain();
78
79 /**
80 \brief
81 Returns true if the given integer is a valid function space type
82 for this domain.
83 */
84 ESCRIPT_DLL_API
85 virtual bool isValidFunctionSpaceType(int functionSpaceType) const;
86
87 /**
88 \brief
89 Return a description for this domain
90 */
91 ESCRIPT_DLL_API
92 virtual std::string getDescription() const;
93
94 /**
95 \brief
96 Return a continuous FunctionSpace code
97 */
98 ESCRIPT_DLL_API
99 virtual int getContinuousFunctionCode() const;
100
101 /**
102 \brief
103 Return a continuous on reduced order FunctionSpace code
104 */
105 ESCRIPT_DLL_API
106 virtual int getReducedContinuousFunctionCode() const;
107
108 /**
109 \brief
110 Return a function FunctionSpace code
111 */
112 ESCRIPT_DLL_API
113 virtual int getFunctionCode() const;
114
115 /**
116 \brief
117 Return a function FunctionSpace code with reduced integration order
118 */
119 ESCRIPT_DLL_API
120 virtual int getReducedFunctionCode() const;
121
122 /**
123 \brief
124 Return a function on boundary FunctionSpace code
125 */
126 ESCRIPT_DLL_API
127 virtual int getFunctionOnBoundaryCode() const;
128
129 /**
130 \brief
131 Return a code for a function on boundary FunctionSpace with reduced integration order
132 */
133 ESCRIPT_DLL_API
134 virtual int getReducedFunctionOnBoundaryCode() const;
135
136
137 /**
138 \brief
139 Return a FunctionOnContactZero code
140 */
141 ESCRIPT_DLL_API
142 virtual int getFunctionOnContactZeroCode() const;
143
144 /**
145 \brief
146 Return a FunctionOnContactZero for reduced integration order code
147 */
148 ESCRIPT_DLL_API
149 virtual int getReducedFunctionOnContactZeroCode() const;
150
151 /**
152 \brief
153 Return a FunctionOnContactOne code
154 */
155 ESCRIPT_DLL_API
156 virtual int getFunctionOnContactOneCode() const;
157
158 /**
159 \brief
160 Return a FunctionOnContactOne for reduced integration order code
161 */
162 ESCRIPT_DLL_API
163 virtual int getReducedFunctionOnContactOneCode() const;
164
165 /**
166 \brief
167 Return a Solution code
168 */
169 ESCRIPT_DLL_API
170 virtual int getSolutionCode() const;
171
172 /**
173 \brief
174 Return a ReducedSolution code
175 */
176 ESCRIPT_DLL_API
177 virtual int getReducedSolutionCode() const;
178
179 /**
180 \brief
181 Return a DiracDeltaFunction code
182 */
183 ESCRIPT_DLL_API
184 virtual int getDiracDeltaFunctionCode() const;
185
186 /**
187 \brief
188 return the identifier of the matrix type to be used for the global
189 stiffness matrix when a particular solver package
190 and symmetric matrix is used.
191 */
192 ESCRIPT_DLL_API
193 virtual int getSystemMatrixTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const;
194
195 /**
196 \brief
197 return the identifier of the matrix type to be used for the global
198 stiffness matrix when a particular solver package
199 and symmetric matrix is used.
200 */
201 ESCRIPT_DLL_API
202 virtual int getTransportTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const;
203
204 /**
205 \brief
206 copies the integrals of the function defined by arg into integrals.
207 arg has to be defined on this.
208 has to be implemented by the Domain Adapter.
209 */
210 ESCRIPT_DLL_API
211 virtual void setToIntegrals(std::vector<double>& integrals,const escript::Data& arg) const;
212
213 // /**
214 // \brief
215 // Return the domain as const AbstractContinuousDomain&
216 // */
217 // ESCRIPT_DLL_API
218 // static const AbstractContinuousDomain& asAbstractContinuousDomain(const AbstractDomain& domain);
219
220
221
222
223 /**
224 \brief
225 adds a PDE onto the stiffness matrix mat and a rhs
226 */
227 ESCRIPT_DLL_API
228 virtual void addPDEToSystem(
229 AbstractSystemMatrix& mat, escript::Data& rhs,
230 const escript::Data& A, const escript::Data& B, const escript::Data& C,
231 const escript::Data& D, const escript::Data& X, const escript::Data& Y,
232 const escript::Data& d, const escript::Data& y,
233 const escript::Data& d_contact, const escript::Data& y_contact) const;
234
235 // We do not require this method at this level since the python side checks to ensure it exists
236 // before calling it.
237
238 // /**
239 // \brief
240 // adds a PDE onto the lumped stiffness matrix matrix
241 // */
242 // ESCRIPT_DLL_API
243 // virtual void addPDEToLumpedSystem(
244 // escript::Data& mat,
245 // const escript::Data& D,
246 // const escript::Data& d) const;
247
248 /**
249 \brief
250 adds a PDE onto the stiffness matrix mat and a rhs
251 */
252 ESCRIPT_DLL_API
253 virtual void addPDEToRHS(escript::Data& rhs,
254 const escript::Data& X, const escript::Data& Y,
255 const escript::Data& y, const escript::Data& y_contact) const;
256 /**
257 \brief
258 adds a PDE onto a transport problem
259 */
260
261 ESCRIPT_DLL_API
262 virtual void addPDEToTransportProblem(
263 AbstractTransportProblem& tp, escript::Data& source,
264 const escript::Data& M,
265 const escript::Data& A, const escript::Data& B, const escript::Data& C,const escript::Data& D,
266 const escript::Data& X,const escript::Data& Y,
267 const escript::Data& d, const escript::Data& y,
268 const escript::Data& d_contact,const escript::Data& y_contact) const;
269
270 /**
271 \brief
272 creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros:
273 */
274 ESCRIPT_DLL_API
275 virtual ASM_ptr newSystemMatrix(
276 const int row_blocksize,
277 const escript::FunctionSpace& row_functionspace,
278 const int column_blocksize,
279 const escript::FunctionSpace& column_functionspace,
280 const int type) const;
281 /**
282 \brief
283 creates a TransportProblemAdapter
284
285 */
286
287 ESCRIPT_DLL_API
288 virtual ATP_ptr newTransportProblem(
289 const bool useBackwardEuler,
290 const int blocksize,
291 const escript::FunctionSpace& functionspace,
292 const int type) const;
293
294 /**
295 \brief
296 Return the number of data points summed across all MPI processes
297 */
298 ESCRIPT_DLL_API
299 virtual int getNumDataPointsGlobal() const;
300
301 /**
302 \brief
303 Return the number of data points per sample, and the number of samples as a pair.
304 \param functionSpaceCode Input -
305 */
306 ESCRIPT_DLL_API
307 virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;
308
309 /**
310 \brief
311 assigns new location to the domain
312 */
313 ESCRIPT_DLL_API
314 virtual void setNewX(const escript::Data& arg);
315
316 /**
317 \brief
318 \param full
319 */
320 ESCRIPT_DLL_API
321 virtual void Print_Mesh_Info(const bool full=false) const;
322
323
324 protected:
325
326 private:
327
328 };
329
330 } // end of namespace
331
332 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26