/[escript]/branches/diaplayground/escriptcore/src/AbstractContinuousDomain.h
ViewVC logotype

Contents of /branches/diaplayground/escriptcore/src/AbstractContinuousDomain.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5136 - (show annotations)
Tue Sep 9 07:13:55 2014 UTC (4 years, 5 months ago) by caltinay
File MIME type: text/plain
File size: 8089 byte(s)
ripley now supports paso solvers again and returns an appropriate matrix type
id. Changed the getSystemMatrixTypeId() method to take a full SolverBuddy
instance and made some other simplifications.

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26