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

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

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

trunk/esys2/escript/src/Data/DataConstant.h revision 97 by jgs, Tue Dec 14 05:39:33 2004 UTC trunk/escript/src/DataConstant.h revision 480 by jgs, Wed Feb 1 05:15:12 2006 UTC
# Line 12  Line 12 
12   *                                                                            *   *                                                                            *
13   ******************************************************************************   ******************************************************************************
14  */  */
15                                                                              
16  #if !defined escript_DataConstant_20040323_H  #if !defined escript_DataConstant_20040323_H
17  #define escript_DataConstant_20040323_H  #define escript_DataConstant_20040323_H
18    
19  #include "escript/Data/DataAbstract.h"  #include "DataAbstract.h"
20  #include "escript/Data/DataArray.h"  #include "DataArrayView.h"
 #include "escript/Data/DataArrayView.h"  
21    
22  #include <boost/python/numeric.hpp>  #include <boost/python/numeric.hpp>
23    
# Line 82  class DataConstant : public DataAbstract Line 81  class DataConstant : public DataAbstract
81    
82    /**    /**
83       \brief       \brief
84         Alternative constructor for DataConstant objects.
85    
86         Description:
87         Alternative Constructor for DataConstant objects.
88         \param what - Input - A description of what this data object represents.
89         \param shape - Input - the shape of each data-point.
90         \param data - the data values for each data-point.
91      */
92      DataConstant(const FunctionSpace& what,
93                   const DataArrayView::ShapeType &shape,
94                   const DataArrayView::ValueType &data);
95    
96      /**
97         \brief
98       Write the data as a string.       Write the data as a string.
99    */    */
100    std::string    std::string
# Line 117  class DataConstant : public DataAbstract Line 130  class DataConstant : public DataAbstract
130       Return the number of doubles stored for the Data object.       Return the number of doubles stored for the Data object.
131    */    */
132    virtual    virtual
133    ValueType::size_type    DataArrayView::ValueType::size_type
134    getLength() const;    getLength() const;
135    
136    /**    /**
# Line 151  class DataConstant : public DataAbstract Line 164  class DataConstant : public DataAbstract
164    void    void
165    reshapeDataPoint(const DataArrayView::ShapeType& shape);    reshapeDataPoint(const DataArrayView::ShapeType& shape);
166    
167      /**
168        \brief
169        Archive the underlying data values to the file referenced
170        by ofstream. A count of the number of values expected to be written
171        is provided as a cross-check.
172    
173        The return value indicates success (0) or otherwise (1).
174      */
175      int
176      archiveData(std::ofstream& archiveFile,
177                  const DataArrayView::ValueType::size_type noValues) const;
178    
179      /**
180        \brief
181        Extract the number of values specified by noValues from the file
182        referenced by ifstream to the underlying data structure.
183    
184        The return value indicates success (0) or otherwise (1).
185      */
186      int
187      extractData(std::ifstream& archiveFile,
188                  const DataArrayView::ValueType::size_type noValues);
189    
190   protected:   protected:
191    
192   private:   private:

Legend:
Removed from v.97  
changed lines
  Added in v.480

  ViewVC Help
Powered by ViewVC 1.1.26