/[escript]/branches/windows_from_1383_trunk/escript/src/Data.h
ViewVC logotype

Diff of /branches/windows_from_1383_trunk/escript/src/Data.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 782 by bcumming, Tue Jul 18 00:47:47 2006 UTC revision 813 by ksteube, Mon Aug 21 02:08:47 2006 UTC
# Line 29  extern "C" { Line 29  extern "C" {
29  #include "paso/Paso.h"  #include "paso/Paso.h"
30  }  }
31    
32    #ifndef PASO_MPI
33    #define MPI_Comm long
34    #endif
35    
36  #include <string>  #include <string>
37  #include <algorithm>  #include <algorithm>
38    
# Line 234  class Data { Line 238  class Data {
238    
239    /**    /**
240       \brief       \brief
241         switches on update protection
242    
243      */
244      ESCRIPT_DLL_API
245      void
246      setProtection();
247    
248      /**
249         \brief
250         Returns trueif the data object is protected against update
251    
252      */
253      ESCRIPT_DLL_API
254      bool
255      isProtected() const;
256      /**
257         \brief
258       Return the values of all data-points as a single python numarray object.       Return the values of all data-points as a single python numarray object.
259    */    */
260    ESCRIPT_DLL_API    ESCRIPT_DLL_API
# Line 252  class Data { Line 273  class Data {
273       \brief       \brief
274       Return the value of the specified data-point as a single python numarray object.       Return the value of the specified data-point as a single python numarray object.
275    */    */
276    #ifndef PASO_MPI  
277    ESCRIPT_DLL_API    ESCRIPT_DLL_API
278    const boost::python::numeric::array    const boost::python::numeric::array
279    convertToNumArrayFromDPNo(int sampleNo,    convertToNumArrayFromDPNo(int ProcNo,
280                                                            int sampleNo,
281                              int dataPointNo);                              int dataPointNo);
282    #else
283      ESCRIPT_DLL_API
284      const boost::python::numeric::array
285      convertToNumArrayFromDPNo(int procNo,
286                    int sampleNo,
287                    int dataPointNo);
288    #endif
289    
290    
291    /**    /**
292       \brief       \brief
# Line 528  class Data { Line 559  class Data {
559    getDataPoint(int sampleNo,    getDataPoint(int sampleNo,
560                 int dataPointNo)                 int dataPointNo)
561    {    {
562      return m_data->getDataPoint(sampleNo,dataPointNo);          return m_data->getDataPoint(sampleNo,dataPointNo);
563    }    }
564    
565    /**    /**
# Line 766  class Data { Line 797  class Data {
797    
798    ESCRIPT_DLL_API    ESCRIPT_DLL_API
799    void    void
 #ifndef PASO_MPI  
   calc_mindp(int& SampleNo,  
              int& DataPointNo) const;  
 #else  
800    calc_mindp(int& ProcNo,    calc_mindp(int& ProcNo,
801                          int& SampleNo,                            int& SampleNo,  
802               int& DataPointNo) const;               int& DataPointNo) const;
 #endif  
803    /**    /**
804       \brief       \brief
805       Return the sign of each data point of this Data object.       Return the sign of each data point of this Data object.
# Line 809  class Data { Line 835  class Data {
835    */    */
836    ESCRIPT_DLL_API    ESCRIPT_DLL_API
837    Data    Data
838    matrixtrace(int axis_offset) const;    trace(int axis_offset) const;
839    
840    /**    /**
841       \brief       \brief
# Line 845  class Data { Line 871  class Data {
871    
872    /**    /**
873       \brief       \brief
874       Calculate the trace of each data point of this Data object.       swaps the components axis0 and axis1
875       *       *
876    */    */
877    ESCRIPT_DLL_API    ESCRIPT_DLL_API
878    Data    Data
879    trace() const;    swapaxes(const int axis0, const int axis1) const;
880    
881    /**    /**
882       \brief       \brief
# Line 1217  class Data { Line 1243  class Data {
1243                const FunctionSpace& fspace);                const FunctionSpace& fspace);
1244    
1245    
 #ifdef PASO_MPI  
1246    /**    /**
1247       \brief       \brief
1248       print the data values to stdout. Used for debugging       print the data values to stdout. Used for debugging
# Line 1254  class Data { Line 1279  class Data {
1279    ESCRIPT_DLL_API    ESCRIPT_DLL_API
1280      MPI_Comm      MPI_Comm
1281      get_MPIComm(void) const;      get_MPIComm(void) const;
1282  #endif  
1283          /**
1284         \brief
1285         return the object produced by the factory, which is a DataConstant or DataExpanded
1286      */
1287      ESCRIPT_DLL_API
1288        DataAbstract*
1289        borrowData(void) const;
1290    
1291   protected:   protected:
1292    
1293   private:   private:
# Line 1359  class Data { Line 1391  class Data {
1391    reshapeDataPoint(const DataArrayView::ShapeType& shape);    reshapeDataPoint(const DataArrayView::ShapeType& shape);
1392    
1393    //    //
1394      // flag to protect the data object against any update
1395      bool m_protected;
1396    
1397      //
1398    // pointer to the actual data object    // pointer to the actual data object
1399    boost::shared_ptr<DataAbstract> m_data;    boost::shared_ptr<DataAbstract> m_data;
1400    
# Line 1494  ESCRIPT_DLL_API std::ostream& operator<< Line 1530  ESCRIPT_DLL_API std::ostream& operator<<
1530    
1531  /**  /**
1532    \brief    \brief
1533      Compute a tensor product of two Data objects
1534      \param arg0 - Input - Data object
1535      \param arg1 - Input - Data object
1536      \param axis_offset - Input - axis offset
1537      \param transpose - Input - 0: transpose neither, 1: transpose arg0, 2: transpose arg1
1538    */
1539    ESCRIPT_DLL_API
1540    Data
1541    C_GeneralTensorProduct(Data& arg0,
1542                         Data& arg1,
1543                         int axis_offset=0,
1544                         int transpose=0);
1545    
1546    /**
1547      \brief
1548    Return true if operands are equivalent, else return false.    Return true if operands are equivalent, else return false.
1549    NB: this operator does very little at this point, and isn't to    NB: this operator does very little at this point, and isn't to
1550    be relied on. Requires further implementation.    be relied on. Requires further implementation.

Legend:
Removed from v.782  
changed lines
  Added in v.813

  ViewVC Help
Powered by ViewVC 1.1.26