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

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

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

revision 914 by gross, Thu Dec 14 04:38:18 2006 UTC revision 971 by ksteube, Wed Feb 14 04:40:49 2007 UTC
# Line 264  class Data { Line 264  class Data {
264    
265    /**    /**
266       \brief       \brief
267       Return the values of all data-points for the given sample as a single python numarray object.       Fills the expanded Data object from values of a python numarray object.
268    */    */
269    ESCRIPT_DLL_API    ESCRIPT_DLL_API
270    const boost::python::numeric::array    void
271    convertToNumArrayFromSampleNo(int sampleNo);    fillFromNumArray(const boost::python::numeric::array);
272    
273    /**    /**
274       \brief       \brief
275       Return the value of the specified data-point as a single python numarray object.       Return the values of a data point on this process
276    */    */
277    ESCRIPT_DLL_API    ESCRIPT_DLL_API
278    const boost::python::numeric::array    const boost::python::numeric::array
279    convertToNumArrayFromDPNo(int procNo,    getValueOfDataPoint(int dataPointNo);
280                  int sampleNo,  
                 int dataPointNo);  
281    /**    /**
282       \brief       \brief
283       Fills the expanded Data object from values of a python numarray object.       sets the values of a data-point on this process
284    */    */
285    ESCRIPT_DLL_API    ESCRIPT_DLL_API
286    void    void
287    fillFromNumArray(const boost::python::numeric::array);    setValueOfDataPointToArray(int dataPointNo, const boost::python::numeric::array);
288    
289      /**
290         \brief
291         sets the values of a data-point on this process
292      */
293      ESCRIPT_DLL_API
294      void
295      setValueOfDataPoint(int dataPointNo, const double);
296    
297      /**
298         \brief
299         Return the value of the specified data-point across all processors
300      */
301      ESCRIPT_DLL_API
302      const boost::python::numeric::array
303      getValueOfGlobalDataPoint(int procNo, int dataPointNo);
304    
305    /**    /**
306       \brief       \brief
# Line 445  class Data { Line 460  class Data {
460    
461    /**    /**
462       \brief       \brief
463         Return the number of data points
464      */
465      ESCRIPT_DLL_API
466      inline
467      int
468      getNumDataPoints() const
469      {
470        return getNumSamples() * getNumDataPointsPerSample();
471      }
472      /**
473         \brief
474       Return the number of samples.       Return the number of samples.
475    */    */
476    ESCRIPT_DLL_API    ESCRIPT_DLL_API
# Line 466  class Data { Line 492  class Data {
492    {    {
493      return m_data->getNumDPPSample();      return m_data->getNumDPPSample();
494    }    }
495      /**
496         \brief
497         dumps the object into a netCDF file
498      */
499      ESCRIPT_DLL_API
500      inline
501      void
502      dump(const std::string fileName) const
503      {
504        return m_data->dump(fileName);
505      }
506    
507    /**    /**
508       \brief       \brief
# Line 497  class Data { Line 534  class Data {
534    
535    /**    /**
536       \brief       \brief
      Assign the given value to the data-points referenced by the given  
      reference number.  
   
      The value supplied is a python numarray object.  The data from this numarray  
      is unpacked into a DataArray, and this is used to set the corresponding  
      data-points in the underlying Data object.  
   
      If the underlying Data object cannot be accessed via reference numbers, an  
      exception will be thrown.  
   
      \param ref - Input - reference number.  
      \param value - Input - value to assign to data-points associated with  
                             the given reference number.  
   */  
   ESCRIPT_DLL_API  
   void  
   setRefValue(int ref,  
               const boost::python::numeric::array& value);  
   
   /**  
      \brief  
      Return the values associated with the data-points referenced by the given  
      reference number.  
   
      The value supplied is a python numarray object. The data from the corresponding  
      data-points in this Data object are packed into the given numarray object.  
   
      If the underlying Data object cannot be accessed via reference numbers, an  
      exception will be thrown.  
   
      \param ref - Input - reference number.  
      \param value - Output - object to receive values from data-points  
                              associated with the given reference number.  
   */  
   ESCRIPT_DLL_API  
   void  
   getRefValue(int ref,  
               boost::python::numeric::array& value);  
   
   /**  
      \brief  
537       Return a view into the data for the data point specified.       Return a view into the data for the data point specified.
538       NOTE: Construction of the DataArrayView is a relatively expensive       NOTE: Construction of the DataArrayView is a relatively expensive
539       operation.       operation.
# Line 792  class Data { Line 788  class Data {
788    */    */
789    ESCRIPT_DLL_API    ESCRIPT_DLL_API
790    const boost::python::tuple    const boost::python::tuple
791    mindp() const;    minGlobalDataPoint() const;
792    
793    ESCRIPT_DLL_API    ESCRIPT_DLL_API
794    void    void
795    calc_mindp(int& ProcNo,    calc_minGlobalDataPoint(int& ProcNo,  int& DataPointNo) const;
                         int& SampleNo,    
              int& DataPointNo) const;  
796    /**    /**
797       \brief       \brief
798       Return the sign of each data point of this Data object.       Return the sign of each data point of this Data object.

Legend:
Removed from v.914  
changed lines
  Added in v.971

  ViewVC Help
Powered by ViewVC 1.1.26