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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 474 by jgs, Mon Jan 30 04:23:44 2006 UTC revision 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC
# Line 1  Line 1 
1  //$Id$  
2  /*  /*******************************************************
3   ******************************************************************************  *
4   *                                                                            *  * Copyright (c) 2003-2010 by University of Queensland
5   *       COPYRIGHT  ACcESS 2004 -  All Rights Reserved                        *  * Earth Systems Science Computational Center (ESSCC)
6   *                                                                            *  * http://www.uq.edu.au/esscc
7   * This software is the property of ACcESS. No part of this code              *  *
8   * may be copied in any form or by any means without the expressed written    *  * Primary Business: Queensland, Australia
9   * consent of ACcESS.  Copying, use or modification of this software          *  * Licensed under the Open Software License version 3.0
10   * by any unauthorised person is illegal unless that person has a software    *  * http://www.opensource.org/licenses/osl-3.0.php
11   * license agreement with ACcESS.                                             *  *
12   *                                                                            *  *******************************************************/
13   ******************************************************************************  
 */  
14    
15  #if !defined escript_AbstractContinuousDomain_20040528_H  #if !defined escript_AbstractContinuousDomain_20040528_H
16  #define escript_AbstractContinuousDomain_20040528_H  #define escript_AbstractContinuousDomain_20040528_H
17    
18    #include "system_dep.h"
19  #include "AbstractDomain.h"  #include "AbstractDomain.h"
 #include "AbstractSystemMatrix.h"  
 #include "Data.h"  
   
 #include <boost/python/tuple.hpp>  
 #include <boost/python/object.hpp>  
