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

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

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

trunk/esys2/escript/src/Data/AbstractDomain.h revision 149 by jgs, Thu Sep 1 03:31:39 2005 UTC trunk/escript/src/AbstractDomain.h revision 757 by woo409, Mon Jun 26 13:12:56 2006 UTC
# Line 1  Line 1 
1  // $Id$  // $Id$
2  /*  /*
3   ******************************************************************************   ************************************************************
4   *                                                                            *   *          Copyright 2006 by ACcESS MNRF                   *
5   *       COPYRIGHT  ACcESS 2004 -  All Rights Reserved                        *   *                                                          *
6   *                                                                            *   *              http://www.access.edu.au                    *
7   * This software is the property of ACcESS. No part of this code              *   *       Primary Business: Queensland, Australia            *
8   * may be copied in any form or by any means without the expressed written    *   *  Licensed under the Open Software License version 3.0    *
9   * consent of ACcESS.  Copying, use or modification of this software          *   *     http://www.opensource.org/licenses/osl-3.0.php       *
10   * by any unauthorised person is illegal unless that person has a software    *   *                                                          *
11   * license agreement with ACcESS.                                             *   ************************************************************
12   *                                                                            *  
  ******************************************************************************  
13  */  */
14    
15  #if !defined escript_AbstractDomain_20040609_H  #if !defined escript_AbstractDomain_20040609_H
16  #define escript_AbstractDomain_20040609_H  #define escript_AbstractDomain_20040609_H
17    
18    #include "system_dep.h"
19    
20  #include <string>  #include <string>
21  #include <utility>  #include <boost/python/dict.hpp>
22    
23  namespace escript {  namespace escript {
24    
25  //  //
26  // forward declarations  // forward declarations
27  class Data;  class Data;
28  class AbstractSystemMatrix;  //class AbstractSystemMatrix;
29  class FunctionSpace;  //class FunctionSpace;
30    
31  /**  /**
32     \brief     \brief
# Line 59  class AbstractDomain { Line 60  class AbstractDomain {
60       Throws:       Throws:
61       Describe any exceptions thrown.       Describe any exceptions thrown.
62    */    */
63      ESCRIPT_DLL_API
64    AbstractDomain();    AbstractDomain();
65    
66    /**    /**
# Line 68  class AbstractDomain { Line 70  class AbstractDomain {
70       Description:       Description:
71       Destructor for AbstractDomain.       Destructor for AbstractDomain.
72    */    */
73      ESCRIPT_DLL_API
74    virtual ~AbstractDomain();    virtual ~AbstractDomain();
75    
76    /**    /**
# Line 75  class AbstractDomain { Line 78  class AbstractDomain {
78       Returns true if the given integer is a valid function space type       Returns true if the given integer is a valid function space type
79       for this domain.       for this domain.
80    */    */
81      ESCRIPT_DLL_API
82    virtual bool isValidFunctionSpaceType(int functionSpaceType) const;    virtual bool isValidFunctionSpaceType(int functionSpaceType) const;
83    
84    /**    /**
85       \brief       \brief
86       Return a description for this domain.       Return a description for this domain.
87    */    */
88      ESCRIPT_DLL_API
89    virtual std::string getDescription() const;    virtual std::string getDescription() const;
90    
91    /**    /**
92       \brief       \brief
93       Return a description for the given function space type code.       Return a description for the given function space type code.
94    */    */
95      ESCRIPT_DLL_API
96    virtual std::string functionSpaceTypeAsString(int functionSpaceType) const;    virtual std::string functionSpaceTypeAsString(int functionSpaceType) const;
97    
98    /**    /**
# Line 95  class AbstractDomain { Line 101  class AbstractDomain {
101    
102        This has to be implemented by the actual Domain adapter.        This has to be implemented by the actual Domain adapter.
103    */    */
104      ESCRIPT_DLL_API
105    virtual int getDim() const;    virtual int getDim() const;
106    
107    /**    /**
108       \brief       \brief
109       Return true if given domains are equal.       Return true if given domains are equal.
110    */    */
111      ESCRIPT_DLL_API
112    virtual bool operator==(const AbstractDomain& other) const;    virtual bool operator==(const AbstractDomain& other) const;
113      ESCRIPT_DLL_API
114    virtual bool operator!=(const AbstractDomain& other) const;    virtual bool operator!=(const AbstractDomain& other) const;
115    
116    /**    /**
# Line 110  class AbstractDomain { Line 119  class AbstractDomain {
119    
120       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
121    */    */
122      ESCRIPT_DLL_API
123    virtual void write(const std::string& filename) const;    virtual void write(const std::string& filename) const;
124    
125    /**    /**
126       \brief       \brief
      Sets the tagList pointer and length of tag list numTags.  
   */  
   virtual void getTagList(int functionSpaceType, int** tagList, int* numTags) const;  
   
   /**  
      \brief  
      Sets the referenceNoList pointer and length of tag list numReferenceNo.  
   */  
   virtual void getReferenceNoList(int functionSpaceType, int** referenceNoList, int* numReferenceNo) const;  
   
   /**  
      \brief  
127       Return the number of data points per sample, and the number of samples as a pair.       Return the number of data points per sample, and the number of samples as a pair.
128    
129       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
# Line 133  class AbstractDomain { Line 131  class AbstractDomain {
131       \param functionSpaceCode Input - Code for the function space type.       \param functionSpaceCode Input - Code for the function space type.
132       \return pair, first - number of data points per sample, second - number of samples       \return pair, first - number of data points per sample, second - number of samples
133    */    */
134      ESCRIPT_DLL_API
135    virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;    virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;
136    
137    /**    /**
# Line 141  class AbstractDomain { Line 140  class AbstractDomain {
140       \param functionSpaceType Input - The function space type.       \param functionSpaceType Input - The function space type.
141       \param sampleNo Input - The sample number.       \param sampleNo Input - The sample number.
142    */    */
143      ESCRIPT_DLL_API
144    virtual int getTagFromSampleNo(int functionSpaceType, int sampleNo) const;    virtual int getTagFromSampleNo(int functionSpaceType, int sampleNo) const;
145    
146    /**    /**
# Line 149  class AbstractDomain { Line 149  class AbstractDomain {
149       \param functionSpaceType Input - The function space type.       \param functionSpaceType Input - The function space type.
150       \param sampleNo Input - The sample number.       \param sampleNo Input - The sample number.
151    */    */
152      ESCRIPT_DLL_API
153    virtual int getReferenceNoFromSampleNo(int functionSpaceType, int sampleNo) const;    virtual int getReferenceNoFromSampleNo(int functionSpaceType, int sampleNo) const;
154    
155    /**    /**
# Line 157  class AbstractDomain { Line 158  class AbstractDomain {
158    
159       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
160    */    */
161      ESCRIPT_DLL_API
162    virtual void setNewX(const escript::Data& arg);    virtual void setNewX(const escript::Data& arg);
163    
164    /**    /**
# Line 165  class AbstractDomain { Line 167  class AbstractDomain {
167    
168       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
169    */    */
170      ESCRIPT_DLL_API
171    virtual void interpolateOnDomain(escript::Data& target,const escript::Data& source) const;    virtual void interpolateOnDomain(escript::Data& target,const escript::Data& source) const;
172      ESCRIPT_DLL_API
173    virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;    virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;
174    
175    /**    /**
# Line 174  class AbstractDomain { Line 178  class AbstractDomain {
178    
179       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
180    */    */
181      ESCRIPT_DLL_API
182    virtual void interpolateACross(escript::Data& target, const escript::Data& source) const;    virtual void interpolateACross(escript::Data& target, const escript::Data& source) const;
183      ESCRIPT_DLL_API
184    virtual bool probeInterpolationACross(int functionSpaceType_source,const AbstractDomain& targetDomain, int functionSpaceType_target) const;    virtual bool probeInterpolationACross(int functionSpaceType_source,const AbstractDomain& targetDomain, int functionSpaceType_target) const;
185    
186    /**    /**
187       \brief       \brief
188       Returns locations in the domain. The function space is chosen appropriately.       Returns locations in the domain. The function space is chosen appropriately.
189    */    */
190      ESCRIPT_DLL_API
191    virtual escript::Data getX() const;    virtual escript::Data getX() const;
192    
193    /**    /**
194       \brief       \brief
195       Return boundary normals. The function space is chosen appropriately.       Return boundary normals. The function space is chosen appropriately.
196    */    */
197      ESCRIPT_DLL_API
198    virtual escript::Data getNormal() const;    virtual escript::Data getNormal() const;
199    
200    /**    /**
201       \brief       \brief
202       Returns the local size of samples. The function space is chosen appropriately.       Returns the local size of samples. The function space is chosen appropriately.
203    */    */
204      ESCRIPT_DLL_API
205    virtual escript::Data getSize() const;    virtual escript::Data getSize() const;
206        
207    /**    /**
# Line 203  class AbstractDomain { Line 212  class AbstractDomain {
212    
213       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
214    */    */
215      ESCRIPT_DLL_API
216    virtual void setToX(escript::Data& out) const;    virtual void setToX(escript::Data& out) const;
217    
218    /**    /**
# Line 213  class AbstractDomain { Line 223  class AbstractDomain {
223    
224       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
225    */    */
226      ESCRIPT_DLL_API
227    virtual void setToNormal(escript::Data& out) const;    virtual void setToNormal(escript::Data& out) const;
228    
229    /**    /**
# Line 223  class AbstractDomain { Line 234  class AbstractDomain {
234    
235       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
236    */    */
237      ESCRIPT_DLL_API
238    virtual void setToSize(escript::Data& out) const;    virtual void setToSize(escript::Data& out) const;
239    
240    /**    /**
# Line 232  class AbstractDomain { Line 244  class AbstractDomain {
244    
245       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
246    */    */
247      ESCRIPT_DLL_API
248    virtual void setToGradient(escript::Data& grad, const escript::Data& arg) const;    virtual void setToGradient(escript::Data& grad, const escript::Data& arg) const;
   
249    /**    /**
250       \brief       \brief
251       Saves data arg to an OpenDX input file.       Saves a dictonary of Data objects to an OpenDX input file. The keywords are used as identifier
      considered as cell centered data.  
252    
253       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
254    */    */
255    virtual void saveDX(const std::string& filename,const escript::Data& arg) const;    ESCRIPT_DLL_API
256      virtual void saveDX(const std::string& filename,const boost::python::dict& arg) const;
257    
258    /**    /**
259       \brief       \brief
260       saves data arg to a VTK input file.       Saves a dictonary of Data objects to an VTK XML input file. The keywords are used as identifier
      considered as cell centered data.  
261    
262       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
263    */    */
264    virtual void saveVTK(const std::string& filename,const escript::Data& arg) const;    ESCRIPT_DLL_API
265      virtual void saveVTK(const std::string& filename,const boost::python::dict& arg) const;
266    
267    /**    /**
268       \brief       \brief
# Line 268  class AbstractDomain { Line 280  class AbstractDomain {
280    
281       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
282    */    */
283      ESCRIPT_DLL_API
284    virtual bool isCellOriented(int functionSpaceCode) const;    virtual bool isCellOriented(int functionSpaceCode) const;
285    
286    /**    /**
# Line 275  class AbstractDomain { Line 288  class AbstractDomain {
288       Throw a standard exception. This function is called if any attempt       Throw a standard exception. This function is called if any attempt
289       is made to use a base class function.       is made to use a base class function.
290    */    */
291      ESCRIPT_DLL_API
292    void throwStandardException(const std::string& functionName) const;    void throwStandardException(const std::string& functionName) const;
293    
294   protected:   protected:

Legend:
Removed from v.149  
changed lines
  Added in v.757

  ViewVC Help
Powered by ViewVC 1.1.26