/[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

trunk/esys2/escript/src/Data/AbstractContinuousDomain.h revision 82 by jgs, Tue Oct 26 06:53:54 2004 UTC trunk/escript/src/AbstractContinuousDomain.h revision 3522 by gross, Tue May 24 00:57:58 2011 UTC
# Line 1  Line 1 
1  /*  
2   ******************************************************************************  /*******************************************************
3   *                                                                            *  *
4   *       COPYRIGHT  ACcESS 2004 -  All Rights Reserved                        *  * Copyright (c) 2003-2010 by University of Queensland
5   *                                                                            *  * Earth Systems Science Computational Center (ESSCC)
6   * This software is the property of ACcESS. No part of this code              *  * http://www.uq.edu.au/esscc
7   * may be copied in any form or by any means without the expressed written    *  *
8   * consent of ACcESS.  Copying, use or modification of this software          *  * Primary Business: Queensland, Australia
9   * by any unauthorised person is illegal unless that person has a software    *  * Licensed under the Open Software License version 3.0
10   * license agreement with ACcESS.                                             *  * http://www.opensource.org/licenses/osl-3.0.php
11   *                                                                            *  *
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 "escript/Data/AbstractDomain.h"  #include "system_dep.h"
19  #include "escript/Data/AbstractSystemMatrix.h"  #include "AbstractDomain.h"
 #include "escript/Data/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
35     AbstractContinuousDomain, base class for continuous domains.     AbstractContinuousDomain, base class for continuous domains.
36    
37     Description:     Description:
38     AbstractContinuousDomain, base class for continuous domains.     AbstractContinuousDomain, base class for continuous domains.
39    
40     NOTE: Most of the virtual functions would be pure virtual except     NOTE: Most of the virtual functions would be pure virtual except
41     boost.python requires a non abstract base class.     boost.python requires a non abstract base class.
42  */  */
43  class AbstractContinuousDomain:public AbstractDomain {  class AbstractContinuousDomain : public AbstractDomain {
44    
45   public:   public:
46    
# Line 54  class AbstractContinuousDomain:public Ab Line 57  class AbstractContinuousDomain:public Ab
57       Throws:       Throws:
58       Describe any exceptions thrown       Describe any exceptions thrown
59    */    */
60      ESCRIPT_DLL_API
61    AbstractContinuousDomain();    AbstractContinuousDomain();
62   /**  
63      /**
64       \brief       \brief
65       Destructor for AbstractContinuousDomain       Destructor for AbstractContinuousDomain
66    
# Line 68  class AbstractContinuousDomain:public Ab Line 73  class AbstractContinuousDomain:public Ab
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 75  class AbstractContinuousDomain:public Ab Line 81  class AbstractContinuousDomain:public Ab
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
103         Return a continuous on reduced order FunctionSpace code
104      */
105      ESCRIPT_DLL_API
106      virtual int getReducedContinuousFunctionCode() const;
107    
108    /**    /**
109       \brief       \brief
110       Return a functon FunctionSpace code       Return a function FunctionSpace code
111    */    */
112      ESCRIPT_DLL_API
113    virtual int getFunctionCode() const;    virtual int getFunctionCode() const;
114    
115      /**
116         \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       \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
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       \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
146         Return a FunctionOnContactZero for reduced integration order code
147      */
148      ESCRIPT_DLL_API
149      virtual int getReducedFunctionOnContactZeroCode() const;
150    
151    /**    /**
152       \brief       \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
160         Return a FunctionOnContactOne for reduced integration order code
161      */
162      ESCRIPT_DLL_API
163      virtual int getReducedFunctionOnContactOneCode() const;
164    
165    /**    /**
166       \brief       \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 DiracDeltaFunctions code
182    */    */
183    virtual int getDiracDeltaFunctionCode() const;    ESCRIPT_DLL_API
184      virtual int getDiracDeltaFunctionsCode() const;
185    
186     /**    /**
187         \brief
188         return the identifier of the matrix type to be used for the global
189         stiffness matrix when a particular solver package
190         and symmetric matrix is used.
191      */
192      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
206       copies the integrals of the function defined by arg into integrals.       copies the integrals of the function defined by arg into integrals.
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       \brief
225       Return the domain as const AbstractContinuousDomain&       adds a PDE onto the stiffness matrix mat and a rhs
226    */    */
227    static const  AbstractContinuousDomain& asAbstractContinuousDomain(const AbstractDomain& domain);    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,
234                         const escript::Data& d_dirac, const escript::Data& y_dirac) const;
235    
236    // 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                         const escript::Data& y, const escript::Data& y_contact, const escript::Data& y_dirac) const;
257      /**
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                         const escript::Data& d_contact,const escript::Data& y_contact,
270                         const escript::Data& d_dirac,const escript::Data& y_dirac) const;
271    
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 bool useBackwardEuler,
292                          const int blocksize,
293                          const escript::FunctionSpace& functionspace,
294                          const int type) const;
295    
296      /**
297         \brief
298         Return the number of data points summed across all MPI processes
299      */
300      ESCRIPT_DLL_API
301      virtual int getNumDataPointsGlobal() const;
302    
303      /**
304         \brief
305         Return the number of data points per sample, and the number of samples as a pair.
306         \param functionSpaceCode Input -
307      */
308      ESCRIPT_DLL_API
309      virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;
310    
311      /**
312         \brief
313         assigns new location to the domain
314      */
315      ESCRIPT_DLL_API
316      virtual void setNewX(const escript::Data& arg);
317    
318      /**
319         \brief
320         \param full
321      */
322      ESCRIPT_DLL_API
323      virtual void Print_Mesh_Info(const bool full=false) const;
324    
325    
326   protected:   protected:
327    
328   private:   private:
329    
330  };  };
331    
332  } // end of namespace  } // end of namespace
333    
334  #endif  #endif

Legend:
Removed from v.82  
changed lines
  Added in v.3522

  ViewVC Help
Powered by ViewVC 1.1.26