/[escript]/branches/trilinos_from_5897/escriptcore/src/DataConstant.h
ViewVC logotype

Diff of /branches/trilinos_from_5897/escriptcore/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 2548 by jfenwick, Mon Jul 20 06:20:06 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    
22  #include <boost/python/numeric.hpp>  #include <boost/python/numeric.hpp>
23    
# Line 46  typedef DataReady parent; Line 47  typedef DataReady parent;
47       \param what - Input - A description of what this data object represents.       \param what - Input - A description of what this data object represents.
48    */    */
49    ESCRIPT_DLL_API    ESCRIPT_DLL_API
50    DataConstant(const boost::python::numeric::array& value,    DataConstant(const WrappedArray& value,
51                 const FunctionSpace& what);                 const FunctionSpace& what);
52    
53    
54    /**    /**
55       \brief       \brief
56       Copy constructor. Performs a deep copy.       Copy constructor. Performs a deep copy.
# Line 56  typedef DataReady parent; Line 58  typedef DataReady parent;
58    ESCRIPT_DLL_API    ESCRIPT_DLL_API
59    DataConstant(const DataConstant& other);    DataConstant(const DataConstant& other);
60    
 //  /**  
 /*     \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);  
61    
62    /**    /**
63       \brief       \brief
# Line 162  typedef DataReady parent; Line 152  typedef DataReady parent;
152    getPointOffset(int sampleNo,    getPointOffset(int sampleNo,
153                   int dataPointNo);                   int dataPointNo);
154    
 //  /**  
 /*     \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);  
   
155    /**    /**
156       \brief       \brief
157       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 213  typedef DataReady parent;
213       Computes the trace of a matrix       Computes the trace of a matrix
214    
215       \param ev - Output - trace of matrix       \param ev - Output - trace of matrix
216         \param axis_offset
217    
218    */    */
219    ESCRIPT_DLL_API    ESCRIPT_DLL_API
# Line 246  typedef DataReady parent; Line 225  typedef DataReady parent;
225       Transpose each data point of this Data object around the given axis.       Transpose each data point of this Data object around the given axis.
226    
227       \param ev - Output - transpose of matrix       \param ev - Output - transpose of matrix
228         \param axis_offset
229    */    */
230    ESCRIPT_DLL_API    ESCRIPT_DLL_API
231    virtual void    virtual void
# Line 257  typedef DataReady parent; Line 236  typedef DataReady parent;
236       swaps components axis0 and axis1       swaps components axis0 and axis1
237    
238       \param ev - Output - swapped components       \param ev - Output - swapped components
239         \param axis0
240         \param axis1
241    */    */
242    ESCRIPT_DLL_API    ESCRIPT_DLL_API
243    virtual void    virtual void
# Line 297  typedef DataReady parent; Line 277  typedef DataReady parent;
277    */    */
278    ESCRIPT_DLL_API    ESCRIPT_DLL_API
279    DataTypes::ValueType&    DataTypes::ValueType&
280    getVector();    getVectorRW();
281    
282    
283    ESCRIPT_DLL_API    ESCRIPT_DLL_API
284    const DataTypes::ValueType&    const DataTypes::ValueType&
285    getVector() const;    getVectorRO() const;
   
286    
287   protected:   protected:
288    
# Line 313  typedef DataReady parent; Line 293  typedef DataReady parent;
293    
294  };  };
295    
 inline  
 DataTypes::ValueType&  
 DataConstant::getVector()  
 {  
   return m_data;  
 }  
   
 inline  
 const DataTypes::ValueType&  
 DataConstant::getVector() const  
 {  
   return m_data;  
 }  
   
   
296  } // end of namespace  } // end of namespace
297  #endif  #endif

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

  ViewVC Help
Powered by ViewVC 1.1.26