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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3911 - (show annotations)
Thu Jun 14 01:01:03 2012 UTC (7 years, 4 months ago) by jfenwick
File MIME type: text/plain
File size: 8565 byte(s)
Copyright changes
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
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 DiracDeltaFunctions code
182 */
183 ESCRIPT_DLL_API
184 virtual int getDiracDeltaFunctionsCode() 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,
234 const escript::Data& d_dirac, const escript::Data& y_dirac) const;
235
236 // We do not require this method at this level since the python side checks to ensure it exists
237 // before calling it.
238
239 // /**
240 // \brief
241 // adds a PDE onto the lumped stiffness matrix matrix
242 // */
243 // ESCRIPT_DLL_API
244 // virtual void addPDEToLumpedSystem(
245 // escript::Data& mat,
246 // const escript::Data& D,
247 // const escript::Data& d) const;
248
249 /**
250 \brief
251 adds a PDE onto the stiffness matrix mat and a rhs
252 */
253 ESCRIPT_DLL_API
254 virtual void addPDEToRHS(escript::Data& rhs,
255 const escript::Data& X, const escript::Data& Y,
256 const escript::Data& y, const escript::Data& y_contact, const escript::Data& y_dirac) const;
257 /**
258 \brief
259 adds a PDE onto a transport problem
260 */
261
262 ESCRIPT_DLL_API
263 virtual void addPDEToTransportProblem(
264 AbstractTransportProblem& tp, escript::Data& source,
265 const escript::Data& M,
266 const escript::Data& A, const escript::Data& B, const escript::Data& C,const escript::Data& D,
267 const escript::Data& X,const escript::Data& Y,
268 const escript::Data& d, const escript::Data& y,
269 const escript::Data& d_contact,const escript::Data& y_contact,
270 const escript::Data& d_dirac,const escript::Data& y_dirac) const;
271
272 /**
273 \brief
274 creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros:
275 */
276 ESCRIPT_DLL_API
277 virtual ASM_ptr newSystemMatrix(
278 const int row_blocksize,
279 const escript::FunctionSpace& row_functionspace,
280 const int column_blocksize,
281 const escript::FunctionSpace& column_functionspace,
282 const int type) const;
283 /**
284 \brief
285 creates a TransportProblemAdapter
286
287 */
288
289 ESCRIPT_DLL_API
290 virtual ATP_ptr newTransportProblem(
291 const int blocksize,
292 const escript::FunctionSpace& functionspace,
293 const int type) const;
294
295 /**
296 \brief
297 Return the number of data points summed across all MPI processes
298 */
299 ESCRIPT_DLL_API
300 virtual int getNumDataPointsGlobal() const;
301
302 /**
303 \brief
304 Return the number of data points per sample, and the number of samples as a pair.
305 \param functionSpaceCode Input -
306 */
307 ESCRIPT_DLL_API
308 virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;
309
310 /**
311 \brief
312 assigns new location to the domain
313 */
314 ESCRIPT_DLL_API
315 virtual void setNewX(const escript::Data& arg);
316
317 /**
318 \brief
319 \param full
320 */
321 ESCRIPT_DLL_API
322 virtual void Print_Mesh_Info(const bool full=false) const;
323
324
325 protected:
326
327 private:
328
329 };
330
331 } // end of namespace
332
333 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26