/[escript]/trunk/escript/src/Data.h
ViewVC logotype

Diff of /trunk/escript/src/Data.h

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

revision 757 by woo409, Mon Jun 26 13:12:56 2006 UTC revision 790 by bcumming, Wed Jul 26 23:12:34 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
800    calc_mindp(int& SampleNo,    calc_mindp(int& ProcNo,
801                            int& SampleNo,  
802               int& DataPointNo) const;               int& DataPointNo) const;
   
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 781  class Data { Line 812  class Data {
812    
813    /**    /**
814       \brief       \brief
815         Return the symmetric part of a matrix which is half the matrix plus its transpose.
816         *
817      */
818      ESCRIPT_DLL_API
819      Data
820      symmetric() const;
821    
822      /**
823         \brief
824         Return the nonsymmetric part of a matrix which is half the matrix minus its transpose.
825         *
826      */
827      ESCRIPT_DLL_API
828      Data
829      nonsymmetric() const;
830    
831      /**
832         \brief
833         Return the trace of a matrix
834         *
835      */
836      ESCRIPT_DLL_API
837      Data
838      matrixtrace(int axis_offset) const;
839    
840      /**
841         \brief
842         Transpose each data point of this Data object around the given axis.
843         *
844      */
845      ESCRIPT_DLL_API
846      Data
847      transpose(int axis_offset) const;
848    
849      /**
850         \brief
851       Return the eigenvalues of the symmetric part at each data point of this Data object in increasing values.       Return the eigenvalues of the symmetric part at each data point of this Data object in increasing values.
852       Currently this function is restricted to rank 2, square shape, and dimension 3.       Currently this function is restricted to rank 2, square shape, and dimension 3.
853       *       *
# Line 804  class Data { Line 871  class Data {
871    
872    /**    /**
873       \brief       \brief
      Transpose each data point of this Data object around the given axis.  
      --* not implemented yet *--  
      *  
   */  
   ESCRIPT_DLL_API  
   Data  
   transpose(int axis) const;  
   
   /**  
      \brief  
874       Calculate the trace of each data point of this Data object.       Calculate the trace of each data point of this Data object.
875       *       *
876    */    */
# Line 1190  class Data { Line 1247  class Data {
1247       \brief       \brief
1248       print the data values to stdout. Used for debugging       print the data values to stdout. Used for debugging
1249    */    */
1250    void print();    ESCRIPT_DLL_API
1251      void
1252        print(void);
1253    
1254      /**
1255         \brief
1256         return the MPI rank number of the local data
1257             MPI_COMM_WORLD is assumed and the result of MPI_Comm_size()
1258             is returned
1259      */
1260      ESCRIPT_DLL_API
1261        int
1262        get_MPIRank(void) const;
1263    
1264      /**
1265         \brief
1266         return the MPI rank number of the local data
1267             MPI_COMM_WORLD is assumed and the result of MPI_Comm_rank()
1268             is returned
1269      */
1270      ESCRIPT_DLL_API
1271        int
1272        get_MPISize(void) const;
1273    
1274      /**
1275         \brief
1276         return the MPI rank number of the local data
1277             MPI_COMM_WORLD is assumed and returned.
1278      */
1279      ESCRIPT_DLL_API
1280        MPI_Comm
1281        get_MPIComm(void) const;
1282        
1283   protected:   protected:
1284    
1285   private:   private:
# Line 1295  class Data { Line 1383  class Data {
1383    reshapeDataPoint(const DataArrayView::ShapeType& shape);    reshapeDataPoint(const DataArrayView::ShapeType& shape);
1384    
1385    //    //
1386      // flag to protect the data object against any update
1387      bool m_protected;
1388    
1389      //
1390    // pointer to the actual data object    // pointer to the actual data object
1391    boost::shared_ptr<DataAbstract> m_data;    boost::shared_ptr<DataAbstract> m_data;
1392    

Legend:
Removed from v.757  
changed lines
  Added in v.790

  ViewVC Help
Powered by ViewVC 1.1.26