20    
21  #include <string>  #include <string>
22  #include <vector>  #include <vector>
23    
24    #include "AbstractSystemMatrix.h"
25    #include "AbstractTransportProblem.h"
26    
27  namespace escript {  namespace escript {
28    
29  //  //
30  // Forward declaration  // Forward declaration
31  class FunctionSpace;  class Data;
32    
33  /**  /**
34     \brief     \brief
# Line 59  class AbstractContinuousDomain : public Line 57  class AbstractContinuousDomain : public
57       Throws:       Throws:
58       Describe any exceptions thrown       Describe any exceptions thrown
59    */    */
60      ESCRIPT_DLL_API
61    AbstractContinuousDomain();    AbstractContinuousDomain();
62    
63    /**    /**
# Line 74  class AbstractContinuousDomain : public Line 73  class AbstractContinuousDomain : public
73       Throws:       Throws:
74       Describe any exceptions thrown       Describe any exceptions thrown
75    */    */
76      ESCRIPT_DLL_API
77    virtual ~AbstractContinuousDomain();    virtual ~AbstractContinuousDomain();
78    
79    /**    /**
# Line 81  class AbstractContinuousDomain : public Line 81  class AbstractContinuousDomain : public
81       Returns true if the given integer is a valid function space type       Returns true if the given integer is a valid function space type
82       for this domain.       for this domain.
83    */    */
84      ESCRIPT_DLL_API
85    virtual bool isValidFunctionSpaceType(int functionSpaceType) const;    virtual bool isValidFunctionSpaceType(int functionSpaceType) const;
86    
87    /**    /**
88       \brief       \brief
89       Return a description for this domain       Return a description for this domain
90    */    */
91      ESCRIPT_DLL_API
92    virtual std::string getDescription() const;    virtual std::string getDescription() const;
93    
94    /**    /**
95       \brief       \brief
96       Return a continuous FunctionSpace code       Return a continuous FunctionSpace code
97    */    */
98      ESCRIPT_DLL_API
99    virtual int getContinuousFunctionCode() const;    virtual int getContinuousFunctionCode() const;
100    
101    /**    /**
102       \brief       \brief
103       Return a functon FunctionSpace code       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;    virtual int getFunctionCode() const;
114    
115    /**    /**
116       \brief       \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       Return a function on boundary FunctionSpace code
125    */    */
126      ESCRIPT_DLL_API
127    virtual int getFunctionOnBoundaryCode() const;    virtual int getFunctionOnBoundaryCode() const;
128    
129    /**    /**
130       \brief       \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       Return a FunctionOnContactZero code
140    */    */
141      ESCRIPT_DLL_API
142    virtual int getFunctionOnContactZeroCode() const;    virtual int getFunctionOnContactZeroCode() const;
143    
144    /**    /**
145       \brief       \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       Return a FunctionOnContactOne code
154    */    */
155      ESCRIPT_DLL_API
156    virtual int getFunctionOnContactOneCode() const;    virtual int getFunctionOnContactOneCode() const;
157    
158    /**    /**
159       \brief       \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       Return a Solution code
168    */    */
169      ESCRIPT_DLL_API
170    virtual int getSolutionCode() const;    virtual int getSolutionCode() const;
171    
172    /**    /**
173       \brief       \brief
174       Return a ReducedSolution code       Return a ReducedSolution code
175    */    */
176      ESCRIPT_DLL_API
177    virtual int getReducedSolutionCode() const;    virtual int getReducedSolutionCode() const;
178    
179    /**    /**
180       \brief       \brief
181       Return a DiracDeltaFunction code       Return a DiracDeltaFunction code
182    */    */
183      ESCRIPT_DLL_API
184    virtual int getDiracDeltaFunctionCode() const;    virtual int getDiracDeltaFunctionCode() const;
185    
186    /**    /**
# Line 143  class AbstractContinuousDomain : public Line 189  class AbstractContinuousDomain : public
189       stiffness matrix when a particular solver package       stiffness matrix when a particular solver package
190       and symmetric matrix is used.       and symmetric matrix is used.
191    */    */
192    virtual int getSystemMatrixTypeId(const int solver, const int package, const bool symmetry) const;    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       \brief
# Line 151  class AbstractContinuousDomain : public Line 207  class AbstractContinuousDomain : public
207       arg has to be defined on this.       arg has to be defined on this.
208       has to be implemented by the Domain Adapter.       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;    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) const;
234    
235    // We do not require this method at this level since the python side checks to ensure it exists
236    // before calling it.
237    
238    //  /**
239    //     \brief
240    //     adds a PDE onto the lumped stiffness matrix matrix
241    //  */
242    //  ESCRIPT_DLL_API
243    //  virtual void addPDEToLumpedSystem(
244    //                     escript::Data& mat,
245    //                     const escript::Data& D,
246    //                     const escript::Data& d) const;
247    
248    /**    /**
249       \brief       \brief
250       Return the domain as const AbstractContinuousDomain&       adds a PDE onto the stiffness matrix mat and a rhs
251      */
252      ESCRIPT_DLL_API
253      virtual void addPDEToRHS(escript::Data& rhs,
254                         const escript::Data& X, const escript::Data& Y,
255                         const escript::Data& y, const escript::Data& y_contact) const;
256      /**
257         \brief
258         adds a PDE onto a transport problem
259      */
260    
261      ESCRIPT_DLL_API
262      virtual void addPDEToTransportProblem(
263                         AbstractTransportProblem& tp, escript::Data& source,
264                         const escript::Data& M,
265                         const escript::Data& A, const escript::Data& B, const escript::Data& C,const  escript::Data& D,
266                         const  escript::Data& X,const  escript::Data& Y,
267                         const escript::Data& d, const escript::Data& y,
268                         const escript::Data& d_contact,const escript::Data& y_contact) const;
269    
270      /**
271         \brief
272        creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros:
273      */
274      ESCRIPT_DLL_API
275      virtual ASM_ptr newSystemMatrix(
276                          const int row_blocksize,
277                          const escript::FunctionSpace& row_functionspace,
278                          const int column_blocksize,
279                          const escript::FunctionSpace& column_functionspace,
280                          const int type) const;
281      /**
282       \brief
283        creates a TransportProblemAdapter
284    
285    */    */
286    static const  AbstractContinuousDomain& asAbstractContinuousDomain(const AbstractDomain& domain);  
287      ESCRIPT_DLL_API
288      virtual ATP_ptr newTransportProblem(
289                          const bool useBackwardEuler,
290                          const int blocksize,
291                          const escript::FunctionSpace& functionspace,
292                          const int type) const;
293    
294      /**
295         \brief
296         Return the number of data points summed across all MPI processes
297      */
298      ESCRIPT_DLL_API
299      virtual int getNumDataPointsGlobal() const;
300    
301      /**
302         \brief
303         Return the number of data points per sample, and the number of samples as a pair.
304         \param functionSpaceCode Input -
305      */
306      ESCRIPT_DLL_API
307      virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;
308    
309      /**
310         \brief
311         assigns new location to the domain
312      */
313      ESCRIPT_DLL_API
314      virtual void setNewX(const escript::Data& arg);
315    
316      /**
317         \brief
318         \param full
319      */
320      ESCRIPT_DLL_API
321      virtual void Print_Mesh_Info(const bool full=false) const;
322    
323    
324   protected:   protected:
325    

Legend:
Removed from v.474  
changed lines
  Added in v.3259

  ViewVC Help
Powered by ViewVC 1.1.26