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

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

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

trunk/esys2/escript/src/Data/NullDomain.h revision 110 by jgs, Mon Feb 14 04:14:42 2005 UTC trunk/escript/src/NullDomain.h revision 2548 by jfenwick, Mon Jul 20 06:20:06 2009 UTC
# Line 1  Line 1 
1  /*  
2   ******************************************************************************  /*******************************************************
3   *                                                                            *  *
4   *       COPYRIGHT  ACcESS 2004 -  All Rights Reserved                        *  * Copyright (c) 2003-2009 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_NullDomain_20040604_H  #if !defined escript_NullDomain_20040604_H
16  #define escript_NullDomain_20040604_H  #define escript_NullDomain_20040604_H
17    #include "system_dep.h"
18    
19  #include "escript/Data/AbstractDomain.h"  #include "AbstractDomain.h"
20    
21  #include <string>  #include <string>
22    
# Line 28  namespace escript { Line 29  namespace escript {
29    
30     Description:     Description:
31     NullDomain provides a null value for domain. Needed for the construction     NullDomain provides a null value for domain. Needed for the construction
32     of a default FunctionSpace.     of a default FunctionSpace. Inherits from AbstractDomain and overrides its
33       methods.
34       This domain supports a single type of FunctionSpace for which canTag is true.
35       This compromise is needed to allow the default contructor of DataTagged to
36       have a FunctionSpace which supports tagging.
37       See notes on the borrowListOfTagsInUse() method.
38  */  */
39    
40  class NullDomain : public AbstractDomain {  class NullDomain : public AbstractDomain {
41    
42   public:   public:
43    
44    /**    /**
45       \brief       \brief
46       Default constructor for NullDomain       Default constructor for NullDomain.
47    
48       Description:       Description:
49       Default constructor for NullDomain       Default constructor for NullDomain.
50    
51    */    */
52      ESCRIPT_DLL_API
53    NullDomain();    NullDomain();
54    
55    /**    /**
56       \brief       \brief
57       Returns true if the given integer is a valid function space type       Returns true if the given integer is a valid function space type
58       for this domain.       for this domain.
59    */    */
60      ESCRIPT_DLL_API
61    virtual bool isValidFunctionSpaceType(int functionSpaceType) const;    virtual bool isValidFunctionSpaceType(int functionSpaceType) const;
62    
63    /**    /**
64       \brief       \brief
65       Return a description for this domain       Return a description for this domain.
66    */    */
67      ESCRIPT_DLL_API
68    virtual std::string getDescription() const;    virtual std::string getDescription() const;
69    
70      /**
71         \brief
72         Return a description for the given function space type code.
73      */
74      ESCRIPT_DLL_API
75      virtual std::string functionSpaceTypeAsString(int functionSpaceType) const;
76    
77    /**    /**
78       \brief       \brief
79       Return a continuous FunctionSpace       Interpolates data given on source onto target where source and target have to be given on the same domain.
80         NullDomain only has one FunctionSpace so this makes target a shallow copy of source.
81    */    */
82      ESCRIPT_DLL_API
83      virtual void interpolateOnDomain(escript::Data& target,const escript::Data& source) const;
84      ESCRIPT_DLL_API
85      virtual bool probeInterpolationOnDomain(int functionSpaceType_source,int functionSpaceType_target) const;
86    
87      /**
88         \brief
89         Interpolates data given on source onto target where source and target are given on different domains.
90         We do not permit interpolation into the NullDomain so this method always throws.
91      */
92      ESCRIPT_DLL_API
93      virtual void interpolateACross(escript::Data& target, const escript::Data& source) const;
94      ESCRIPT_DLL_API
95      virtual bool probeInterpolationACross(int functionSpaceType_source,const AbstractDomain& targetDomain, int functionSpaceType_target) const;
96    
97      /**
98         \brief
99         Return a continuous FunctionSpace.
100      */
101      ESCRIPT_DLL_API
102    virtual int getContinuousFunctionCode() const;    virtual int getContinuousFunctionCode() const;
103    
104    /**    /**
105       \brief       \brief
106       Return a functon FunctionSpace       Return a function FunctionSpace.
107    */    */
108      ESCRIPT_DLL_API
109    virtual int getFunctionCode() const;    virtual int getFunctionCode() const;
110    
111    /**    /**
112       \brief       \brief
113       Return a function on boundary FunctionSpace       Return a function on boundary FunctionSpace.
114    */    */
115      ESCRIPT_DLL_API
116    virtual int getFunctionOnBoundaryCode() const;    virtual int getFunctionOnBoundaryCode() const;
117    
118    /**    /**
119       \brief       \brief
120       Return a FunctionSpace       Return a FunctionSpace.
121    */    */
122      ESCRIPT_DLL_API
123    virtual int getFunctionOnContactZeroCode() const;    virtual int getFunctionOnContactZeroCode() const;
124    
125    /**    /**
126       \brief       \brief
127       Return a FunctionSpace       Return a FunctionSpace.
128    */    */
129      ESCRIPT_DLL_API
130    virtual int getFunctionOnContactOneCode() const;    virtual int getFunctionOnContactOneCode() const;
131    
132    /**    /**
133       \brief       \brief
134       Return a FunctionSpace       Return a FunctionSpace.
135    */    */
136      ESCRIPT_DLL_API
137    virtual int getSolutionCode() const;    virtual int getSolutionCode() const;
138    
139    /**    /**
140       \brief       \brief
141       Return a FunctionSpace       Return a FunctionSpace.
142    */    */
143      ESCRIPT_DLL_API
144    virtual int getReducedSolutionCode() const;    virtual int getReducedSolutionCode() const;
145    
146    /**    /**
147       \brief       \brief
148       Return a FunctionSpace       Return a FunctionSpace.
149    */    */
150      ESCRIPT_DLL_API
151    virtual int getDiracDeltaFunctionCode() const;    virtual int getDiracDeltaFunctionCode() const;
152   /**  
153      /**
154       \brief       \brief
155       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.
156       \param functionSpaceCode Input - Code for the function space type.       \param functionSpaceCode Input - Code for the function space type.
157       \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
158    */    */
159      ESCRIPT_DLL_API
160    virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;    virtual std::pair<int,int> getDataShape(int functionSpaceCode) const;
161    
162    /**    /**
163       \brief       \brief
164       Return the tag key for the given sample number.       Return the tag key for the given sample number.
165       \param functionSpaceType Input - The function space type.       \param functionSpaceType Input - The function space type.
166       \param sampleNo Input - The sample number.       \param sampleNo Input - The sample number.
167    */    */
168      ESCRIPT_DLL_API
169    virtual int getTagFromSampleNo(int functionSpaceType, int sampleNo) const;    virtual int getTagFromSampleNo(int functionSpaceType, int sampleNo) const;
170    
171    /**    /**
172       \brief       \brief
173       Return the reference number of  the given sample number.       Return a borrowed pointer to the sample reference number id list
174       \param functionSpaceType Input - The function space type.       \param functionSpaceType Input - The function space type.
      \param sampleNo Input - The sample number.  
175    */    */
176    virtual int getReferenceNoFromSampleNo(int functionSpaceType, int sampleNo) const;    ESCRIPT_DLL_API
177      virtual const int* borrowSampleReferenceIDs(int functionSpaceType) const;
178    
179    /**    /**
180       \brief       \brief
181    */    */
182      ESCRIPT_DLL_API
183    virtual int getDim() const;    virtual int getDim() const;
184    
185      /**
186         \brief
187         Return true if given domains are equal.
188      */
189      ESCRIPT_DLL_API
190      virtual bool operator==(const AbstractDomain& other) const;
191      ESCRIPT_DLL_API
192      virtual bool operator!=(const AbstractDomain& other) const;
193    
194      /**
195         \brief Checks if this domain allows tags for the specified functionSpaceCode.
196      */
197      ESCRIPT_DLL_API
198      virtual
199      bool canTag(int functionSpaceCode) const;
200    
201      /**
202          \brief
203              return the number of tags in use.
204          For this class the answer is always 1(the default tag).
205      */
206      ESCRIPT_DLL_API
207      virtual int getNumberOfTagsInUse(int functionSpaceCode) const;
208    
209      /**
210         \brief  returns a pointer to an array with the tags used.
211         For this class the answer will always be {0}
212      */
213      ESCRIPT_DLL_API
214      virtual const int* borrowListOfTagsInUse(int functionSpaceCode) const;
215    
216   protected:   protected:
217    
218   private:   private:
219    
220  };  };
221    
222  } // end of namespace  } // end of namespace
223    
224  #endif  #endif

Legend:
Removed from v.110  
changed lines
  Added in v.2548

  ViewVC Help
Powered by ViewVC 1.1.26