/[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 580 by gross, Wed Mar 8 05:45:51 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      /**
191         \brief
192         solves the eigenvalue problem this*V=ev*V for the eigenvalues ev
193    
194         \param ev - Output - eigenvalues in increasing order at each data point
195    
196      */
197      virtual void
198      eigenvalues(DataAbstract* ev);
199    
200      /**
201         \brief
202         solves the eigenvalue problem this*V=ev*V for the eigenvalues ev and eigenvectors V
203    
204         \param ev - Output - eigenvalues in increasing order at each data point
205         \param V - Output - corresponding eigenvectors. They are normalized such that their length is one
206                             and the first nonzero component is positive.
207         \param tol - Input - eigenvalue with relative distance tol are treated as equal.
208    
209      */
210    
211      virtual void
212      eigenvalues_and_eigenvectors(DataAbstract* ev,DataAbstract* V,const double tol=1.e-13);
213    
214    
215   protected:   protected:
216    
217   private:   private:

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

  ViewVC Help
Powered by ViewVC 1.1.26