/[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

trunk/esys2/escript/src/Data/DataExpanded.h revision 119 by jgs, Tue Apr 12 04:45:05 2005 UTC trunk/escript/src/DataExpanded.h revision 615 by elspeth, Wed Mar 22 02:12:00 2006 UTC
# Line 1  Line 1 
1  // $Id$  // $Id$
2  /*  /*
3   ******************************************************************************   ************************************************************
4   *                                                                            *   *          Copyright 2006 by ACcESS MNRF                   *
5   *       COPYRIGHT  ACcESS 2004 -  All Rights Reserved                        *   *                                                          *
6   *                                                                            *   *              http://www.access.edu.au                    *
7   * This software is the property of ACcESS. No part of this code              *   *       Primary Business: Queensland, Australia            *
8   * may be copied in any form or by any means without the expressed written    *   *  Licensed under the Open Software License version 3.0    *
9   * consent of ACcESS.  Copying, use or modification of this software          *   *     http://www.opensource.org/licenses/osl-3.0.php       *
10   * by any unauthorised person is illegal unless that person has a software    *   *                                                          *
11   * license agreement with ACcESS.                                             *   ************************************************************
  *                                                                            *  
  ******************************************************************************  
12  */  */
13                                                                              
14  #if !defined escript_DataExpanded_20040323_H  #if !defined escript_DataExpanded_20040323_H
15  #define escript_DataExpanded_20040323_H  #define escript_DataExpanded_20040323_H
16    
# Line 20  Line 18 
18  #include "DataBlocks2D.h"  #include "DataBlocks2D.h"
19  #include "DataArrayView.h"  #include "DataArrayView.h"
20    
 #include <boost/scoped_ptr.hpp>  
21  #include <boost/python/numeric.hpp>  #include <boost/python/numeric.hpp>
22    
23  namespace escript {  namespace escript {
24    
25  //  //
26  // Forward declarations of other Data types.  // Forward declarations of other Data types.
 class DataEmpty;  
27  class DataConstant;  class DataConstant;
28  class DataTagged;  class DataTagged;
29    
# Line 100  class DataExpanded : public DataAbstract Line 96  class DataExpanded : public DataAbstract
96       Alternative Constructor for DataExpanded objects.       Alternative Constructor for DataExpanded objects.
97       \param what - Input - A description of what this data object represents.       \param what - Input - A description of what this data object represents.
98       \param shape - Input - the shape of each data-point.       \param shape - Input - the shape of each data-point.
99       \param data - the data values for each data-point.       \param data - the array of data values for the data-points.
100    */    */
101    DataExpanded(const FunctionSpace& what,    DataExpanded(const FunctionSpace& what,
102                 const DataArrayView::ShapeType &shape,                 const DataArrayView::ShapeType &shape,
# Line 260  class DataExpanded : public DataAbstract Line 256  class DataExpanded : public DataAbstract
256    getRefValue(int ref,    getRefValue(int ref,
257                DataArray& value);                DataArray& value);
258    
259      /**
260        \brief
261        Archive the underlying data values to the file referenced
262        by ofstream. A count of the number of values expected to be written
263        is provided as a cross-check.
264    
265        The return value indicates success (0) or otherwise (1).
266      */
267      int
268      archiveData(std::ofstream& archiveFile,
269                  const DataArrayView::ValueType::size_type noValues) const;
270    
271      /**
272        \brief
273        Extract the number of values specified by noValues from the file
274        referenced by ifstream to the underlying data structure.
275    
276        The return value indicates success (0) or otherwise (1).
277      */
278      int
279      extractData(std::ifstream& archiveFile,
280                  const DataArrayView::ValueType::size_type noValues);
281    
282      /**
283         \brief
284         solves the eigenvalue problem this*V=ev*V for the eigenvalues ev
285    
286         \param ev - Output - eigenvalues in increasing order at each data point
287    
288      */
289      virtual void
290      eigenvalues(DataAbstract* ev);
291    
292      /**
293         \brief
294         solves the eigenvalue problem this*V=ev*V for the eigenvalues ev and eigenvectors V
295    
296         \param ev - Output - eigenvalues in increasing order at each data point
297         \param V - Output - corresponding eigenvectors. They are normalized such that their length is one
298                             and the first nonzero component is positive.
299         \param tol - Input - eigenvalue with relative distance tol are treated as equal.
300    
301      */
302    
303      virtual void
304      eigenvalues_and_eigenvectors(DataAbstract* ev,DataAbstract* V,const double tol=1.e-13);
305    
306    
307   protected:   protected:
308    
309   private:   private:
# Line 286  class DataExpanded : public DataAbstract Line 330  class DataExpanded : public DataAbstract
330    
331    /**    /**
332       \brief       \brief
333       Copy the given data point to all data points in this object.       Copy the given data point value to all data points in this object.
334    
335       Description:       Description:
336       Copy the given data point to all data points in this object.       Copy the given data point to all data points in this object.
# Line 296  class DataExpanded : public DataAbstract Line 340  class DataExpanded : public DataAbstract
340    void    void
341    copy(const DataArrayView& value);    copy(const DataArrayView& value);
342    
343      /**
344         \brief
345         Copy the given data point value given a numarray object to all data points in this object.
346    
347         Description:
348         Copy the given data point value given a numarray object to all data points in this object.
349    
350         \param value Input - A single data point value.
351      */
352    void    void
353    copy(const boost::python::numeric::array& value);    copy(const boost::python::numeric::array& value);
354    
355      /**
356         \brief
357         Copy the numarray object to the data points in this object.
358    
359         Description:
360         Copy the numarray object to the data points in this object.
361    
362         \param value Input - new values for the data points
363      */
364      void
365      copyAll(const boost::python::numeric::array& value);
366    
367    //    //
368    // The main data storage array, a 2D array of data blocks.    // The main data storage array, a 2D array of data blocks.
369    // noSamples * noDataPointsPerSample    // noSamples * noDataPointsPerSample

Legend:
Removed from v.119  
changed lines
  Added in v.615

  ViewVC Help
Powered by ViewVC 1.1.26