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

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

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

trunk/escript/src/Data.h revision 734 by gross, Fri Mar 31 06:27:56 2006 UTC branches/intelc_win32/escript/src/Data.h revision 742 by woo409, Sat Jun 24 11:27:16 2006 UTC
# Line 15  Line 15 
15    
16  #ifndef DATA_H  #ifndef DATA_H
17  #define DATA_H  #define DATA_H
18    #include "system_dep.h"
19    
20  #include "DataAbstract.h"  #include "DataAbstract.h"
21  #include "DataAlgorithm.h"  #include "DataAlgorithm.h"
# Line 23  Line 24 
24  #include "UnaryOp.h"  #include "UnaryOp.h"
25  #include "DataException.h"  #include "DataException.h"
26    
27  extern "C" {  //extern "C" {
28  #include "DataC.h"  #include "DataC.h"
29  }  //}
30    
31  #include <string>  #include <string>
32  #include <algorithm>  #include <algorithm>
# Line 73  class Data { Line 74  class Data {
74       Default constructor.       Default constructor.
75       Creates a DataEmpty object.       Creates a DataEmpty object.
76    */    */
77      ESCRIPT_DLL_API
78    Data();    Data();
79    
80    /**    /**
# Line 80  class Data { Line 82  class Data {
82       Copy constructor.       Copy constructor.
83       WARNING: Only performs a shallow copy.       WARNING: Only performs a shallow copy.
84    */    */
85      ESCRIPT_DLL_API
86    Data(const Data& inData);    Data(const Data& inData);
87    
88    /**    /**
# Line 88  class Data { Line 91  class Data {
91       function space of inData the inData are tried to be interpolated to what,       function space of inData the inData are tried to be interpolated to what,
92       otherwise a shallow copy of inData is returned.       otherwise a shallow copy of inData is returned.
93    */    */
94      ESCRIPT_DLL_API
95    Data(const Data& inData,    Data(const Data& inData,
96         const FunctionSpace& what);         const FunctionSpace& what);
97    
# Line 101  class Data { Line 105  class Data {
105                         the value. Otherwise a more efficient storage                         the value. Otherwise a more efficient storage
106                         mechanism will be used.                         mechanism will be used.
107    */    */
108      ESCRIPT_DLL_API
109    Data(const DataArrayView& value,    Data(const DataArrayView& value,
110         const FunctionSpace& what=FunctionSpace(),         const FunctionSpace& what=FunctionSpace(),
111         bool expanded=false);         bool expanded=false);
# Line 116  class Data { Line 121  class Data {
121                         the given value. Otherwise a more efficient storage                         the given value. Otherwise a more efficient storage
122                         mechanism will be used.                         mechanism will be used.
123    */    */
124      ESCRIPT_DLL_API
125    Data(double value,    Data(double value,
126         const DataArrayView::ShapeType& dataPointShape=DataArrayView::ShapeType(),         const DataArrayView::ShapeType& dataPointShape=DataArrayView::ShapeType(),
127         const FunctionSpace& what=FunctionSpace(),         const FunctionSpace& what=FunctionSpace(),
# Line 128  class Data { Line 134  class Data {
134       \param inData - Input - Input Data object.       \param inData - Input - Input Data object.
135       \param region - Input - Region to copy.       \param region - Input - Region to copy.
136    */    */
137      ESCRIPT_DLL_API
138    Data(const Data& inData,    Data(const Data& inData,
139         const DataArrayView::RegionType& region);         const DataArrayView::RegionType& region);
140    
# Line 145  class Data { Line 152  class Data {
152                         the appropriate values.                         the appropriate values.
153      ==>*      ==>*
154    */    */
155      ESCRIPT_DLL_API
156    Data(const DataTagged::TagListType& tagKeys,    Data(const DataTagged::TagListType& tagKeys,
157         const DataTagged::ValueListType& values,         const DataTagged::ValueListType& values,
158         const DataArrayView& defaultValue,         const DataArrayView& defaultValue,
# Line 161  class Data { Line 169  class Data {
169                         the value. Otherwise a more efficient storage                         the value. Otherwise a more efficient storage
170                         mechanism will be used.                         mechanism will be used.
171    */    */
172      ESCRIPT_DLL_API
173    Data(const boost::python::numeric::array& value,    Data(const boost::python::numeric::array& value,
174         const FunctionSpace& what=FunctionSpace(),         const FunctionSpace& what=FunctionSpace(),
175         bool expanded=false);         bool expanded=false);
# Line 176  class Data { Line 185  class Data {
185                         the value. Otherwise a more efficient storage                         the value. Otherwise a more efficient storage
186                         mechanism will be used.                         mechanism will be used.
187    */    */
188      ESCRIPT_DLL_API
189    Data(const boost::python::object& value,    Data(const boost::python::object& value,
190         const FunctionSpace& what=FunctionSpace(),         const FunctionSpace& what=FunctionSpace(),
191         bool expanded=false);         bool expanded=false);
# Line 189  class Data { Line 199  class Data {
199       \param value - Input - Input data.       \param value - Input - Input data.
200       \param other - Input - contains all other parameters.       \param other - Input - contains all other parameters.
201    */    */
202      ESCRIPT_DLL_API
203    Data(const boost::python::object& value,    Data(const boost::python::object& value,
204         const Data& other);         const Data& other);
205    
# Line 196  class Data { Line 207  class Data {
207       \brief       \brief
208       Constructor which creates a DataConstant of "shape" with constant value.       Constructor which creates a DataConstant of "shape" with constant value.
209    */    */
210      ESCRIPT_DLL_API
211    Data(double value,    Data(double value,
212         const boost::python::tuple& shape=boost::python::make_tuple(),         const boost::python::tuple& shape=boost::python::make_tuple(),
213         const FunctionSpace& what=FunctionSpace(),         const FunctionSpace& what=FunctionSpace(),
# Line 204  class Data { Line 216  class Data {
216       \brief       \brief
217       Destructor       Destructor
218    */    */
219      ESCRIPT_DLL_API
220    ~Data();    ~Data();
221    
222    /**    /**
223       \brief       \brief
224       Perform a deep copy.       Perform a deep copy.
225    */    */
226      ESCRIPT_DLL_API
227    void    void
228    copy(const Data& other);    copy(const Data& other);
229    
# Line 221  class Data { Line 235  class Data {
235       \brief       \brief
236       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.
237    */    */
238      ESCRIPT_DLL_API
239    const boost::python::numeric::array    const boost::python::numeric::array
240    convertToNumArray();    convertToNumArray();
241    
# Line 228  class Data { Line 243  class Data {
243       \brief       \brief
244       Return the values of all data-points for the given sample as a single python numarray object.       Return the values of all data-points for the given sample as a single python numarray object.
245    */    */
246      ESCRIPT_DLL_API
247    const boost::python::numeric::array    const boost::python::numeric::array
248    convertToNumArrayFromSampleNo(int sampleNo);    convertToNumArrayFromSampleNo(int sampleNo);
249    
# Line 235  class Data { Line 251  class Data {
251       \brief       \brief
252       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.
253    */    */
254      ESCRIPT_DLL_API
255    const boost::python::numeric::array    const boost::python::numeric::array
256    convertToNumArrayFromDPNo(int sampleNo,    convertToNumArrayFromDPNo(int sampleNo,
257                              int dataPointNo);                              int dataPointNo);
# Line 243  class Data { Line 260  class Data {
260       \brief       \brief
261       Fills the expanded Data object from values of a python numarray object.       Fills the expanded Data object from values of a python numarray object.
262    */    */
263      ESCRIPT_DLL_API
264    void    void
265    fillFromNumArray(const boost::python::numeric::array);    fillFromNumArray(const boost::python::numeric::array);
266    
# Line 253  class Data { Line 271  class Data {
271       The data-point number here corresponds to the data-point number in the       The data-point number here corresponds to the data-point number in the
272       numarray returned by convertToNumArray.       numarray returned by convertToNumArray.
273    */    */
274      ESCRIPT_DLL_API
275    int    int
276    getTagNumber(int dpno);    getTagNumber(int dpno);
277    
# Line 260  class Data { Line 279  class Data {
279       \brief       \brief
280       Return the C wrapper for the Data object.       Return the C wrapper for the Data object.
281    */    */
282      ESCRIPT_DLL_API
283    escriptDataC    escriptDataC
284    getDataC();    getDataC();
285    
# Line 267  class Data { Line 287  class Data {
287       \brief       \brief
288       Return the C wrapper for the Data object - const version.       Return the C wrapper for the Data object - const version.
289    */    */
290      ESCRIPT_DLL_API
291    escriptDataC    escriptDataC
292    getDataC() const;    getDataC() const;
293    
# Line 274  class Data { Line 295  class Data {
295       \brief       \brief
296       Write the data as a string.       Write the data as a string.
297    */    */
298      ESCRIPT_DLL_API
299    inline    inline
300    std::string    std::string
301    toString() const    toString() const
# Line 287  class Data { Line 309  class Data {
309       the shape information for each data point although it also may be used       the shape information for each data point although it also may be used
310       to manipulate the point data.       to manipulate the point data.
311    */    */
312      ESCRIPT_DLL_API
313    inline    inline
314    const DataArrayView&    const DataArrayView&
315    getPointDataView() const    getPointDataView() const
# Line 298  class Data { Line 321  class Data {
321       \brief       \brief
322       Whatever the current Data type make this into a DataExpanded.       Whatever the current Data type make this into a DataExpanded.
323    */    */
324      ESCRIPT_DLL_API
325    void    void
326    expand();    expand();
327    
# Line 308  class Data { Line 332  class Data {
332       Expanded data to tagged will throw an exception.       Expanded data to tagged will throw an exception.
333      ==>*      ==>*
334    */    */
335      ESCRIPT_DLL_API
336    void    void
337    tag();    tag();
338    
# Line 315  class Data { Line 340  class Data {
340       \brief       \brief
341       Return true if this Data is expanded.       Return true if this Data is expanded.
342    */    */
343      ESCRIPT_DLL_API
344    bool    bool
345    isExpanded() const;    isExpanded() const;
346    
# Line 322  class Data { Line 348  class Data {
348       \brief       \brief
349       Return true if this Data is tagged.       Return true if this Data is tagged.
350    */    */
351      ESCRIPT_DLL_API
352    bool    bool
353    isTagged() const;    isTagged() const;
354    
# Line 329  class Data { Line 356  class Data {
356       \brief       \brief
357       Return true if this Data is constant.       Return true if this Data is constant.
358    */    */
359      ESCRIPT_DLL_API
360    bool    bool
361    isConstant() const;    isConstant() const;
362    
# Line 336  class Data { Line 364  class Data {
364       \brief       \brief
365       Return true if this Data is empty.       Return true if this Data is empty.
366    */    */
367      ESCRIPT_DLL_API
368    bool    bool
369    isEmpty() const;    isEmpty() const;
370    
# Line 343  class Data { Line 372  class Data {
372       \brief       \brief
373       Return the function space.       Return the function space.
374    */    */
375      ESCRIPT_DLL_API
376    inline    inline
377    const FunctionSpace&    const FunctionSpace&
378    getFunctionSpace() const    getFunctionSpace() const
# Line 354  class Data { Line 384  class Data {
384       \brief       \brief
385       Return a copy of the function space.       Return a copy of the function space.
386    */    */
387      ESCRIPT_DLL_API
388    const FunctionSpace    const FunctionSpace
389    getCopyOfFunctionSpace() const;    getCopyOfFunctionSpace() const;
390    
# Line 361  class Data { Line 392  class Data {
392       \brief       \brief
393       Return the domain.       Return the domain.
394    */    */
395      ESCRIPT_DLL_API
396    inline    inline
397    const AbstractDomain&    const AbstractDomain&
398    getDomain() const    getDomain() const
# Line 372  class Data { Line 404  class Data {
404       \brief       \brief
405       Return a copy of the domain.       Return a copy of the domain.
406    */    */
407      ESCRIPT_DLL_API
408    const AbstractDomain    const AbstractDomain
409    getCopyOfDomain() const;    getCopyOfDomain() const;
410    
# Line 379  class Data { Line 412  class Data {
412       \brief       \brief
413       Return the rank of the point data.       Return the rank of the point data.
414    */    */
415      ESCRIPT_DLL_API
416    inline    inline
417    int    int
418    getDataPointRank() const    getDataPointRank() const
# Line 390  class Data { Line 424  class Data {
424       \brief       \brief
425       Return the number of samples.       Return the number of samples.
426    */    */
427      ESCRIPT_DLL_API
428    inline    inline
429    int    int
430    getNumSamples() const    getNumSamples() const
# Line 401  class Data { Line 436  class Data {
436       \brief       \brief
437       Return the number of data points per sample.       Return the number of data points per sample.
438    */    */
439      ESCRIPT_DLL_API
440    inline    inline
441    int    int
442    getNumDataPointsPerSample() const    getNumDataPointsPerSample() const
# Line 414  class Data { Line 450  class Data {
450       preferred interface but is provided for use by C code.       preferred interface but is provided for use by C code.
451       \param sampleNo - Input - the given sample no.       \param sampleNo - Input - the given sample no.
452    */    */
453      ESCRIPT_DLL_API
454    inline    inline
455    DataAbstract::ValueType::value_type*    DataAbstract::ValueType::value_type*
456    getSampleData(DataAbstract::ValueType::size_type sampleNo)    getSampleData(DataAbstract::ValueType::size_type sampleNo)
# Line 427  class Data { Line 464  class Data {
464       access data that isn't tagged an exception will be thrown.       access data that isn't tagged an exception will be thrown.
465       \param tag - Input - the tag key.       \param tag - Input - the tag key.
466    */    */
467      ESCRIPT_DLL_API
468    inline    inline
469    DataAbstract::ValueType::value_type*    DataAbstract::ValueType::value_type*
470    getSampleDataByTag(int tag)    getSampleDataByTag(int tag)
# Line 450  class Data { Line 488  class Data {
488       \param value - Input - value to assign to data-points associated with       \param value - Input - value to assign to data-points associated with
489                              the given reference number.                              the given reference number.
490    */    */
491      ESCRIPT_DLL_API
492    void    void
493    setRefValue(int ref,    setRefValue(int ref,
494                const boost::python::numeric::array& value);                const boost::python::numeric::array& value);
# Line 469  class Data { Line 508  class Data {
508       \param value - Output - object to receive values from data-points       \param value - Output - object to receive values from data-points
509                               associated with the given reference number.                               associated with the given reference number.
510    */    */
511      ESCRIPT_DLL_API
512    void    void
513    getRefValue(int ref,    getRefValue(int ref,
514                boost::python::numeric::array& value);                boost::python::numeric::array& value);
# Line 481  class Data { Line 521  class Data {
521       \param sampleNo - Input -       \param sampleNo - Input -
522       \param dataPointNo - Input -       \param dataPointNo - Input -
523    */    */
524      ESCRIPT_DLL_API
525    inline    inline
526    DataArrayView    DataArrayView
527    getDataPoint(int sampleNo,    getDataPoint(int sampleNo,
# Line 493  class Data { Line 534  class Data {
534       \brief       \brief
535       Return a reference to the data point shape.       Return a reference to the data point shape.
536    */    */
537      ESCRIPT_DLL_API
538    const DataArrayView::ShapeType&    const DataArrayView::ShapeType&
539    getDataPointShape() const;    getDataPointShape() const;
540    
# Line 500  class Data { Line 542  class Data {
542       \brief       \brief
543       Return the data point shape as a tuple of integers.       Return the data point shape as a tuple of integers.
544    */    */
545      ESCRIPT_DLL_API
546    const boost::python::tuple    const boost::python::tuple
547    getShapeTuple() const;    getShapeTuple() const;
548    
# Line 508  class Data { Line 551  class Data {
551       Return the size of the data point. It is the product of the       Return the size of the data point. It is the product of the
552       data point shape dimensions.       data point shape dimensions.
553    */    */
554      ESCRIPT_DLL_API
555    int    int
556    getDataPointSize() const;    getDataPointSize() const;
557    
# Line 515  class Data { Line 559  class Data {
559       \brief       \brief
560       Return the number of doubles stored for this Data.       Return the number of doubles stored for this Data.
561    */    */
562      ESCRIPT_DLL_API
563    DataArrayView::ValueType::size_type    DataArrayView::ValueType::size_type
564    getLength() const;    getLength() const;
565    
# Line 527  class Data { Line 572  class Data {
572       \param value - Input - Value to associate with given key.       \param value - Input - Value to associate with given key.
573      ==>*      ==>*
574    */    */
575      ESCRIPT_DLL_API
576    void    void
577    setTaggedValue(int tagKey,    setTaggedValue(int tagKey,
578                   const boost::python::object& value);                   const boost::python::object& value);
# Line 540  class Data { Line 586  class Data {
586       \param value - Input - Value to associate with given key.       \param value - Input - Value to associate with given key.
587      ==>*      ==>*
588    */    */
589      ESCRIPT_DLL_API
590    void    void
591    setTaggedValueFromCPP(int tagKey,    setTaggedValueFromCPP(int tagKey,
592                          const DataArrayView& value);                          const DataArrayView& value);
# Line 548  class Data { Line 595  class Data {
595      \brief      \brief
596      Copy other Data object into this Data object where mask is positive.      Copy other Data object into this Data object where mask is positive.
597    */    */
598      ESCRIPT_DLL_API
599    void    void
600    copyWithMask(const Data& other,    copyWithMask(const Data& other,
601                 const Data& mask);                 const Data& mask);
# Line 562  class Data { Line 610  class Data {
610       the result as a Data object.       the result as a Data object.
611       *       *
612    */    */
613      ESCRIPT_DLL_API
614    Data    Data
615    interpolate(const FunctionSpace& functionspace) const;    interpolate(const FunctionSpace& functionspace) const;
616    
# Line 571  class Data { Line 620  class Data {
620       If functionspace is not present the function space of Function(getDomain()) is used.       If functionspace is not present the function space of Function(getDomain()) is used.
621       *       *
622    */    */
623      ESCRIPT_DLL_API
624    Data    Data
625    gradOn(const FunctionSpace& functionspace) const;    gradOn(const FunctionSpace& functionspace) const;
626    
627      ESCRIPT_DLL_API
628    Data    Data
629    grad() const;    grad() const;
630    
# Line 582  class Data { Line 633  class Data {
633       Calculate the integral over the function space domain.       Calculate the integral over the function space domain.
634       *       *
635    */    */
636      ESCRIPT_DLL_API
637    boost::python::numeric::array    boost::python::numeric::array
638    integrate() const;    integrate() const;
639    
# Line 590  class Data { Line 642  class Data {
642       Return a Data with a 1 for +ive values and a 0 for 0 or -ive values.       Return a Data with a 1 for +ive values and a 0 for 0 or -ive values.
643       *       *
644    */    */
645      ESCRIPT_DLL_API
646    Data    Data
647    wherePositive() const;    wherePositive() const;
648    
# Line 598  class Data { Line 651  class Data {
651       Return a Data with a 1 for -ive values and a 0 for +ive or 0 values.       Return a Data with a 1 for -ive values and a 0 for +ive or 0 values.
652       *       *
653    */    */
654      ESCRIPT_DLL_API
655    Data    Data
656    whereNegative() const;    whereNegative() const;
657    
# Line 606  class Data { Line 660  class Data {
660       Return a Data with a 1 for +ive or 0 values and a 0 for -ive values.       Return a Data with a 1 for +ive or 0 values and a 0 for -ive values.
661       *       *
662    */    */
663      ESCRIPT_DLL_API
664    Data    Data
665    whereNonNegative() const;    whereNonNegative() const;
666    
# Line 614  class Data { Line 669  class Data {
669       Return a Data with a 1 for -ive or 0 values and a 0 for +ive values.       Return a Data with a 1 for -ive or 0 values and a 0 for +ive values.
670       *       *
671    */    */
672      ESCRIPT_DLL_API
673    Data    Data
674    whereNonPositive() const;    whereNonPositive() const;
675    
# Line 622  class Data { Line 678  class Data {
678       Return a Data with a 1 for 0 values and a 0 for +ive or -ive values.       Return a Data with a 1 for 0 values and a 0 for +ive or -ive values.
679       *       *
680    */    */
681      ESCRIPT_DLL_API
682    Data    Data
683    whereZero(double tol=0.0) const;    whereZero(double tol=0.0) const;
684    
# Line 630  class Data { Line 687  class Data {
687       Return a Data with a 0 for 0 values and a 1 for +ive or -ive values.       Return a Data with a 0 for 0 values and a 1 for +ive or -ive values.
688       *       *
689    */    */
690      ESCRIPT_DLL_API
691    Data    Data
692    whereNonZero(double tol=0.0) const;    whereNonZero(double tol=0.0) const;
693    
# Line 638  class Data { Line 696  class Data {
696       Return the maximum absolute value of this Data object.       Return the maximum absolute value of this Data object.
697       *       *
698    */    */
699      ESCRIPT_DLL_API
700    double    double
701    Lsup() const;    Lsup() const;
702    
# Line 646  class Data { Line 705  class Data {
705       Return the minimum absolute value of this Data object.       Return the minimum absolute value of this Data object.
706       *       *
707    */    */
708      ESCRIPT_DLL_API
709    double    double
710    Linf() const;    Linf() const;
711    
# Line 654  class Data { Line 714  class Data {
714       Return the maximum value of this Data object.       Return the maximum value of this Data object.
715       *       *
716    */    */
717      ESCRIPT_DLL_API
718    double    double
719    sup() const;    sup() const;
720    
# Line 662  class Data { Line 723  class Data {
723       Return the minimum value of this Data object.       Return the minimum value of this Data object.
724       *       *
725    */    */
726      ESCRIPT_DLL_API
727    double    double
728    inf() const;    inf() const;
729    
# Line 670  class Data { Line 732  class Data {
732       Return the absolute value of each data point of this Data object.       Return the absolute value of each data point of this Data object.
733       *       *
734    */    */
735      ESCRIPT_DLL_API
736    Data    Data
737    abs() const;    abs() const;
738    
# Line 678  class Data { Line 741  class Data {
741       Return the maximum value of each data point of this Data object.       Return the maximum value of each data point of this Data object.
742       *       *
743    */    */
744      ESCRIPT_DLL_API
745    Data    Data
746    maxval() const;    maxval() const;
747    
# Line 686  class Data { Line 750  class Data {
750       Return the minimum value of each data point of this Data object.       Return the minimum value of each data point of this Data object.
751       *       *
752    */    */
753      ESCRIPT_DLL_API
754    Data    Data
755    minval() const;    minval() const;
756    
# Line 694  class Data { Line 759  class Data {
759       Return the (sample number, data-point number) of the data point with       Return the (sample number, data-point number) of the data point with
760       the minimum value in this Data object.       the minimum value in this Data object.
761    */    */
762      ESCRIPT_DLL_API
763    const boost::python::tuple    const boost::python::tuple
764    mindp() const;    mindp() const;
765    
766      ESCRIPT_DLL_API
767    void    void
768    calc_mindp(int& SampleNo,    calc_mindp(int& SampleNo,
769               int& DataPointNo) const;               int& DataPointNo) const;
# Line 707  class Data { Line 774  class Data {
774       -1 for negative values, zero for zero values, 1 for positive values.       -1 for negative values, zero for zero values, 1 for positive values.
775       *       *
776    */    */
777      ESCRIPT_DLL_API
778    Data    Data
779    sign() const;    sign() const;
780    
# Line 716  class Data { Line 784  class Data {
784       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.
785       *       *
786    */    */
787      ESCRIPT_DLL_API
788    Data    Data
789    eigenvalues() const;    eigenvalues() const;
790    
# Line 728  class Data { Line 797  class Data {
797       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
798       *       *
799    */    */
800      ESCRIPT_DLL_API
801    const boost::python::tuple    const boost::python::tuple
802    eigenvalues_and_eigenvectors(const double tol=1.e-12) const;    eigenvalues_and_eigenvectors(const double tol=1.e-12) const;
803    
# Line 737  class Data { Line 807  class Data {
807       --* not implemented yet *--       --* not implemented yet *--
808       *       *
809    */    */
810      ESCRIPT_DLL_API
811    Data    Data
812    transpose(int axis) const;    transpose(int axis) const;
813    
# Line 745  class Data { Line 816  class Data {
816       Calculate the trace of each data point of this Data object.       Calculate the trace of each data point of this Data object.
817       *       *
818    */    */
819      ESCRIPT_DLL_API
820    Data    Data
821    trace() const;    trace() const;
822    
# Line 753  class Data { Line 825  class Data {
825       Return the sin of each data point of this Data object.       Return the sin of each data point of this Data object.
826       *       *
827    */    */
828      ESCRIPT_DLL_API
829    Data    Data
830    sin() const;    sin() const;
831    
# Line 761  class Data { Line 834  class Data {
834       Return the cos of each data point of this Data object.       Return the cos of each data point of this Data object.
835       *       *
836    */    */
837      ESCRIPT_DLL_API
838    Data    Data
839    cos() const;    cos() const;
840    
# Line 769  class Data { Line 843  class Data {
843       Return the tan of each data point of this Data object.       Return the tan of each data point of this Data object.
844       *       *
845    */    */
846      ESCRIPT_DLL_API
847    Data    Data
848    tan() const;    tan() const;
849    
# Line 777  class Data { Line 852  class Data {
852       Return the asin of each data point of this Data object.       Return the asin of each data point of this Data object.
853       *       *
854    */    */
855      ESCRIPT_DLL_API
856    Data    Data
857    asin() const;    asin() const;
858    
# Line 785  class Data { Line 861  class Data {
861       Return the acos of each data point of this Data object.       Return the acos of each data point of this Data object.
862       *       *
863    */    */
864      ESCRIPT_DLL_API
865    Data    Data
866    acos() const;    acos() const;
867    
# Line 793  class Data { Line 870  class Data {
870       Return the atan of each data point of this Data object.       Return the atan of each data point of this Data object.
871       *       *
872    */    */
873      ESCRIPT_DLL_API
874    Data    Data
875    atan() const;    atan() const;
876    
# Line 801  class Data { Line 879  class Data {
879       Return the sinh of each data point of this Data object.       Return the sinh of each data point of this Data object.
880       *       *
881    */    */
882      ESCRIPT_DLL_API
883    Data    Data
884    sinh() const;    sinh() const;
885    
# Line 809  class Data { Line 888  class Data {
888       Return the cosh of each data point of this Data object.       Return the cosh of each data point of this Data object.
889       *       *
890    */    */
891      ESCRIPT_DLL_API
892    Data    Data
893    cosh() const;    cosh() const;
894    
# Line 817  class Data { Line 897  class Data {
897       Return the tanh of each data point of this Data object.       Return the tanh of each data point of this Data object.
898       *       *
899    */    */
900      ESCRIPT_DLL_API
901    Data    Data
902    tanh() const;    tanh() const;
903    
# Line 825  class Data { Line 906  class Data {
906       Return the asinh of each data point of this Data object.       Return the asinh of each data point of this Data object.
907       *       *
908    */    */
909      ESCRIPT_DLL_API
910    Data    Data
911    asinh() const;    asinh() const;
912    
# Line 833  class Data { Line 915  class Data {
915       Return the acosh of each data point of this Data object.       Return the acosh of each data point of this Data object.
916       *       *
917    */    */
918      ESCRIPT_DLL_API
919    Data    Data
920    acosh() const;    acosh() const;
921    
# Line 841  class Data { Line 924  class Data {
924       Return the atanh of each data point of this Data object.       Return the atanh of each data point of this Data object.
925       *       *
926    */    */
927      ESCRIPT_DLL_API
928    Data    Data
929    atanh() const;    atanh() const;
930    
# Line 849  class Data { Line 933  class Data {
933       Return the log to base 10 of each data point of this Data object.       Return the log to base 10 of each data point of this Data object.
934       *       *
935    */    */
936      ESCRIPT_DLL_API
937    Data    Data
938    log10() const;    log10() const;
939    
# Line 857  class Data { Line 942  class Data {
942       Return the natural log of each data point of this Data object.       Return the natural log of each data point of this Data object.
943       *       *
944    */    */
945      ESCRIPT_DLL_API
946    Data    Data
947    log() const;    log() const;
948    
# Line 865  class Data { Line 951  class Data {
951       Return the exponential function of each data point of this Data object.       Return the exponential function of each data point of this Data object.
952       *       *
953    */    */
954      ESCRIPT_DLL_API
955    Data    Data
956    exp() const;    exp() const;
957    
# Line 873  class Data { Line 960  class Data {
960       Return the square root of each data point of this Data object.       Return the square root of each data point of this Data object.
961       *       *
962    */    */
963      ESCRIPT_DLL_API
964    Data    Data
965    sqrt() const;    sqrt() const;
966    
# Line 881  class Data { Line 969  class Data {
969       Return the negation of each data point of this Data object.       Return the negation of each data point of this Data object.
970       *       *
971    */    */
972      ESCRIPT_DLL_API
973    Data    Data
974    neg() const;    neg() const;
975    
# Line 890  class Data { Line 979  class Data {
979       Simply returns this object unmodified.       Simply returns this object unmodified.
980       *       *
981    */    */
982      ESCRIPT_DLL_API
983    Data    Data
984    pos() const;    pos() const;
985    
# Line 900  class Data { Line 990  class Data {
990       \param right Input - the power to raise the object to.       \param right Input - the power to raise the object to.
991       *       *
992    */    */
993      ESCRIPT_DLL_API
994    Data    Data
995    powD(const Data& right) const;    powD(const Data& right) const;
996    
# Line 910  class Data { Line 1001  class Data {
1001       \param right Input - the power to raise the object to.       \param right Input - the power to raise the object to.
1002       *       *
1003     */     */
1004      ESCRIPT_DLL_API
1005    Data    Data
1006    powO(const boost::python::object& right) const;    powO(const boost::python::object& right) const;
1007    
# Line 921  class Data { Line 1013  class Data {
1013       *       *
1014     */     */
1015    
1016      ESCRIPT_DLL_API
1017    Data    Data
1018    rpowO(const boost::python::object& left) const;    rpowO(const boost::python::object& left) const;
1019    
# Line 928  class Data { Line 1021  class Data {
1021       \brief       \brief
1022       writes the object to a file in the DX file format       writes the object to a file in the DX file format
1023    */    */
1024      ESCRIPT_DLL_API
1025    void    void
1026    saveDX(std::string fileName) const;    saveDX(std::string fileName) const;
1027    
# Line 935  class Data { Line 1029  class Data {
1029       \brief       \brief
1030       writes the object to a file in the VTK file format       writes the object to a file in the VTK file format
1031    */    */
1032      ESCRIPT_DLL_API
1033    void    void
1034    saveVTK(std::string fileName) const;    saveVTK(std::string fileName) const;
1035    
# Line 944  class Data { Line 1039  class Data {
1039       \param right - Input - The right hand side.       \param right - Input - The right hand side.
1040       *       *
1041    */    */
1042      ESCRIPT_DLL_API
1043    Data& operator+=(const Data& right);    Data& operator+=(const Data& right);
1044      ESCRIPT_DLL_API
1045    Data& operator+=(const boost::python::object& right);    Data& operator+=(const boost::python::object& right);
1046    
1047    /**    /**
# Line 953  class Data { Line 1050  class Data {
1050       \param right - Input - The right hand side.       \param right - Input - The right hand side.
1051       *       *
1052    */    */
1053      ESCRIPT_DLL_API
1054    Data& operator-=(const Data& right);    Data& operator-=(const Data& right);
1055      ESCRIPT_DLL_API
1056    Data& operator-=(const boost::python::object& right);    Data& operator-=(const boost::python::object& right);
1057    
1058   /**   /**
# Line 962  class Data { Line 1061  class Data {
1061       \param right - Input - The right hand side.       \param right - Input - The right hand side.
1062       *       *
1063    */    */
1064      ESCRIPT_DLL_API
1065    Data& operator*=(const Data& right);    Data& operator*=(const Data& right);
1066      ESCRIPT_DLL_API
1067    Data& operator*=(const boost::python::object& right);    Data& operator*=(const boost::python::object& right);
1068    
1069   /**   /**
# Line 971  class Data { Line 1072  class Data {
1072       \param right - Input - The right hand side.       \param right - Input - The right hand side.
1073       *       *
1074    */    */
1075      ESCRIPT_DLL_API
1076    Data& operator/=(const Data& right);    Data& operator/=(const Data& right);
1077      ESCRIPT_DLL_API
1078    Data& operator/=(const boost::python::object& right);    Data& operator/=(const boost::python::object& right);
1079    
1080    /**    /**
1081       \brief       \brief
1082       Returns true if this can be interpolated to functionspace.       Returns true if this can be interpolated to functionspace.
1083    */    */
1084      ESCRIPT_DLL_API
1085    bool    bool
1086    probeInterpolation(const FunctionSpace& functionspace) const;    probeInterpolation(const FunctionSpace& functionspace) const;
1087    
# Line 996  class Data { Line 1100  class Data {
1100       \param key - Input - python slice tuple specifying       \param key - Input - python slice tuple specifying
1101       slice to return.       slice to return.
1102    */    */
1103      ESCRIPT_DLL_API
1104    Data    Data
1105    getItem(const boost::python::object& key) const;    getItem(const boost::python::object& key) const;
1106    
# Line 1010  class Data { Line 1115  class Data {
1115       slice to copy from value.       slice to copy from value.
1116       \param value - Input - Data object to copy from.       \param value - Input - Data object to copy from.
1117    */    */
1118      ESCRIPT_DLL_API
1119    void    void
1120    setItemD(const boost::python::object& key,    setItemD(const boost::python::object& key,
1121             const Data& value);             const Data& value);
1122    
1123      ESCRIPT_DLL_API
1124    void    void
1125    setItemO(const boost::python::object& key,    setItemO(const boost::python::object& key,
1126             const boost::python::object& value);             const boost::python::object& value);
# Line 1026  class Data { Line 1133  class Data {
1133       this Data object.       this Data object.
1134    */    */
1135    template <class UnaryFunction>    template <class UnaryFunction>
1136      ESCRIPT_DLL_API
1137    inline    inline
1138    void    void
1139    unaryOp(UnaryFunction operation);    unaryOp(UnaryFunction operation);
# Line 1037  class Data { Line 1145  class Data {
1145       \param region - Input - Region to copy.       \param region - Input - Region to copy.
1146       *       *
1147    */    */
1148      ESCRIPT_DLL_API
1149    Data    Data
1150    getSlice(const DataArrayView::RegionType& region) const;    getSlice(const DataArrayView::RegionType& region) const;
1151    
# Line 1048  class Data { Line 1157  class Data {
1157       \param region - Input - Region to copy.       \param region - Input - Region to copy.
1158       *       *
1159    */    */
1160      ESCRIPT_DLL_API
1161    void    void
1162    setSlice(const Data& value,    setSlice(const Data& value,
1163             const DataArrayView::RegionType& region);             const DataArrayView::RegionType& region);
# Line 1057  class Data { Line 1167  class Data {
1167       Archive the current Data object to the given file.       Archive the current Data object to the given file.
1168       \param fileName - Input - file to archive to.       \param fileName - Input - file to archive to.
1169    */    */
1170      ESCRIPT_DLL_API
1171    void    void
1172    archiveData(const std::string fileName);    archiveData(const std::string fileName);
1173    
# Line 1068  class Data { Line 1179  class Data {
1179       \param fileName - Input - file to extract from.       \param fileName - Input - file to extract from.
1180       \param fspace - Input - a suitable FunctionSpace descibing the data.       \param fspace - Input - a suitable FunctionSpace descibing the data.
1181    */    */
1182      ESCRIPT_DLL_API
1183    void    void
1184    extractData(const std::string fileName,    extractData(const std::string fileName,
1185                const FunctionSpace& fspace);                const FunctionSpace& fspace);
# Line 1215  Data::initialise(const IValueType& value Line 1327  Data::initialise(const IValueType& value
1327    Operator+    Operator+
1328    Takes two Data objects.    Takes two Data objects.
1329  */  */
1330  Data operator+(const Data& left, const Data& right);  ESCRIPT_DLL_API Data operator+(const Data& left, const Data& right);
1331    
1332  /**  /**
1333    \brief    \brief
1334    Operator-    Operator-
1335    Takes two Data objects.    Takes two Data objects.
1336  */  */
1337  Data operator-(const Data& left, const Data& right);  ESCRIPT_DLL_API Data operator-(const Data& left, const Data& right);
1338    
1339  /**  /**
1340    \brief    \brief
1341    Operator*    Operator*
1342    Takes two Data objects.    Takes two Data objects.
1343  */  */
1344  Data operator*(const Data& left, const Data& right);  ESCRIPT_DLL_API Data operator*(const Data& left, const Data& right);
1345    
1346  /**  /**
1347    \brief    \brief
1348    Operator/    Operator/
1349    Takes two Data objects.    Takes two Data objects.
1350  */  */
1351  Data operator/(const Data& left, const Data& right);  ESCRIPT_DLL_API Data operator/(const Data& left, const Data& right);
1352    
1353  /**  /**
1354    \brief    \brief
# Line 1244  Data operator/(const Data& left, const D Line 1356  Data operator/(const Data& left, const D
1356    Takes LHS Data object and RHS python::object.    Takes LHS Data object and RHS python::object.
1357    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1358  */  */
1359  Data operator+(const Data& left, const boost::python::object& right);  ESCRIPT_DLL_API Data operator+(const Data& left, const boost::python::object& right);
1360    
1361  /**  /**
1362    \brief    \brief
# Line 1252  Data operator+(const Data& left, const b Line 1364  Data operator+(const Data& left, const b
1364    Takes LHS Data object and RHS python::object.    Takes LHS Data object and RHS python::object.
1365    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1366  */  */
1367  Data operator-(const Data& left, const boost::python::object& right);  ESCRIPT_DLL_API Data operator-(const Data& left, const boost::python::object& right);
1368    
1369  /**  /**
1370    \brief    \brief
# Line 1260  Data operator-(const Data& left, const b Line 1372  Data operator-(const Data& left, const b
1372    Takes LHS Data object and RHS python::object.    Takes LHS Data object and RHS python::object.
1373    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1374  */  */
1375  Data operator*(const Data& left, const boost::python::object& right);  ESCRIPT_DLL_API Data operator*(const Data& left, const boost::python::object& right);
1376    
1377  /**  /**
1378    \brief    \brief
# Line 1268  Data operator*(const Data& left, const b Line 1380  Data operator*(const Data& left, const b
1380    Takes LHS Data object and RHS python::object.    Takes LHS Data object and RHS python::object.
1381    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1382  */  */
1383  Data operator/(const Data& left, const boost::python::object& right);  ESCRIPT_DLL_API Data operator/(const Data& left, const boost::python::object& right);
1384    
1385  /**  /**
1386    \brief    \brief
# Line 1276  Data operator/(const Data& left, const b Line 1388  Data operator/(const Data& left, const b
1388    Takes LHS python::object and RHS Data object.    Takes LHS python::object and RHS Data object.
1389    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1390  */  */
1391  Data operator+(const boost::python::object& left, const Data& right);  ESCRIPT_DLL_API Data operator+(const boost::python::object& left, const Data& right);
1392    
1393  /**  /**
1394    \brief    \brief
# Line 1284  Data operator+(const boost::python::obje Line 1396  Data operator+(const boost::python::obje
1396    Takes LHS python::object and RHS Data object.    Takes LHS python::object and RHS Data object.
1397    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1398  */  */
1399  Data operator-(const boost::python::object& left, const Data& right);  ESCRIPT_DLL_API Data operator-(const boost::python::object& left, const Data& right);
1400    
1401  /**  /**
1402    \brief    \brief
# Line 1292  Data operator-(const boost::python::obje Line 1404  Data operator-(const boost::python::obje
1404    Takes LHS python::object and RHS Data object.    Takes LHS python::object and RHS Data object.
1405    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1406  */  */
1407  Data operator*(const boost::python::object& left, const Data& right);  ESCRIPT_DLL_API Data operator*(const boost::python::object& left, const Data& right);
1408    
1409  /**  /**
1410    \brief    \brief
# Line 1300  Data operator*(const boost::python::obje Line 1412  Data operator*(const boost::python::obje
1412    Takes LHS python::object and RHS Data object.    Takes LHS python::object and RHS Data object.
1413    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1414  */  */
1415  Data operator/(const boost::python::object& left, const Data& right);  ESCRIPT_DLL_API Data operator/(const boost::python::object& left, const Data& right);
1416    
1417  /**  /**
1418    \brief    \brief
1419    Output operator    Output operator
1420  */  */
1421  std::ostream& operator<<(std::ostream& o, const Data& data);  ESCRIPT_DLL_API std::ostream& operator<<(std::ostream& o, const Data& data);
1422    
1423  /**  /**
1424    \brief    \brief
# Line 1314  std::ostream& operator<<(std::ostream& o Line 1426  std::ostream& operator<<(std::ostream& o
1426    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
1427    be relied on. Requires further implementation.    be relied on. Requires further implementation.
1428  */  */
1429  //bool operator==(const Data& left, const Data& right);  //ESCRIPT_DLL_API bool operator==(const Data& left, const Data& right);
1430    
1431  /**  /**
1432    \brief    \brief

Legend:
Removed from v.734  
changed lines
  Added in v.742

  ViewVC Help
Powered by ViewVC 1.1.26