/[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 1799 by jfenwick, Wed Sep 17 06:33:18 2008 UTC revision 2742 by jfenwick, Thu Nov 12 06:03:37 2009 UTC
# Line 1  Line 1 
1    
 /* $Id$ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2009 by University of Queensland
5   *       Copyright 2007 by University of Queensland  * Earth Systems Science Computational Center (ESSCC)
6   *  * http://www.uq.edu.au/esscc
7   *                http://esscc.uq.edu.au  *
8   *        Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
9   *  Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
10   *     http://www.opensource.org/licenses/osl-3.0.php  * http://www.opensource.org/licenses/osl-3.0.php
11   *  *
12   *******************************************************/  *******************************************************/
13    
14    
15  #if !defined escript_DataExpanded_20040323_H  #if !defined escript_DataExpanded_20040323_H
16  #define escript_DataExpanded_20040323_H  #define escript_DataExpanded_20040323_H
17  #include "system_dep.h"  #include "system_dep.h"
18    
19  #include "DataAbstract.h"  #include "DataReady.h"
20  #include "DataBlocks2D.h"  #include "DataBlocks2D.h"
21    
 #include <boost/python/numeric.hpp>  
   
22  namespace escript {  namespace escript {
23    
24  //  //
# Line 41  class DataTagged; Line 38  class DataTagged;
38     template must satisfy.     template must satisfy.
39  */  */
40    
41  class DataExpanded : public DataAbstract {  class DataExpanded : public DataReady {
42    
43    typedef DataReady parent;
44    
45   public:   public:
46    
# Line 56  class DataExpanded : public DataAbstract Line 55  class DataExpanded : public DataAbstract
55       this data object, where the number of data points is defined by       this data object, where the number of data points is defined by
56       the given function space.       the given function space.
57    
58       \param value - Input - A single data value.       \param value - Input - The value of a single data point.
59       \param what - Input - A description of what this data represents.       \param what - Input - A description of what this data represents.
60    */    */
61    ESCRIPT_DLL_API    ESCRIPT_DLL_API
62    DataExpanded(const boost::python::numeric::array& value,    DataExpanded(const WrappedArray& value,
63                 const FunctionSpace& what);                 const FunctionSpace& what);
64    
 //  /**  
 //      \brief  
 //      Alternative constructor for DataExpanded.  
 //  
 //      Description:  
 //      Alternative Constructor for DataExpanded.  
 //  
 //      The given single data value is copied to all the data points in  
 //      this data object, where the number of data points is defined by  
 //      the given function space.  
 //  
 //      \param value - Input - A single data value.  
 //      \param what - Input - A description of what this data represents.  
 //  */  
 //   ESCRIPT_DLL_API  
 //   DataExpanded(const DataArrayView& value,  
 //                const FunctionSpace& what);  
   
65    /**    /**
66       \brief       \brief
67       Alternative constructor for DataExpanded that copies a slice from       Alternative constructor for DataExpanded that copies a slice from
# Line 142  TODO Note that this constructor will als Line 123  TODO Note that this constructor will als
123    virtual    virtual
124    ~DataExpanded();    ~DataExpanded();
125    
126      ESCRIPT_DLL_API
127      bool
128      isExpanded() const
129      {
130        return true;
131      };
132    
133      ESCRIPT_DLL_API
134      bool
135      actsExpanded() const
136      {
137        return true;
138      }
139    
140    /**    /**
141       \brief       \brief
142       Return a textual representation of the data.       Return a textual representation of the data.
# Line 169  TODO Note that this constructor will als Line 164  TODO Note that this constructor will als
164    void    void
165    dump(const std::string fileName) const;    dump(const std::string fileName) const;
166    
167    
168      /**
169        \brief invert square matricies
170        \param out - Where to store the results
171      */
172      ESCRIPT_DLL_API
173      virtual void
174      matrixInverse(DataAbstract* out) const;
175    
176   /**   /**
177       \brief       \brief
178      sets all values to zero      sets all values to zero
# Line 193  TODO Note that this constructor will als Line 197  TODO Note that this constructor will als
197    getPointOffset(int sampleNo,    getPointOffset(int sampleNo,
198                   int dataPointNo) const;                   int dataPointNo) const;
199    
200  //  /**    ESCRIPT_DLL_API
201  /*     \brief    virtual
202       Return a view into the data array for the data point specified.    DataTypes::ValueType::size_type
203      getPointOffset(int sampleNo,
204       NOTE: Construction of the DataArrayView is a relatively expensive                   int dataPointNo);
      operation.  
   
      \param sampleNo - Input - sample number.  
      \param dataPointNo - Input - data point number.  
      \return DataArrayView for the data point.*/  
 //  */  
 //   ESCRIPT_DLL_API  
 //   DataArrayView  
 //   getDataPoint(int sampleNo,  
 //                int dataPointNo);  
   
205    
206    /**    /**
207       \brief       \brief
# Line 217  TODO Note that this constructor will als Line 210  TODO Note that this constructor will als
210    
211    ESCRIPT_DLL_API    ESCRIPT_DLL_API
212    DataTypes::ValueType&    DataTypes::ValueType&
213    getVector();    getVectorRW();
214    
215    ESCRIPT_DLL_API    ESCRIPT_DLL_API
216    const DataTypes::ValueType&    const DataTypes::ValueType&
217    getVector() const;    getVectorRO() const;
218    
219    
220    
221    /**    /**
# Line 258  TODO Note that this constructor will als Line 252  TODO Note that this constructor will als
252    setSlice(const DataAbstract* value,    setSlice(const DataAbstract* value,
253             const DataTypes::RegionType& region);             const DataTypes::RegionType& region);
254    
   
 //  /**  
 /*     \brief  
      setTaggedValue  
   
      Description:  
      uses tag to set a new value  
   
      \param tagKey - Input - Integer key.  
      \param value - Input - Single DataArrayView value to be assigned to the tag.*/  
 //  */  
 //   ESCRIPT_DLL_API  
 //   virtual  
 //   void  
 //   setTaggedValue(int tagKey,  
 //                  const DataArrayView& value);  
   
   
   
255    /**    /**
256       \brief       \brief
257       setTaggedValue       setTaggedValue
# Line 286  TODO Note that this constructor will als Line 261  TODO Note that this constructor will als
261    
262       \param tagKey - Input - Integer key.       \param tagKey - Input - Integer key.
263       \param pointshape - Input - The shape of the value parameter       \param pointshape - Input - The shape of the value parameter
264       \param value - Input - .       \param value - Input -
265         \param dataOffset - Input - where in the value parameter to start reading the data point value.
266    */    */
267    void      void  
268    setTaggedValue(int tagKey,    setTaggedValue(int tagKey,
# Line 323  TODO Note that this constructor will als Line 299  TODO Note that this constructor will als
299       Computes the trace of a matrix       Computes the trace of a matrix
300    
301       \param ev - Output - trace of your matrix       \param ev - Output - trace of your matrix
302         \param axis_offset -
303    
304    */    */
305    ESCRIPT_DLL_API    ESCRIPT_DLL_API
# Line 334  TODO Note that this constructor will als Line 311  TODO Note that this constructor will als
311       Transpose each data point of this Data object around the given axis.       Transpose each data point of this Data object around the given axis.
312    
313       \param ev - Output - transpose of your matrix       \param ev - Output - transpose of your matrix
314         \param axis_offset -
315    */    */
316    ESCRIPT_DLL_API    ESCRIPT_DLL_API
317    virtual void    virtual void
# Line 345  TODO Note that this constructor will als Line 322  TODO Note that this constructor will als
322       swaps components axis0 and axis1       swaps components axis0 and axis1
323    
324       \param ev - Output - swapped components       \param ev - Output - swapped components
325         \param axis0
326         \param axis1
327    */    */
328    ESCRIPT_DLL_API    ESCRIPT_DLL_API
329    virtual void    virtual void
# Line 428  TODO Note that this constructor will als Line 406  TODO Note that this constructor will als
406    
407    /**    /**
408       \brief       \brief
409       Copy the given data point value given a numarray object to all data points in this object.       Copy the given data point value to all data points in this object.
   
      Description:  
      Copy the given data point value given a numarray object to all data points in this object.  
410    
411       \param value Input - A single data point value.       \param value Input - A single data point value.
412    */    */
   void  
   copy(const boost::python::numeric::array& value);  
   
   /**  
      \brief  
      Copy the numarray object to the data points in this object.  
   
      Description:  
      Copy the numarray object to the data points in this object.  
413    
      \param value Input - new values for the data points  
   */  
414    void    void
415    copyAll(const boost::python::numeric::array& value);    copy(const WrappedArray& value);
416    
417    
418    /**    /**
419       \brief       \brief
# Line 468  TODO Note that this constructor will als Line 433  TODO Note that this constructor will als
433    
434    /**    /**
435       \brief       \brief
436       Copy the numarray object to the data point dataPointNo of sample sampleNo in this object.       Copy the value to the data point dataPointNo of sample sampleNo in this object.
   
      Description:  
      Copy the numarray object to the data point dataPointNo of sample sampleNo in this object.  
437    
438       \param sampleNo Input - sample number       \param sampleNo Input - sample number
439       \param dataPointNo Input - data point of the sample       \param dataPointNo Input - data point of the sample
440       \param value Input - new values for the data point       \param value Input - new values for the data point
441    */    */
442    void    ESCRIPT_DLL_API
443    copyToDataPoint(const int sampleNo, const int dataPointNo, const boost::python::numeric::array& value);    virtual void
444      copyToDataPoint(const int sampleNo, const int dataPointNo, const WrappedArray& value);
445    
446    //    //
447    // The main data storage array, a 2D array of data blocks.    // The main data storage array, a 2D array of data blocks.

Legend:
Removed from v.1799  
changed lines
  Added in v.2742

  ViewVC Help
Powered by ViewVC 1.1.26