/[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 789 by dhawcroft, Wed Jul 26 05:41:11 2006 UTC
# Line 234  class Data { Line 234  class Data {
234    
235    /**    /**
236       \brief       \brief
237         switches on update protection
238    
239      */
240      ESCRIPT_DLL_API
241      void
242      setProtection();
243    
244      /**
245         \brief
246         Returns trueif the data object is protected against update
247    
248      */
249      ESCRIPT_DLL_API
250      bool
251      isProtected() const;
252      /**
253         \brief
254       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.
255    */    */
256    ESCRIPT_DLL_API    ESCRIPT_DLL_API
# Line 252  class Data { Line 269  class Data {
269       \brief       \brief
270       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.
271    */    */
272    #ifndef PASO_MPI  
273    ESCRIPT_DLL_API    ESCRIPT_DLL_API
274    const boost::python::numeric::array    const boost::python::numeric::array
275    convertToNumArrayFromDPNo(int sampleNo,    convertToNumArrayFromDPNo(int sampleNo,
276                              int dataPointNo);                              int dataPointNo);
277    #else
278      ESCRIPT_DLL_API
279      const boost::python::numeric::array
280      convertToNumArrayFromDPNo(int procNo,
281                    int sampleNo,
282                    int dataPointNo);
283    #endif
284    
285    
286    /**    /**
287       \brief       \brief
# Line 766  class Data { Line 792  class Data {
792    
793    ESCRIPT_DLL_API    ESCRIPT_DLL_API
794    void    void
795    #ifndef PASO_MPI
796    calc_mindp(int& SampleNo,    calc_mindp(int& SampleNo,
797               int& DataPointNo) const;               int& DataPointNo) const;
798    #else
799      calc_mindp(int& ProcNo,
800                            int& SampleNo,  
801                 int& DataPointNo) const;
802    #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 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 1186  class Data { Line 1243  class Data {
1243                const FunctionSpace& fspace);                const FunctionSpace& fspace);
1244    
1245    
1246    #ifdef PASO_MPI
1247    /**    /**
1248       \brief       \brief
1249       print the data values to stdout. Used for debugging       print the data values to stdout. Used for debugging
1250    */    */
1251    void print();    ESCRIPT_DLL_API
1252      void
1253        print(void);
1254    
1255      /**
1256         \brief
1257         return the MPI rank number of the local data
1258             MPI_COMM_WORLD is assumed and the result of MPI_Comm_size()
1259             is returned
1260      */
1261      ESCRIPT_DLL_API
1262        int
1263        get_MPIRank(void) const;
1264    
1265      /**
1266         \brief
1267         return the MPI rank number of the local data
1268             MPI_COMM_WORLD is assumed and the result of MPI_Comm_rank()
1269             is returned
1270      */
1271      ESCRIPT_DLL_API
1272        int
1273        get_MPISize(void) const;
1274    
1275      /**
1276         \brief
1277         return the MPI rank number of the local data
1278             MPI_COMM_WORLD is assumed and returned.
1279      */
1280      ESCRIPT_DLL_API
1281        MPI_Comm
1282        get_MPIComm(void) const;
1283    #endif
1284        
1285   protected:   protected:
1286    
1287   private:   private:
# Line 1295  class Data { Line 1385  class Data {
1385    reshapeDataPoint(const DataArrayView::ShapeType& shape);    reshapeDataPoint(const DataArrayView::ShapeType& shape);
1386    
1387    //    //
1388      // flag to protect the data object against any update
1389      bool m_protected;
1390    
1391      //
1392    // pointer to the actual data object    // pointer to the actual data object
1393    boost::shared_ptr<DataAbstract> m_data;    boost::shared_ptr<DataAbstract> m_data;
1394    

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

  ViewVC Help
Powered by ViewVC 1.1.26