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

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

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

revision 113 by jgs, Mon Feb 28 07:06:33 2005 UTC revision 117 by jgs, Fri Apr 1 05:48:57 2005 UTC
# Line 25  Line 25 
25    
26  namespace escript {  namespace escript {
27    
28    //
29    // Forward declarations of other Data types.
30  class DataEmpty;  class DataEmpty;
31  class DataConstant;  class DataConstant;
32  class DataTagged;  class DataTagged;
# Line 34  class DataTagged; Line 36  class DataTagged;
36     Give a short description of what DataExpanded does.     Give a short description of what DataExpanded does.
37    
38     Description:     Description:
39     Give a detailed description of DataExpanded     Give a detailed description of DataExpanded.
40    
41     Template Parameters:     Template Parameters:
42     For templates describe any conditions that the parameters used in the     For templates describe any conditions that the parameters used in the
43     template must satisfy     template must satisfy.
44  */  */
45    
46  class DataExpanded : public DataAbstract{  class DataExpanded : public DataAbstract {
47    
48   public:   public:
49    
50    /**    /**
51       \brief       \brief
52       Copy constructor for DataExpanded. Performs a deep copy.       Constructor for DataExpanded.
   */  
   DataExpanded(const DataExpanded& other);  
   
   /**  
      \brief  
      Construct a DataExpanded from a DataConstant.  
   */  
   DataExpanded(const DataConstant& other);  
53    
54    /**       Description:
55       \brief       Constructor for DataExpanded.
      Construct a DataExpanded from a DataTagged.  
   */  
   DataExpanded(const DataTagged& other);  
56    
57    /**       The given single data value is copied to all the data points in
58       \brief       this data object, where the number of data points is defined by
59       Constructor for DataExpanded       the given function space.
60    
61       Description:       \param value - Input - A single data value.
      Constructor for DataExpanded  
      \param value - Input - Data value for a single point.  
62       \param what - Input - A description of what this data represents.       \param what - Input - A description of what this data represents.
63    */    */
64    DataExpanded(const boost::python::numeric::array& value,    DataExpanded(const boost::python::numeric::array& value,
# Line 77  class DataExpanded : public DataAbstract Line 66  class DataExpanded : public DataAbstract
66    
67    /**    /**
68       \brief       \brief
69       Alternative constructor for DataExpanded       Alternative constructor for DataExpanded.
70    
71       Description:       Description:
72       Alternative Constructor for DataExpanded.       Alternative Constructor for DataExpanded.
      \param value - Input - Data value for a single point.  
      \param what - Input - A description of what this data represents.  
73    
74         The given single data value is copied to all the data points in
75         this data object, where the number of data points is defined by
76         the given function space.
77    
78         \param value - Input - A single data value.
79         \param what - Input - A description of what this data represents.
80    */    */
81    DataExpanded(const DataArrayView& value,    DataExpanded(const DataArrayView& value,
82                 const FunctionSpace& what);                 const FunctionSpace& what);
# Line 101  class DataExpanded : public DataAbstract Line 94  class DataExpanded : public DataAbstract
94    
95    /**    /**
96       \brief       \brief
97       Destructor       Copy constructor for DataExpanded.
98         Performs a deep copy from another DataExpanded.
99      */
100      DataExpanded(const DataExpanded& other);
101    
102      /**
103         \brief
104         Copy constructor for DataExpanded.
105         Construct a DataExpanded from a DataConstant.
106      */
107      DataExpanded(const DataConstant& other);
108    
109      /**
110         \brief
111         Copy constructor for DataExpanded.
112         Construct a DataExpanded from a DataTagged.
113      */
114      DataExpanded(const DataTagged& other);
115    
116      /**
117         \brief
118         Default destructor for DataExpanded.
119    */    */
120    virtual    virtual
121    ~DataExpanded();    ~DataExpanded();
122    
123    /**    /**
124       \brief       \brief
125       Return a textual representation of the data       Return a textual representation of the data.
126    */    */
127    virtual    virtual
128    std::string    std::string
# Line 125  class DataExpanded : public DataAbstract Line 139  class DataExpanded : public DataAbstract
139    
140    /**    /**
141       \brief       \brief
142       Return the offset for the given sample. This is somewhat artificial notion       Return the offset for the given given data point. This returns
143       but returns the offset in bytes for the given point into the container       the offset in bytes for the given point into the container
144       holding the point data.       holding the point data.
145       \param sampleNo - Input - number of samples.  
146       \param dataPointNo - Input - Input.       \param sampleNo - Input - sample number.
147         \param dataPointNo - Input - data point number.
148    */    */
149    virtual    virtual
150    DataArrayView::ValueType::size_type    DataArrayView::ValueType::size_type
# Line 138  class DataExpanded : public DataAbstract Line 153  class DataExpanded : public DataAbstract
153    
154    /**    /**
155       \brief       \brief
156       Return a view into the data for the data point specified.       Return a view into the data array for the data point specified.
157    
158       NOTE: Construction of the DataArrayView is a relatively expensive       NOTE: Construction of the DataArrayView is a relatively expensive
159       operation.       operation.
160       \param sampleNo - Input  
161       \param dataPointNo - Input       \param sampleNo - Input - sample number.
162       \return DataArrayView of the data point.       \param dataPointNo - Input - data point number.
163         \return DataArrayView for the data point.
164    */    */
165    DataArrayView    DataArrayView
166    getDataPoint(int sampleNo,    getDataPoint(int sampleNo,
# Line 161  class DataExpanded : public DataAbstract Line 178  class DataExpanded : public DataAbstract
178       \brief       \brief
179       Factory method that returns a newly created DataExpanded.       Factory method that returns a newly created DataExpanded.
180       The caller is reponsible for managing the object created.       The caller is reponsible for managing the object created.
181    
182       \param region - Input - Region to copy.       \param region - Input - Region to copy.
183    */    */
184    virtual    virtual
# Line 170  class DataExpanded : public DataAbstract Line 188  class DataExpanded : public DataAbstract
188    /**    /**
189       \brief       \brief
190       Copy the specified region from the given value.       Copy the specified region from the given value.
191       \param value - Input - Data to copy from  
192         \param value - Input - Data object to copy from.
193       \param region - Input - Region to copy.       \param region - Input - Region to copy.
194    */    */
195    virtual    virtual
# Line 233  class DataExpanded : public DataAbstract Line 252  class DataExpanded : public DataAbstract
252    
253    /**    /**
254       \brief       \brief
255       Common initialisation called from constructors       Common initialisation called from constructors.
256    
257       Description:       Description:
258       Common initialisation called from constructors       Common initialisation called from constructors.
259    
260         Resizes the underlying data array to provide sufficient storage for the
261         given shape and number of data points, and creates the corresponding
262         DataArrayView of this data.
263    
264       \param shape - Input - The shape of the point data.       \param shape - Input - The shape of the point data.
265       \param noSamples - Input - number of samples.       \param noSamples - Input - number of samples.
266       \param noDataPointsPerSample - Input -       \param noDataPointsPerSample - Input - number of data points per sample.
267    */    */
268    void    void
269    initialise(const DataArrayView::ShapeType& shape,    initialise(const DataArrayView::ShapeType& shape,
# Line 248  class DataExpanded : public DataAbstract Line 272  class DataExpanded : public DataAbstract
272    
273    /**    /**
274       \brief       \brief
275       Copy the given data point to all data points.       Copy the given data point to all data points in this object.
276    
277       Description:       Description:
278       Copy the given data point to all data points.       Copy the given data point to all data points in this object.
279       \param value Input - Value for a single data point.  
280         \param value Input - A single data point value.
281    */    */
282    void    void
283    copy(const DataArrayView& value);    copy(const DataArrayView& value);
# Line 261  class DataExpanded : public DataAbstract Line 286  class DataExpanded : public DataAbstract
286    copy(const boost::python::numeric::array& value);    copy(const boost::python::numeric::array& value);
287    
288    //    //
289    // The main data storage, a 2D array of data blocks.    // The main data storage array, a 2D array of data blocks.
290      // noSamples * noDataPointsPerSample
291    DataBlocks2D m_data;    DataBlocks2D m_data;
292    
293  };  };

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

  ViewVC Help
Powered by ViewVC 1.1.26