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

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

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

revision 115 by jgs, Fri Mar 4 07:12:47 2005 UTC revision 117 by jgs, Fri Apr 1 05:48:57 2005 UTC
# Line 22  Line 22 
22    
23  namespace escript {  namespace escript {
24    
25    class Data;  //
26    // Forward declaration for class Data.
27    class Data;
28    
29  /**  /**
30     \brief     \brief
31     Give a short description of what FunctionSpace does.     Give a short description of what FunctionSpace does.
32    
33     Description:     Description:
34     Give a detailed description of FunctionSpace     Give a detailed description of FunctionSpace.
35    
36     Template Parameters:     Template Parameters:
37     For templates describe any conditions that the parameters used in the     For templates describe any conditions that the parameters used in the
38     template must satisfy     template must satisfy.
39  */  */
40    
41  class FunctionSpace {  class FunctionSpace {
# Line 41  class FunctionSpace { Line 43  class FunctionSpace {
43   public:   public:
44    /**    /**
45       \brief       \brief
46       Default constructor for FunctionSpace       Default constructor for FunctionSpace.
47    
48       Description:       Description:
49       Default constructor for FunctionSpace       Default constructor for FunctionSpace
50       Generates a function space with a null domain.       Generates a function space with a null domain.
51    
52       Preconditions:       Preconditions:
53       Describe any preconditions       Describe any preconditions.
54    
55       Throws:       Throws:
56       Describe any exceptions thrown       Describe any exceptions thrown.
57    */    */
58    FunctionSpace();    FunctionSpace();
59    
60    /**    /**
61       \brief       \brief
62       Constructor for FunctionSpace       Constructor for FunctionSpace.
63    
64       Description:       Description:
65       Constructor for FunctionSpace.       Constructor for FunctionSpace.
# Line 66  class FunctionSpace { Line 68  class FunctionSpace {
68       for the lifetime of the FunctionSpace object. ie: domain must       for the lifetime of the FunctionSpace object. ie: domain must
69       be an externally managed object (!).       be an externally managed object (!).
70    */    */
71    FunctionSpace(const AbstractDomain& domain, int functionSpaceType);    FunctionSpace(const AbstractDomain& domain,
72                    int functionSpaceType);
73    
74    /**    /**
75      \brief      \brief
76      Return the function space type code.      Return the function space type code.
77    */    */
78    int getTypeCode() const;    int
79      getTypeCode() const;
80    
81    /**    /**
82     \brief     \brief
83     Return the function space domain.     Return the function space domain.
84    */    */
85    const AbstractDomain& getDomain() const;    const
86      AbstractDomain&
87      getDomain() const;
88    
89    /**    /**
90     \brief     \brief
# Line 86  class FunctionSpace { Line 92  class FunctionSpace {
92     NOTE: Assignment just copies the domain object pointer     NOTE: Assignment just copies the domain object pointer
93     as this object is managed externally to this class.     as this object is managed externally to this class.
94    */    */
95    FunctionSpace& operator=(const FunctionSpace& other);    FunctionSpace&
96      operator=(const FunctionSpace& other);
97    
98    /**    /**
99     \brief     \brief
100     Return the shape of the data needed to represent the function space.     Return the shape of the data needed to represent the function space.
101    */    */
102    std::pair<int,int> getDataShape() const;    std::pair<int,int>
103      getDataShape() const;
104    
105    /**    /**
106     \brief     \brief
# Line 100  class FunctionSpace { Line 108  class FunctionSpace {
108     Return true if function spaces are equal.     Return true if function spaces are equal.
109     ie: Same domain and same function space type.     ie: Same domain and same function space type.
110    */    */
111    bool operator==(const FunctionSpace& other) const;    bool
112    bool operator!=(const FunctionSpace& other) const;    operator==(const FunctionSpace& other) const;
113    
114      bool
115      operator!=(const FunctionSpace& other) const;
116    
117    /**    /**
118     \brief     \brief
119     Return a text description of the function space.     Return a text description of the function space.
120    */    */
121    std::string toString() const;    std::string
122      toString() const;
123    
124    /**    /**
125     \brief     \brief
126     Return the tag associated with the given sample number.     Return the tag associated with the given sample number.
127    */    */
128    int getTagFromSampleNo(int sampleNo) const;    int
129      getTagFromSampleNo(int sampleNo) const;
130    
131    /**    /**
132     \brief     \brief
133     Return the reference nomber associated with the given sample number.     Return the reference nomber associated with the given sample number.
134    */    */
135    int getReferenceNoFromSampleNo(int sampleNo) const;    int
136      getReferenceNoFromSampleNo(int sampleNo) const;
137    
138    /**    /**
139     \brief     \brief
140     Return the location of the data points.     Return the location of the data points.
141    */    */
142    escript::Data getX() const;    escript::Data
143      getX() const;
144        
145    /**    /**
146     \brief     \brief
147     Return the surface normal field.     Return the surface normal field.
148    */    */
149    escript::Data getNormal() const;    escript::Data
150      getNormal() const;
151    
152    /**    /**
153     \brief     \brief
154     Return the sample size (e.g. the diameter of elements, radius of particles).     Return the sample size (e.g. the diameter of elements, radius of particles).
155    */    */
156    escript::Data getSize() const;    escript::Data
157      getSize() const;
158    
159    /**    /**
160     \brief     \brief
161     Return the number of samples.     Return the number of samples.
162    */    */
163    inline int getNumSamples() const {    inline
164      int
165      getNumSamples() const {
166       return getDataShape().second;       return getDataShape().second;
167    }    }
168    
# Line 151  class FunctionSpace { Line 170  class FunctionSpace {
170     \brief     \brief
171     Return the number of data points per sample.     Return the number of data points per sample.
172    */    */
173    inline int getNumDPPSample() const {    inline
174      int
175      getNumDPPSample() const {
176       return getNumDataPointsPerSample();       return getNumDataPointsPerSample();
177    }    }
178    inline int getNumDataPointsPerSample() const {    inline
179      int
180      getNumDataPointsPerSample() const {
181       return getDataShape().first;       return getDataShape().first;
182    }    }
183    
# Line 162  class FunctionSpace { Line 185  class FunctionSpace {
185     \brief     \brief
186     Return the spatial dimension of the underlying domain.     Return the spatial dimension of the underlying domain.
187    */    */
188    inline int getDim() const {    inline
189      int
190      getDim() const {
191        return getDomain().getDim();        return getDomain().getDim();
192    }    }
193    
# Line 185  class FunctionSpace { Line 210  class FunctionSpace {
210  };  };
211    
212  } // end of namespace  } // end of namespace
213    
214  #endif  #endif

Legend:
Removed from v.115  
changed lines
  Added in v.117

  ViewVC Help
Powered by ViewVC 1.1.26