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

revision 797 by gross, Thu Aug 3 02:03:18 2006 UTC revision 1872 by jfenwick, Mon Oct 13 00:18:55 2008 UTC
# Line 1  Line 1 
 // $Id$  
 /*  
  ************************************************************  
  *          Copyright 2006 by ACcESS MNRF                   *  
  *                                                          *  
  *              http://www.access.edu.au                    *  
  *       Primary Business: Queensland, Australia            *  
  *  Licensed under the Open Software License version 3.0    *  
  *     http://www.opensource.org/licenses/osl-3.0.php       *  
  *                                                          *  
  ************************************************************  
1    
2  */  /*******************************************************
3    *
4    * Copyright (c) 2003-2008 by University of Queensland
5    * 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    
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
# Line 20  Line 20 
20  #include <string>  #include <string>
21  #include <map>  #include <map>
22  #include <boost/python/dict.hpp>  #include <boost/python/dict.hpp>
23    #include <boost/python/list.hpp>
24    #include "paso/Paso_MPI.h"
25    
26    
27    #include "Pointers.h"
28    
29  namespace escript {  namespace escript {
30  // class forward declarations  // class forward declarations
# Line 32  class Data; Line 37  class Data;
37     Base class for all escript domains.     Base class for all escript domains.
38  */  */
39    
40  class AbstractDomain {  class AbstractDomain;
41    
42    typedef POINTER_WRAPPER_CLASS(AbstractDomain) Domain_ptr;
43    typedef POINTER_WRAPPER_CLASS(const AbstractDomain) const_Domain_ptr;
44    
45    class AbstractDomain : public REFCOUNT_BASE_CLASS(AbstractDomain){
46    
47   public:   public:
48    
49    /**
50    \brief Returns smart pointer which is managing this object.
51    If one does not exist yet it creates one.
52    
53    Note: This is _not_ equivalent to weak_ptr::lock.
54    */
55       ESCRIPT_DLL_API
56       Domain_ptr getPtr();
57       ESCRIPT_DLL_API
58       const_Domain_ptr getPtr() const;
59    
60     // structure holding values for X, size and normal     // structure holding values for X, size and normal
61     typedef int StatusType;     typedef int StatusType;
# Line 86  class AbstractDomain { Line 106  class AbstractDomain {
106    
107    /**    /**
108       \brief       \brief
109         return the number of processors used for this domain
110      */
111      ESCRIPT_DLL_API
112      virtual int getMPISize() const;
113      /**
114         \brief
115         return the number MPI rank of this processor
116      */
117    
118      ESCRIPT_DLL_API
119      virtual int getMPIRank() const;
120    
121    
122    
123      /**
124         \brief
125       Returns true if the given integer is a valid function space type       Returns true if the given integer is a valid function space type
126       for this domain.       for this domain.
127    */    */
# Line 135  class AbstractDomain { Line 171  class AbstractDomain {
171    
172    /**    /**
173       \brief       \brief
174         dumps the domain to an external file filename.
175    
176         This has to be implemented by the actual Domain adapter.
177      */
178      ESCRIPT_DLL_API
179      virtual void dump(const std::string& filename) const;
180    
181      /**
182         \brief
183       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.
184    
185       This has to be implemented by the actual Domain adapter.       This has to be implemented by the actual Domain adapter.
# Line 156  class AbstractDomain { Line 201  class AbstractDomain {
201    
202    /**    /**
203       \brief       \brief
204       Return the reference number of the given sample number.       sets a map from a clear tag name to a tag key
205         \param name Input - tag name.
206         \param tag Input - tag key.
207      */
208      ESCRIPT_DLL_API
209      virtual void setTagMap(const std::string& name,  int tag);
210    
211      /**
212         \brief
213         Return the tag key for tag name.
214         \param name Input - tag name
215      */
216      ESCRIPT_DLL_API
217      virtual int getTag(const std::string& name) const;
218    
219      /**
220         \brief
221         Returns True if name is a defined tag name
222         \param name Input - tag name
223      */
224      ESCRIPT_DLL_API
225      virtual bool isValidTagName(const std::string& name) const;
226    
227      /**
228         \brief
229         Returns all tag names in a single string sperated by commas
230      */
231      ESCRIPT_DLL_API
232      virtual std::string showTagNames() const;
233    
234      /**
235         \brief
236         Return a borrowed pointer to the sample reference number id list
237       \param functionSpaceType Input - The function space type.       \param functionSpaceType Input - The function space type.
      \param sampleNo Input - The sample number.  
238    */    */
239    ESCRIPT_DLL_API    ESCRIPT_DLL_API
240    virtual int getReferenceNoFromSampleNo(int functionSpaceType, int sampleNo) const;    virtual int* borrowSampleReferenceIDs(int functionSpaceType) const;
241    
242    /**    /**
243       \brief       \brief
# Line 319  class AbstractDomain { Line 395  class AbstractDomain {
395    ESCRIPT_DLL_API    ESCRIPT_DLL_API
396    void throwStandardException(const std::string& functionName) const;    void throwStandardException(const std::string& functionName) const;
397    
398      /**
399            \brief
400                      return the number of tags in use and a pointer to an array with the number of tags in use
401      */
402      ESCRIPT_DLL_API
403      virtual int getNumberOfTagsInUse(int functionSpaceCode) const;
404    
405      ESCRIPT_DLL_API
406      virtual int* borrowListOfTagsInUse(int functionSpaceCode) const;
407    
408      /**
409        \brief Checks if this domain allows tags for the specified functionSpaceCode.
410      */
411      ESCRIPT_DLL_API
412      virtual bool canTag(int functionspacecode) const;
413    
414   protected:   protected:
415    
416   private:   private:

Legend:
Removed from v.797  
changed lines
  Added in v.1872

  ViewVC Help
Powered by ViewVC 1.1.26