/[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 1796 by jfenwick, Wed Sep 17 01:45:46 2008 UTC revision 2271 by jfenwick, Mon Feb 16 05:08:29 2009 UTC
# Line 1  Line 1 
1    
 /* $Id$ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2008 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    
22  #include <boost/python/numeric.hpp>  #include <boost/python/numeric.hpp>
# Line 41  class DataTagged; Line 40  class DataTagged;
40     template must satisfy.     template must satisfy.
41  */  */
42    
43  class DataExpanded : public DataAbstract {  class DataExpanded : public DataReady {
44    
45    typedef DataReady parent;
46    
47   public:   public:
48    
# Line 56  class DataExpanded : public DataAbstract Line 57  class DataExpanded : public DataAbstract
57       this data object, where the number of data points is defined by       this data object, where the number of data points is defined by
58       the given function space.       the given function space.
59    
60       \param value - Input - A single data value.       \param value - Input - The value of a single data point.
61       \param what - Input - A description of what this data represents.       \param what - Input - A description of what this data represents.
62    */    */
63    ESCRIPT_DLL_API    ESCRIPT_DLL_API
64    DataExpanded(const boost::python::numeric::array& value,    DataExpanded(const WrappedArray& value,
65                 const FunctionSpace& what);                 const FunctionSpace& what);
66    
 //  /**  
 //      \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);  
   
67    /**    /**
68       \brief       \brief
69       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 125  TODO Note that this constructor will als
125    virtual    virtual
126    ~DataExpanded();    ~DataExpanded();
127    
128      ESCRIPT_DLL_API
129      bool
130      isExpanded() const
131      {
132        return true;
133      };
134    
135      ESCRIPT_DLL_API
136      bool
137      actsExpanded() const
138      {
139        return true;
140      }
141    
142    /**    /**
143       \brief       \brief
144       Return a textual representation of the data.       Return a textual representation of the data.
# Line 150  TODO Note that this constructor will als Line 147  TODO Note that this constructor will als
147    virtual    virtual
148    std::string    std::string
149    toString() const;    toString() const;
150    
151      /**
152         \brief Return a deep copy of the current object.
153      */
154      ESCRIPT_DLL_API
155      virtual
156      DataAbstract*
157      deepCopy();
158    
159    
160   /**   /**
161       \brief       \brief
162       dumps the object into a netCDF file       dumps the object into a netCDF file
# Line 183  TODO Note that this constructor will als Line 190  TODO Note that this constructor will als
190    getPointOffset(int sampleNo,    getPointOffset(int sampleNo,
191                   int dataPointNo) const;                   int dataPointNo) const;
192    
193  //  /**    ESCRIPT_DLL_API
194  /*     \brief    virtual
195       Return a view into the data array for the data point specified.    DataTypes::ValueType::size_type
196      getPointOffset(int sampleNo,
197       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);  
   
198    
199    /**    /**
200       \brief       \brief
# Line 207  TODO Note that this constructor will als Line 203  TODO Note that this constructor will als
203    
204    ESCRIPT_DLL_API    ESCRIPT_DLL_API
205    DataTypes::ValueType&    DataTypes::ValueType&
206    getVector();    getVectorRW();
207    
208    ESCRIPT_DLL_API    ESCRIPT_DLL_API
209    const DataTypes::ValueType&    const DataTypes::ValueType&
210    getVector() const;    getVectorRO() const;
211    
212    
213    
214    /**    /**
# Line 248  TODO Note that this constructor will als Line 245  TODO Note that this constructor will als
245    setSlice(const DataAbstract* value,    setSlice(const DataAbstract* value,
246             const DataTypes::RegionType& region);             const DataTypes::RegionType& region);
247    
   
 //  /**  
 /*     \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);  
   
   
   
248    /**    /**
249       \brief       \brief
250       setTaggedValue       setTaggedValue
# Line 425  TODO Note that this constructor will als Line 403  TODO Note that this constructor will als
403    
404       \param value Input - A single data point value.       \param value Input - A single data point value.
405    */    */
   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.  
406    
      \param value Input - new values for the data points  
   */  
407    void    void
408    copyAll(const boost::python::numeric::array& value);    copy(const WrappedArray& value);
409    
410    
411    /**    /**
412       \brief       \brief
# Line 467  TODO Note that this constructor will als Line 435  TODO Note that this constructor will als
435       \param dataPointNo Input - data point of the sample       \param dataPointNo Input - data point of the sample
436       \param value Input - new values for the data point       \param value Input - new values for the data point
437    */    */
438    void    ESCRIPT_DLL_API
439    copyToDataPoint(const int sampleNo, const int dataPointNo, const boost::python::numeric::array& value);    virtual void
440      copyToDataPoint(const int sampleNo, const int dataPointNo, const WrappedArray& value);
441    
442    //    //
443    // 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.1796  
changed lines
  Added in v.2271

  ViewVC Help
Powered by ViewVC 1.1.26