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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26