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

revision 2005 by jfenwick, Mon Nov 10 01:21:39 2008 UTC revision 2742 by jfenwick, Thu Nov 12 06:03:37 2009 UTC
# Line 1  Line 1 
1    
2  /*******************************************************  /*******************************************************
3  *  *
4  * Copyright (c) 2003-2008 by University of Queensland  * Copyright (c) 2003-2009 by University of Queensland
5  * Earth Systems Science Computational Center (ESSCC)  * Earth Systems Science Computational Center (ESSCC)
6  * http://www.uq.edu.au/esscc  * http://www.uq.edu.au/esscc
7  *  *
# Line 17  Line 17 
17  #include "system_dep.h"  #include "system_dep.h"
18    
19  #include "DataReady.h"  #include "DataReady.h"
20    #include "WrappedArray.h"
21    
 #include <boost/python/numeric.hpp>  
22    
23  namespace escript {  namespace escript {
24    
# Line 46  typedef DataReady parent; Line 46  typedef DataReady parent;
46       \param what - Input - A description of what this data object represents.       \param what - Input - A description of what this data object represents.
47    */    */
48    ESCRIPT_DLL_API    ESCRIPT_DLL_API
49    DataConstant(const boost::python::numeric::array& value,    DataConstant(const WrappedArray& value,
50                 const FunctionSpace& what);                 const FunctionSpace& what);
51    
52    
53    /**    /**
54       \brief       \brief
55       Copy constructor. Performs a deep copy.       Copy constructor. Performs a deep copy.
# Line 56  typedef DataReady parent; Line 57  typedef DataReady parent;
57    ESCRIPT_DLL_API    ESCRIPT_DLL_API
58    DataConstant(const DataConstant& other);    DataConstant(const DataConstant& other);
59    
 //  /**  
 /*     \brief  
      Alternative constructor for DataConstant objects.  
   
      Description:  
      Alternative Constructor for DataConstant objects.  
      \param value - Input - Data value for a single point.  
      \param what - Input - A description of what this data object represents.*/  
 //  */  
 //   ESCRIPT_DLL_API  
 //   DataConstant(const DataArrayView& value,  
 //                const FunctionSpace& what);  
60    
61    /**    /**
62       \brief       \brief
# Line 105  typedef DataReady parent; Line 94  typedef DataReady parent;
94      return true;      return true;
95    };    };
96    
   
97    /**    /**
98       \brief       \brief
99       Write the data as a string.       Write the data as a string.
# Line 162  typedef DataReady parent; Line 150  typedef DataReady parent;
150    getPointOffset(int sampleNo,    getPointOffset(int sampleNo,
151                   int dataPointNo);                   int dataPointNo);
152    
 //  /**  
 /*     \brief  
      Return a view into the data for the data point specified.  
      \param sampleNo - Input - sample number.  
      \param dataPointNo - Input - data point number for the sample.*/  
 //  */  
 //   ESCRIPT_DLL_API  
 //   virtual  
 //   DataArrayView  
 //   getDataPoint(int sampleNo,  
 //                int dataPointNo);  
   
153    /**    /**
154       \brief       \brief
155       Return the number of doubles stored for the Data object.       Return the number of doubles stored for the Data object.
# Line 235  typedef DataReady parent; Line 211  typedef DataReady parent;
211       Computes the trace of a matrix       Computes the trace of a matrix
212    
213       \param ev - Output - trace of matrix       \param ev - Output - trace of matrix
214         \param axis_offset
215    
216    */    */
217    ESCRIPT_DLL_API    ESCRIPT_DLL_API
# Line 246  typedef DataReady parent; Line 223  typedef DataReady parent;
223       Transpose each data point of this Data object around the given axis.       Transpose each data point of this Data object around the given axis.
224    
225       \param ev - Output - transpose of matrix       \param ev - Output - transpose of matrix
226         \param axis_offset
227    */    */
228    ESCRIPT_DLL_API    ESCRIPT_DLL_API
229    virtual void    virtual void
# Line 257  typedef DataReady parent; Line 234  typedef DataReady parent;
234       swaps components axis0 and axis1       swaps components axis0 and axis1
235    
236       \param ev - Output - swapped components       \param ev - Output - swapped components
237         \param axis0
238         \param axis1
239    */    */
240    ESCRIPT_DLL_API    ESCRIPT_DLL_API
241    virtual void    virtual void
# Line 292  typedef DataReady parent; Line 270  typedef DataReady parent;
270    
271    
272    /**    /**
273        \brief invert square matricies
274        \param out - Where to store the results
275      */
276      ESCRIPT_DLL_API
277      virtual void
278      matrixInverse(DataAbstract* out) const;
279    
280      /**
281       \brief       \brief
282       Return a reference to the underlying DataVector.       Return a reference to the underlying DataVector.
283    */    */
284    ESCRIPT_DLL_API    ESCRIPT_DLL_API
285    DataTypes::ValueType&    DataTypes::ValueType&
286    getVector();    getVectorRW();
287    
288    
289    ESCRIPT_DLL_API    ESCRIPT_DLL_API
290    const DataTypes::ValueType&    const DataTypes::ValueType&
291    getVector() const;    getVectorRO() const;
   
292    
293   protected:   protected:
294    
# Line 313  typedef DataReady parent; Line 299  typedef DataReady parent;
299    
300  };  };
301    
 inline  
 DataTypes::ValueType&  
 DataConstant::getVector()  
 {  
   return m_data;  
 }  
   
 inline  
 const DataTypes::ValueType&  
 DataConstant::getVector() const  
 {  
   return m_data;  
 }  
   
   
302  } // end of namespace  } // end of namespace
303  #endif  #endif

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

  ViewVC Help
Powered by ViewVC 1.1.26