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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3793 - (hide annotations)
Wed Feb 1 07:39:43 2012 UTC (7 years, 8 months ago) by gross
File MIME type: text/plain
File size: 8565 byte(s)
new implementation of FCT solver with some modifications to the python interface
1 elspeth 615
2 ksteube 1312 /*******************************************************
3 ksteube 1811 *
4 jfenwick 2881 * Copyright (c) 2003-2010 by University of Queensland
5 ksteube 1811 * 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 117 #if !defined escript_AbstractContinuousDomain_20040528_H
16 jgs 82 #define escript_AbstractContinuousDomain_20040528_H
17    
18 woo409 757 #include "system_dep.h"
19 jgs 474 #include "AbstractDomain.h"
20 jgs 117
21 jgs 82 #include <string>
22     #include <vector>
23    
24 jfenwick 3259 #include "AbstractSystemMatrix.h"
25     #include "AbstractTransportProblem.h"
26    
27 jgs 82 namespace escript {
28 jgs 117
29 jgs 82 //
30     // Forward declaration
31 jgs 480 class Data;
32 jgs 117
33 jgs 82 /**
34     \brief
35     AbstractContinuousDomain, base class for continuous domains.
36    
37     Description:
38     AbstractContinuousDomain, base class for continuous domains.
39 jgs 117
40 jgs 82 NOTE: Most of the virtual functions would be pure virtual except
41     boost.python requires a non abstract base class.
42     */
43 jgs 117 class AbstractContinuousDomain : public AbstractDomain {
44 jgs 82
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 woo409 757 ESCRIPT_DLL_API
61 jgs 82 AbstractContinuousDomain();
62 jgs 149
63     /**
64 jgs 82 \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 woo409 757 ESCRIPT_DLL_API
77 jgs 82 virtual ~AbstractContinuousDomain();
78 jgs 149
79 jgs 82 /**
80     \brief
81     Returns true if the given integer is a valid function space type
82     for this domain.
83     */
84 woo409 757 ESCRIPT_DLL_API
85 jgs 82 virtual bool isValidFunctionSpaceType(int functionSpaceType) const;
86 jgs 149
87 jgs 82 /**
88     \brief
89     Return a description for this domain
90     */
91 woo409 757 ESCRIPT_DLL_API
92 jgs 82 virtual std::string getDescription() const;
93 jgs 149
94 jgs 82 /**
95     \brief
96     Return a continuous FunctionSpace code
97     */
98 woo409 757 ESCRIPT_DLL_API
99 jgs 82 virtual int getContinuousFunctionCode() const;
100 jgs 149
101 jgs 82 /**
102     \brief
103 gross 1062 Return a continuous on reduced order FunctionSpace code
104     */
105     ESCRIPT_DLL_API
106     virtual int getReducedContinuousFunctionCode() const;
107    
108     /**
109     \brief
110 gross 1059 Return a function FunctionSpace code
111 jgs 82 */
112 woo409 757 ESCRIPT_DLL_API
113 jgs 82 virtual int getFunctionCode() const;
114 jgs 149
115 jgs 82 /**
116     \brief
117 gross 1059 Return a function FunctionSpace code with reduced integration order
118     */
119     ESCRIPT_DLL_API
120     virtual int getReducedFunctionCode() const;
121    
122     /**
123     \brief
124 jgs 82 Return a function on boundary FunctionSpace code
125     */
126 woo409 757 ESCRIPT_DLL_API
127 jgs 82 virtual int getFunctionOnBoundaryCode() const;
128 jgs 149
129 jgs 82 /**
130     \brief
131 gross 1059 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 jgs 82 Return a FunctionOnContactZero code
140     */
141 woo409 757 ESCRIPT_DLL_API
142 jgs 82 virtual int getFunctionOnContactZeroCode() const;
143 jgs 149
144 jgs 82 /**
145     \brief
146 gross 1059 Return a FunctionOnContactZero for reduced integration order code
147     */
148     ESCRIPT_DLL_API
149     virtual int getReducedFunctionOnContactZeroCode() const;
150    
151     /**
152     \brief
153 jgs 82 Return a FunctionOnContactOne code
154     */
155 woo409 757 ESCRIPT_DLL_API
156 jgs 82 virtual int getFunctionOnContactOneCode() const;
157 jgs 149
158 jgs 82 /**
159     \brief
160 gross 1059 Return a FunctionOnContactOne for reduced integration order code
161     */
162     ESCRIPT_DLL_API
163     virtual int getReducedFunctionOnContactOneCode() const;
164    
165     /**
166     \brief
167 jgs 82 Return a Solution code
168     */
169 woo409 757 ESCRIPT_DLL_API
170 jgs 82 virtual int getSolutionCode() const;
171 jgs 149
172 jgs 82 /**
173     \brief
174     Return a ReducedSolution code
175     */
176 woo409 757 ESCRIPT_DLL_API
177 jgs 82 virtual int getReducedSolutionCode() const;
178 jgs 149
179 jgs 82 /**
180     \brief
181 gross 3522 Return a DiracDeltaFunctions code
182 jgs 82 */
183 woo409 757 ESCRIPT_DLL_API
184 gross 3522 virtual int getDiracDeltaFunctionsCode() const;
185 jgs 149
186 jgs 102 /**
187     \brief
188 jgs 149 return the identifier of the matrix type to be used for the global
189 jgs 150 stiffness matrix when a particular solver package
190 jgs 102 and symmetric matrix is used.
191     */
192 woo409 757 ESCRIPT_DLL_API
193 gross 1859 virtual int getSystemMatrixTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const;
194 jgs 149
195 jgs 117 /**
196 jgs 82 \brief
197 gross 1859 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 jgs 82 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 woo409 757 ESCRIPT_DLL_API
211 jgs 82 virtual void setToIntegrals(std::vector<double>& integrals,const escript::Data& arg) const;
212 jgs 149
213 jfenwick 3259 // /**
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 jgs 82 /**
224     \brief
225 jfenwick 3259 adds a PDE onto the stiffness matrix mat and a rhs
226 jgs 82 */
227 jfenwick 3259 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 gross 3522 const escript::Data& d_contact, const escript::Data& y_contact,
234     const escript::Data& d_dirac, const escript::Data& y_dirac) const;
235 jgs 82
236 jfenwick 3259 // 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 gross 3522 const escript::Data& y, const escript::Data& y_contact, const escript::Data& y_dirac) const;
257 jfenwick 3259 /**
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 gross 3522 const escript::Data& d_contact,const escript::Data& y_contact,
270     const escript::Data& d_dirac,const escript::Data& y_dirac) const;
271 jfenwick 3259
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 jgs 82 protected:
326    
327     private:
328 jgs 117
329 jgs 82 };
330    
331     } // end of namespace
332 jgs 117
333 jgs 82 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26