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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3981 - (hide annotations)
Fri Sep 21 02:47:54 2012 UTC (7 years ago) by jfenwick
File MIME type: text/plain
File size: 8684 byte(s)
First pass of updating copyright notices
1 elspeth 615
2 jfenwick 3981 /*****************************************************************************
3 ksteube 1811 *
4 jfenwick 3911 * Copyright (c) 2003-2012 by University of Queensland
5 jfenwick 3981 * http://www.uq.edu.au
6 ksteube 1811 *
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 jfenwick 3981 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12     * Development since 2012 by School of Earth Sciences
13     *
14     *****************************************************************************/
15 ksteube 1312
16 ksteube 1811
17 jgs 117 #if !defined escript_AbstractContinuousDomain_20040528_H
18 jgs 82 #define escript_AbstractContinuousDomain_20040528_H
19    
20 woo409 757 #include "system_dep.h"
21 jgs 474 #include "AbstractDomain.h"
22 jgs 117
23 jgs 82 #include <string>
24     #include <vector>
25    
26 jfenwick 3259 #include "AbstractSystemMatrix.h"
27     #include "AbstractTransportProblem.h"
28    
29 jgs 82 namespace escript {
30 jgs 117
31 jgs 82 //
32     // Forward declaration
33 jgs 480 class Data;
34 jgs 117
35 jgs 82 /**
36     \brief
37     AbstractContinuousDomain, base class for continuous domains.
38    
39     Description:
40     AbstractContinuousDomain, base class for continuous domains.
41 jgs 117
42 jgs 82 NOTE: Most of the virtual functions would be pure virtual except
43     boost.python requires a non abstract base class.
44     */
45 jgs 117 class AbstractContinuousDomain : public AbstractDomain {
46 jgs 82
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 woo409 757 ESCRIPT_DLL_API
63 jgs 82 AbstractContinuousDomain();
64 jgs 149
65     /**
66 jgs 82 \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 woo409 757 ESCRIPT_DLL_API
79 jgs 82 virtual ~AbstractContinuousDomain();
80 jgs 149
81 jgs 82 /**
82     \brief
83     Returns true if the given integer is a valid function space type
84     for this domain.
85     */
86 woo409 757 ESCRIPT_DLL_API
87 jgs 82 virtual bool isValidFunctionSpaceType(int functionSpaceType) const;
88 jgs 149
89 jgs 82 /**
90     \brief
91     Return a description for this domain
92     */
93 woo409 757 ESCRIPT_DLL_API
94 jgs 82 virtual std::string getDescription() const;
95 jgs 149
96 jgs 82 /**
97     \brief
98     Return a continuous FunctionSpace code
99     */
100 woo409 757 ESCRIPT_DLL_API
101 jgs 82 virtual int getContinuousFunctionCode() const;
102 jgs 149
103 jgs 82 /**
104     \brief
105 gross 1062 Return a continuous on reduced order FunctionSpace code
106     */
107     ESCRIPT_DLL_API
108     virtual int getReducedContinuousFunctionCode() const;
109    
110     /**
111     \brief
112 gross 1059 Return a function FunctionSpace code
113 jgs 82 */
114 woo409 757 ESCRIPT_DLL_API
115 jgs 82 virtual int getFunctionCode() const;
116 jgs 149
117 jgs 82 /**
118     \brief
119 gross 1059 Return a function FunctionSpace code with reduced integration order
120     */
121     ESCRIPT_DLL_API
122     virtual int getReducedFunctionCode() const;
123    
124     /**
125     \brief
126 jgs 82 Return a function on boundary FunctionSpace code
127     */
128 woo409 757 ESCRIPT_DLL_API
129 jgs 82 virtual int getFunctionOnBoundaryCode() const;
130 jgs 149
131 jgs 82 /**
132     \brief
133 gross 1059 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 jgs 82 Return a FunctionOnContactZero code
142     */
143 woo409 757 ESCRIPT_DLL_API
144 jgs 82 virtual int getFunctionOnContactZeroCode() const;
145 jgs 149
146 jgs 82 /**
147     \brief
148 gross 1059 Return a FunctionOnContactZero for reduced integration order code
149     */
150     ESCRIPT_DLL_API
151     virtual int getReducedFunctionOnContactZeroCode() const;
152    
153     /**
154     \brief
155 jgs 82 Return a FunctionOnContactOne code
156     */
157 woo409 757 ESCRIPT_DLL_API
158 jgs 82 virtual int getFunctionOnContactOneCode() const;
159 jgs 149
160 jgs 82 /**
161     \brief
162 gross 1059 Return a FunctionOnContactOne for reduced integration order code
163     */
164     ESCRIPT_DLL_API
165     virtual int getReducedFunctionOnContactOneCode() const;
166    
167     /**
168     \brief
169 jgs 82 Return a Solution code
170     */
171 woo409 757 ESCRIPT_DLL_API
172 jgs 82 virtual int getSolutionCode() const;
173 jgs 149
174 jgs 82 /**
175     \brief
176     Return a ReducedSolution code
177     */
178 woo409 757 ESCRIPT_DLL_API
179 jgs 82 virtual int getReducedSolutionCode() const;
180 jgs 149
181 jgs 82 /**
182     \brief
183 gross 3522 Return a DiracDeltaFunctions code
184 jgs 82 */
185 woo409 757 ESCRIPT_DLL_API
186 gross 3522 virtual int getDiracDeltaFunctionsCode() const;
187 jgs 149
188 jgs 102 /**
189     \brief
190 jgs 149 return the identifier of the matrix type to be used for the global
191 jgs 150 stiffness matrix when a particular solver package
192 jgs 102 and symmetric matrix is used.
193     */
194 woo409 757 ESCRIPT_DLL_API
195 gross 1859 virtual int getSystemMatrixTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const;
196 jgs 149
197 jgs 117 /**
198 jgs 82 \brief
199 gross 1859 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 jgs 82 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 woo409 757 ESCRIPT_DLL_API
213 jgs 82 virtual void setToIntegrals(std::vector<double>& integrals,const escript::Data& arg) const;
214 jgs 149
215 jfenwick 3259 // /**
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 jgs 82 /**
226     \brief
227 jfenwick 3259 adds a PDE onto the stiffness matrix mat and a rhs
228 jgs 82 */
229 jfenwick 3259 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 gross 3522 const escript::Data& d_contact, const escript::Data& y_contact,
236     const escript::Data& d_dirac, const escript::Data& y_dirac) const;
237 jgs 82
238 jfenwick 3259 // 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 gross 3522 const escript::Data& y, const escript::Data& y_contact, const escript::Data& y_dirac) const;
259 jfenwick 3259 /**
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 gross 3522 const escript::Data& d_contact,const escript::Data& y_contact,
272     const escript::Data& d_dirac,const escript::Data& y_dirac) const;
273 jfenwick 3259
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 jgs 82 protected:
328    
329     private:
330 jgs 117
331 jgs 82 };
332    
333     } // end of namespace
334 jgs 117
335 jgs 82 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26