/[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 698 by gross, Fri Mar 31 04:52:55 2006 UTC revision 914 by gross, Thu Dec 14 04:38:18 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 25  Line 26 
26    
27  extern "C" {  extern "C" {
28  #include "DataC.h"  #include "DataC.h"
29    #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 64  class Data { Line 70  class Data {
70    typedef double (*UnaryDFunPtr)(double);    typedef double (*UnaryDFunPtr)(double);
71    typedef double (*BinaryDFunPtr)(double,double);    typedef double (*BinaryDFunPtr)(double,double);
72    
73    
74    /**    /**
75       Constructors.       Constructors.
76    */    */
# Line 73  class Data { Line 80  class Data {
80       Default constructor.       Default constructor.
81       Creates a DataEmpty object.       Creates a DataEmpty object.
82    */    */
83      ESCRIPT_DLL_API
84    Data();    Data();
85    
86    /**    /**
# Line 80  class Data { Line 88  class Data {
88       Copy constructor.       Copy constructor.
89       WARNING: Only performs a shallow copy.       WARNING: Only performs a shallow copy.
90    */    */
91      ESCRIPT_DLL_API
92    Data(const Data& inData);    Data(const Data& inData);
93    
94    /**    /**
# Line 88  class Data { Line 97  class Data {
97       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,
98       otherwise a shallow copy of inData is returned.       otherwise a shallow copy of inData is returned.
99    */    */
100      ESCRIPT_DLL_API
101    Data(const Data& inData,    Data(const Data& inData,
102         const FunctionSpace& what);         const FunctionSpace& what);
103    
# Line 101  class Data { Line 111  class Data {
111                         the value. Otherwise a more efficient storage                         the value. Otherwise a more efficient storage
112                         mechanism will be used.                         mechanism will be used.
113    */    */
114      ESCRIPT_DLL_API
115    Data(const DataArrayView& value,    Data(const DataArrayView& value,
116         const FunctionSpace& what=FunctionSpace(),         const FunctionSpace& what=FunctionSpace(),
117         bool expanded=false);         bool expanded=false);
# Line 116  class Data { Line 127  class Data {
127                         the given value. Otherwise a more efficient storage                         the given value. Otherwise a more efficient storage
128                         mechanism will be used.                         mechanism will be used.
129    */    */
130      ESCRIPT_DLL_API
131    Data(double value,    Data(double value,
132         const DataArrayView::ShapeType& dataPointShape=DataArrayView::ShapeType(),         const DataArrayView::ShapeType& dataPointShape=DataArrayView::ShapeType(),
133         const FunctionSpace& what=FunctionSpace(),         const FunctionSpace& what=FunctionSpace(),
# Line 128  class Data { Line 140  class Data {
140       \param inData - Input - Input Data object.       \param inData - Input - Input Data object.
141       \param region - Input - Region to copy.       \param region - Input - Region to copy.
142    */    */
143      ESCRIPT_DLL_API
144    Data(const Data& inData,    Data(const Data& inData,
145         const DataArrayView::RegionType& region);         const DataArrayView::RegionType& region);
146    
# Line 145  class Data { Line 158  class Data {
158                         the appropriate values.                         the appropriate values.
159      ==>*      ==>*
160    */    */
161      ESCRIPT_DLL_API
162    Data(const DataTagged::TagListType& tagKeys,    Data(const DataTagged::TagListType& tagKeys,
163         const DataTagged::ValueListType& values,         const DataTagged::ValueListType& values,
164         const DataArrayView& defaultValue,         const DataArrayView& defaultValue,
# Line 161  class Data { Line 175  class Data {
175                         the value. Otherwise a more efficient storage                         the value. Otherwise a more efficient storage
176                         mechanism will be used.                         mechanism will be used.
177    */    */
178      ESCRIPT_DLL_API
179    Data(const boost::python::numeric::array& value,    Data(const boost::python::numeric::array& value,
180         const FunctionSpace& what=FunctionSpace(),         const FunctionSpace& what=FunctionSpace(),
181         bool expanded=false);         bool expanded=false);
# Line 176  class Data { Line 191  class Data {
191                         the value. Otherwise a more efficient storage                         the value. Otherwise a more efficient storage
192                         mechanism will be used.                         mechanism will be used.
193    */    */
194      ESCRIPT_DLL_API
195    Data(const boost::python::object& value,    Data(const boost::python::object& value,
196         const FunctionSpace& what=FunctionSpace(),         const FunctionSpace& what=FunctionSpace(),
197         bool expanded=false);         bool expanded=false);
# Line 189  class Data { Line 205  class Data {
205       \param value - Input - Input data.       \param value - Input - Input data.
206       \param other - Input - contains all other parameters.       \param other - Input - contains all other parameters.
207    */    */
208      ESCRIPT_DLL_API
209    Data(const boost::python::object& value,    Data(const boost::python::object& value,
210         const Data& other);         const Data& other);
211    
# Line 196  class Data { Line 213  class Data {
213       \brief       \brief
214       Constructor which creates a DataConstant of "shape" with constant value.       Constructor which creates a DataConstant of "shape" with constant value.
215    */    */
216      ESCRIPT_DLL_API
217    Data(double value,    Data(double value,
218         const boost::python::tuple& shape=boost::python::make_tuple(),         const boost::python::tuple& shape=boost::python::make_tuple(),
219         const FunctionSpace& what=FunctionSpace(),         const FunctionSpace& what=FunctionSpace(),
# Line 204  class Data { Line 222  class Data {
222       \brief       \brief
223       Destructor       Destructor
224    */    */
225      ESCRIPT_DLL_API
226    ~Data();    ~Data();
227    
228    /**    /**
229       \brief       \brief
230       Perform a deep copy.       Perform a deep copy.
231    */    */
232      ESCRIPT_DLL_API
233    void    void
234    copy(const Data& other);    copy(const Data& other);
235    
# Line 219  class Data { Line 239  class Data {
239    
240    /**    /**
241       \brief       \brief
242         switches on update protection
243    
244      */
245      ESCRIPT_DLL_API
246      void
247      setProtection();
248    
249      /**
250         \brief
251         Returns trueif the data object is protected against update
252    
253      */
254      ESCRIPT_DLL_API
255      bool
256      isProtected() const;
257      /**
258         \brief
259       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.
260    */    */
261      ESCRIPT_DLL_API
262    const boost::python::numeric::array    const boost::python::numeric::array
263    convertToNumArray();    convertToNumArray();
264    
# Line 228  class Data { Line 266  class Data {
266       \brief       \brief
267       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.
268    */    */
269      ESCRIPT_DLL_API
270    const boost::python::numeric::array    const boost::python::numeric::array
271    convertToNumArrayFromSampleNo(int sampleNo);    convertToNumArrayFromSampleNo(int sampleNo);
272    
# Line 235  class Data { Line 274  class Data {
274       \brief       \brief
275       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.
276    */    */
277      ESCRIPT_DLL_API
278    const boost::python::numeric::array    const boost::python::numeric::array
279    convertToNumArrayFromDPNo(int sampleNo,    convertToNumArrayFromDPNo(int procNo,
280                              int dataPointNo);                  int sampleNo,
281                    int dataPointNo);
282    /**    /**
283       \brief       \brief
284       Fills the expanded Data object from values of a python numarray object.       Fills the expanded Data object from values of a python numarray object.
285    */    */
286      ESCRIPT_DLL_API
287    void    void
288    fillFromNumArray(const boost::python::numeric::array);    fillFromNumArray(const boost::python::numeric::array);
289    
# Line 253  class Data { Line 294  class Data {
294       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
295       numarray returned by convertToNumArray.       numarray returned by convertToNumArray.
296    */    */
297      ESCRIPT_DLL_API
298    int    int
299    getTagNumber(int dpno);    getTagNumber(int dpno);
300    
# Line 260  class Data { Line 302  class Data {
302       \brief       \brief
303       Return the C wrapper for the Data object.       Return the C wrapper for the Data object.
304    */    */
305      ESCRIPT_DLL_API
306    escriptDataC    escriptDataC
307    getDataC();    getDataC();
308    
# Line 267  class Data { Line 310  class Data {
310       \brief       \brief
311       Return the C wrapper for the Data object - const version.       Return the C wrapper for the Data object - const version.
312    */    */
313      ESCRIPT_DLL_API
314    escriptDataC    escriptDataC
315    getDataC() const;    getDataC() const;
316    
# Line 274  class Data { Line 318  class Data {
318       \brief       \brief
319       Write the data as a string.       Write the data as a string.
320    */    */
321      ESCRIPT_DLL_API
322    inline    inline
323    std::string    std::string
324    toString() const    toString() const
# Line 287  class Data { Line 332  class Data {
332       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
333       to manipulate the point data.       to manipulate the point data.
334    */    */
335      ESCRIPT_DLL_API
336    inline    inline
337    const DataArrayView&    const DataArrayView&
338    getPointDataView() const    getPointDataView() const
# Line 298  class Data { Line 344  class Data {
344       \brief       \brief
345       Whatever the current Data type make this into a DataExpanded.       Whatever the current Data type make this into a DataExpanded.
346    */    */
347      ESCRIPT_DLL_API
348    void    void
349    expand();    expand();
350    
# Line 308  class Data { Line 355  class Data {
355       Expanded data to tagged will throw an exception.       Expanded data to tagged will throw an exception.
356      ==>*      ==>*
357    */    */
358      ESCRIPT_DLL_API
359    void    void
360    tag();    tag();
361    
# Line 315  class Data { Line 363  class Data {
363       \brief       \brief
364       Return true if this Data is expanded.       Return true if this Data is expanded.
365    */    */
366      ESCRIPT_DLL_API
367    bool    bool
368    isExpanded() const;    isExpanded() const;
369    
# Line 322  class Data { Line 371  class Data {
371       \brief       \brief
372       Return true if this Data is tagged.       Return true if this Data is tagged.
373    */    */
374      ESCRIPT_DLL_API
375    bool    bool
376    isTagged() const;    isTagged() const;
377    
# Line 329  class Data { Line 379  class Data {
379       \brief       \brief
380       Return true if this Data is constant.       Return true if this Data is constant.
381    */    */
382      ESCRIPT_DLL_API
383    bool    bool
384    isConstant() const;    isConstant() const;
385    
# Line 336  class Data { Line 387  class Data {
387       \brief       \brief
388       Return true if this Data is empty.       Return true if this Data is empty.
389    */    */
390      ESCRIPT_DLL_API
391    bool    bool
392    isEmpty() const;    isEmpty() const;
393    
# Line 343  class Data { Line 395  class Data {
395       \brief       \brief
396       Return the function space.       Return the function space.
397    */    */
398      ESCRIPT_DLL_API
399    inline    inline
400    const FunctionSpace&    const FunctionSpace&
401    getFunctionSpace() const    getFunctionSpace() const
# Line 354  class Data { Line 407  class Data {
407       \brief       \brief
408       Return a copy of the function space.       Return a copy of the function space.
409    */    */
410      ESCRIPT_DLL_API
411    const FunctionSpace    const FunctionSpace
412    getCopyOfFunctionSpace() const;    getCopyOfFunctionSpace() const;
413    
# Line 361  class Data { Line 415  class Data {
415       \brief       \brief
416       Return the domain.       Return the domain.
417    */    */
418      ESCRIPT_DLL_API
419    inline    inline
420    const AbstractDomain&    const AbstractDomain&
421    getDomain() const    getDomain() const
# Line 372  class Data { Line 427  class Data {
427       \brief       \brief
428       Return a copy of the domain.       Return a copy of the domain.
429    */    */
430      ESCRIPT_DLL_API
431    const AbstractDomain    const AbstractDomain
432    getCopyOfDomain() const;    getCopyOfDomain() const;
433    
# Line 379  class Data { Line 435  class Data {
435       \brief       \brief
436       Return the rank of the point data.       Return the rank of the point data.
437    */    */
438      ESCRIPT_DLL_API
439    inline    inline
440    int    int
441    getDataPointRank() const    getDataPointRank() const
# Line 390  class Data { Line 447  class Data {
447       \brief       \brief
448       Return the number of samples.       Return the number of samples.
449    */    */
450      ESCRIPT_DLL_API
451    inline    inline
452    int    int
453    getNumSamples() const    getNumSamples() const
# Line 401  class Data { Line 459  class Data {
459       \brief       \brief
460       Return the number of data points per sample.       Return the number of data points per sample.
461    */    */
462      ESCRIPT_DLL_API
463    inline    inline
464    int    int
465    getNumDataPointsPerSample() const    getNumDataPointsPerSample() const
# Line 414  class Data { Line 473  class Data {
473       preferred interface but is provided for use by C code.       preferred interface but is provided for use by C code.
474       \param sampleNo - Input - the given sample no.       \param sampleNo - Input - the given sample no.
475    */    */
476      ESCRIPT_DLL_API
477    inline    inline
478    DataAbstract::ValueType::value_type*    DataAbstract::ValueType::value_type*
479    getSampleData(DataAbstract::ValueType::size_type sampleNo)    getSampleData(DataAbstract::ValueType::size_type sampleNo)
# Line 427  class Data { Line 487  class Data {
487       access data that isn't tagged an exception will be thrown.       access data that isn't tagged an exception will be thrown.
488       \param tag - Input - the tag key.       \param tag - Input - the tag key.
489    */    */
490      ESCRIPT_DLL_API
491    inline    inline
492    DataAbstract::ValueType::value_type*    DataAbstract::ValueType::value_type*
493    getSampleDataByTag(int tag)    getSampleDataByTag(int tag)
# Line 450  class Data { Line 511  class Data {
511       \param value - Input - value to assign to data-points associated with       \param value - Input - value to assign to data-points associated with
512                              the given reference number.                              the given reference number.
513    */    */
514      ESCRIPT_DLL_API
515    void    void
516    setRefValue(int ref,    setRefValue(int ref,
517                const boost::python::numeric::array& value);                const boost::python::numeric::array& value);
# Line 469  class Data { Line 531  class Data {
531       \param value - Output - object to receive values from data-points       \param value - Output - object to receive values from data-points
532                               associated with the given reference number.                               associated with the given reference number.
533    */    */
534      ESCRIPT_DLL_API
535    void    void
536    getRefValue(int ref,    getRefValue(int ref,
537                boost::python::numeric::array& value);                boost::python::numeric::array& value);
# Line 481  class Data { Line 544  class Data {
544       \param sampleNo - Input -       \param sampleNo - Input -
545       \param dataPointNo - Input -       \param dataPointNo - Input -
546    */    */
547      ESCRIPT_DLL_API
548    inline    inline
549    DataArrayView    DataArrayView
550    getDataPoint(int sampleNo,    getDataPoint(int sampleNo,
551                 int dataPointNo)                 int dataPointNo)
552    {    {
553      return m_data->getDataPoint(sampleNo,dataPointNo);          return m_data->getDataPoint(sampleNo,dataPointNo);
554    }    }
555    
556    /**    /**
557       \brief       \brief
558       Return a reference to the data point shape.       Return a reference to the data point shape.
559    */    */
560      ESCRIPT_DLL_API
561    const DataArrayView::ShapeType&    const DataArrayView::ShapeType&
562    getDataPointShape() const;    getDataPointShape() const;
563    
# Line 500  class Data { Line 565  class Data {
565       \brief       \brief
566       Return the data point shape as a tuple of integers.       Return the data point shape as a tuple of integers.
567    */    */
568      ESCRIPT_DLL_API
569    const boost::python::tuple    const boost::python::tuple
570    getShapeTuple() const;    getShapeTuple() const;
571    
# Line 508  class Data { Line 574  class Data {
574       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
575       data point shape dimensions.       data point shape dimensions.
576    */    */
577      ESCRIPT_DLL_API
578    int    int
579    getDataPointSize() const;    getDataPointSize() const;
580    
# Line 515  class Data { Line 582  class Data {
582       \brief       \brief
583       Return the number of doubles stored for this Data.       Return the number of doubles stored for this Data.
584    */    */
585      ESCRIPT_DLL_API
586    DataArrayView::ValueType::size_type    DataArrayView::ValueType::size_type
587    getLength() const;    getLength() const;
588    
# Line 527  class Data { Line 595  class Data {
595       \param value - Input - Value to associate with given key.       \param value - Input - Value to associate with given key.
596      ==>*      ==>*
597    */    */
598      ESCRIPT_DLL_API
599    void    void
600    setTaggedValue(int tagKey,    setTaggedValue(int tagKey,
601                   const boost::python::object& value);                   const boost::python::object& value);
# Line 540  class Data { Line 609  class Data {
609       \param value - Input - Value to associate with given key.       \param value - Input - Value to associate with given key.
610      ==>*      ==>*
611    */    */
612      ESCRIPT_DLL_API
613    void    void
614    setTaggedValueFromCPP(int tagKey,    setTaggedValueFromCPP(int tagKey,
615                          const DataArrayView& value);                          const DataArrayView& value);
# Line 548  class Data { Line 618  class Data {
618      \brief      \brief
619      Copy other Data object into this Data object where mask is positive.      Copy other Data object into this Data object where mask is positive.
620    */    */
621      ESCRIPT_DLL_API
622    void    void
623    copyWithMask(const Data& other,    copyWithMask(const Data& other,
624                 const Data& mask);                 const Data& mask);
# Line 562  class Data { Line 633  class Data {
633       the result as a Data object.       the result as a Data object.
634       *       *
635    */    */
636      ESCRIPT_DLL_API
637    Data    Data
638    interpolate(const FunctionSpace& functionspace) const;    interpolate(const FunctionSpace& functionspace) const;
639    
# Line 571  class Data { Line 643  class Data {
643       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.
644       *       *
645    */    */
646      ESCRIPT_DLL_API
647    Data    Data
648    gradOn(const FunctionSpace& functionspace) const;    gradOn(const FunctionSpace& functionspace) const;
649    
650      ESCRIPT_DLL_API
651    Data    Data
652    grad() const;    grad() const;
653    
# Line 582  class Data { Line 656  class Data {
656       Calculate the integral over the function space domain.       Calculate the integral over the function space domain.
657       *       *
658    */    */
659      ESCRIPT_DLL_API
660    boost::python::numeric::array    boost::python::numeric::array
661    integrate() const;    integrate() const;
662    
663    /**    /**
664       \brief       \brief
665         Returns 1./ Data object
666         *
667      */
668      ESCRIPT_DLL_API
669      Data
670      oneOver() const;
671      /**
672         \brief
673       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.
674       *       *
675    */    */
676      ESCRIPT_DLL_API
677    Data    Data
678    wherePositive() const;    wherePositive() const;
679    
# Line 598  class Data { Line 682  class Data {
682       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.
683       *       *
684    */    */
685      ESCRIPT_DLL_API
686    Data    Data
687    whereNegative() const;    whereNegative() const;
688    
# Line 606  class Data { Line 691  class Data {
691       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.
692       *       *
693    */    */
694      ESCRIPT_DLL_API
695    Data    Data
696    whereNonNegative() const;    whereNonNegative() const;
697    
# Line 614  class Data { Line 700  class Data {
700       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.
701       *       *
702    */    */
703      ESCRIPT_DLL_API
704    Data    Data
705    whereNonPositive() const;    whereNonPositive() const;
706    
# Line 622  class Data { Line 709  class Data {
709       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.
710       *       *
711    */    */
712      ESCRIPT_DLL_API
713    Data    Data
714    whereZero(double tol=0.0) const;    whereZero(double tol=0.0) const;
715    
# Line 630  class Data { Line 718  class Data {
718       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.
719       *       *
720    */    */
721      ESCRIPT_DLL_API
722    Data    Data
723    whereNonZero(double tol=0.0) const;    whereNonZero(double tol=0.0) const;
724    
# Line 638  class Data { Line 727  class Data {
727       Return the maximum absolute value of this Data object.       Return the maximum absolute value of this Data object.
728       *       *
729    */    */
730      ESCRIPT_DLL_API
731    double    double
732    Lsup() const;    Lsup() const;
733    
# Line 646  class Data { Line 736  class Data {
736       Return the minimum absolute value of this Data object.       Return the minimum absolute value of this Data object.
737       *       *
738    */    */
739      ESCRIPT_DLL_API
740    double    double
741    Linf() const;    Linf() const;
742    
# Line 654  class Data { Line 745  class Data {
745       Return the maximum value of this Data object.       Return the maximum value of this Data object.
746       *       *
747    */    */
748      ESCRIPT_DLL_API
749    double    double
750    sup() const;    sup() const;
751    
# Line 662  class Data { Line 754  class Data {
754       Return the minimum value of this Data object.       Return the minimum value of this Data object.
755       *       *
756    */    */
757      ESCRIPT_DLL_API
758    double    double
759    inf() const;    inf() const;
760    
# Line 670  class Data { Line 763  class Data {
763       Return the absolute value of each data point of this Data object.       Return the absolute value of each data point of this Data object.
764       *       *
765    */    */
766      ESCRIPT_DLL_API
767    Data    Data
768    abs() const;    abs() const;
769    
# Line 678  class Data { Line 772  class Data {
772       Return the maximum value of each data point of this Data object.       Return the maximum value of each data point of this Data object.
773       *       *
774    */    */
775      ESCRIPT_DLL_API
776    Data    Data
777    maxval() const;    maxval() const;
778    
# Line 686  class Data { Line 781  class Data {
781       Return the minimum value of each data point of this Data object.       Return the minimum value of each data point of this Data object.
782       *       *
783    */    */
784      ESCRIPT_DLL_API
785    Data    Data
786    minval() const;    minval() const;
787    
# Line 694  class Data { Line 790  class Data {
790       Return the (sample number, data-point number) of the data point with       Return the (sample number, data-point number) of the data point with
791       the minimum value in this Data object.       the minimum value in this Data object.
792    */    */
793      ESCRIPT_DLL_API
794    const boost::python::tuple    const boost::python::tuple
795    mindp() const;    mindp() const;
796    
797      ESCRIPT_DLL_API
798    void    void
799    calc_mindp(int& SampleNo,    calc_mindp(int& ProcNo,
800                            int& SampleNo,  
801               int& DataPointNo) const;               int& DataPointNo) const;
   
802    /**    /**
803       \brief       \brief
804       Return the sign of each data point of this Data object.       Return the sign of each data point of this Data object.
805       -1 for negative values, zero for zero values, 1 for positive values.       -1 for negative values, zero for zero values, 1 for positive values.
806       *       *
807    */    */
808      ESCRIPT_DLL_API
809    Data    Data
810    sign() const;    sign() const;
811    
812    /**    /**
813       \brief       \brief
814         Return the symmetric part of a matrix which is half the matrix plus its transpose.
815         *
816      */
817      ESCRIPT_DLL_API
818      Data
819      symmetric() const;
820    
821      /**
822         \brief
823         Return the nonsymmetric part of a matrix which is half the matrix minus its transpose.
824         *
825      */
826      ESCRIPT_DLL_API
827      Data
828      nonsymmetric() const;
829    
830      /**
831         \brief
832         Return the trace of a matrix
833         *
834      */
835      ESCRIPT_DLL_API
836      Data
837      trace(int axis_offset) const;
838    
839      /**
840         \brief
841         Transpose each data point of this Data object around the given axis.
842         *
843      */
844      ESCRIPT_DLL_API
845      Data
846      transpose(int axis_offset) const;
847    
848      /**
849         \brief
850       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.
851       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.
852       *       *
853    */    */
854      ESCRIPT_DLL_API
855    Data    Data
856    eigenvalues() const;    eigenvalues() const;
857    
# Line 728  class Data { Line 864  class Data {
864       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
865       *       *
866    */    */
867      ESCRIPT_DLL_API
868    const boost::python::tuple    const boost::python::tuple
869    eigenvalues_and_eigenvectors(const double tol=1.e-12) const;    eigenvalues_and_eigenvectors(const double tol=1.e-12) const;
870    
871    /**    /**
872       \brief       \brief
873       Transpose each data point of this Data object around the given axis.       swaps the components axis0 and axis1
      --* not implemented yet *--  
874       *       *
875    */    */
876      ESCRIPT_DLL_API
877    Data    Data
878    transpose(int axis) const;    swapaxes(const int axis0, const int axis1) const;
879    
880    /**    /**
881       \brief       \brief
882       Calculate the trace of each data point of this Data object.       Return the error function erf of each data point of this Data object.
883       *       *
884    */    */
885      ESCRIPT_DLL_API
886    Data    Data
887    trace() const;    erf() const;
888    
889    /**    /**
890       \brief       \brief
891       Return the sin of each data point of this Data object.       Return the sin of each data point of this Data object.
892       *       *
893    */    */
894      ESCRIPT_DLL_API
895    Data    Data
896    sin() const;    sin() const;
897    
# Line 761  class Data { Line 900  class Data {
900       Return the cos of each data point of this Data object.       Return the cos of each data point of this Data object.
901       *       *
902    */    */
903      ESCRIPT_DLL_API
904    Data    Data
905    cos() const;    cos() const;
906    
# Line 769  class Data { Line 909  class Data {
909       Return the tan of each data point of this Data object.       Return the tan of each data point of this Data object.
910       *       *
911    */    */
912      ESCRIPT_DLL_API
913    Data    Data
914    tan() const;    tan() const;
915    
# Line 777  class Data { Line 918  class Data {
918       Return the asin of each data point of this Data object.       Return the asin of each data point of this Data object.
919       *       *
920    */    */
921      ESCRIPT_DLL_API
922    Data    Data
923    asin() const;    asin() const;
924    
# Line 785  class Data { Line 927  class Data {
927       Return the acos of each data point of this Data object.       Return the acos of each data point of this Data object.
928       *       *
929    */    */
930      ESCRIPT_DLL_API
931    Data    Data
932    acos() const;    acos() const;
933    
# Line 793  class Data { Line 936  class Data {
936       Return the atan of each data point of this Data object.       Return the atan of each data point of this Data object.
937       *       *
938    */    */
939      ESCRIPT_DLL_API
940    Data    Data
941    atan() const;    atan() const;
942    
# Line 801  class Data { Line 945  class Data {
945       Return the sinh of each data point of this Data object.       Return the sinh of each data point of this Data object.
946       *       *
947    */    */
948      ESCRIPT_DLL_API
949    Data    Data
950    sinh() const;    sinh() const;
951    
# Line 809  class Data { Line 954  class Data {
954       Return the cosh of each data point of this Data object.       Return the cosh of each data point of this Data object.
955       *       *
956    */    */
957      ESCRIPT_DLL_API
958    Data    Data
959    cosh() const;    cosh() const;
960    
# Line 817  class Data { Line 963  class Data {
963       Return the tanh of each data point of this Data object.       Return the tanh of each data point of this Data object.
964       *       *
965    */    */
966      ESCRIPT_DLL_API
967    Data    Data
968    tanh() const;    tanh() const;
969    
# Line 825  class Data { Line 972  class Data {
972       Return the asinh of each data point of this Data object.       Return the asinh of each data point of this Data object.
973       *       *
974    */    */
975      ESCRIPT_DLL_API
976    Data    Data
977    asinh() const;    asinh() const;
978    
# Line 833  class Data { Line 981  class Data {
981       Return the acosh of each data point of this Data object.       Return the acosh of each data point of this Data object.
982       *       *
983    */    */
984      ESCRIPT_DLL_API
985    Data    Data
986    acosh() const;    acosh() const;
987    
# Line 841  class Data { Line 990  class Data {
990       Return the atanh of each data point of this Data object.       Return the atanh of each data point of this Data object.
991       *       *
992    */    */
993      ESCRIPT_DLL_API
994    Data    Data
995    atanh() const;    atanh() const;
996    
# Line 849  class Data { Line 999  class Data {
999       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.
1000       *       *
1001    */    */
1002      ESCRIPT_DLL_API
1003    Data    Data
1004    log10() const;    log10() const;
1005    
# Line 857  class Data { Line 1008  class Data {
1008       Return the natural log of each data point of this Data object.       Return the natural log of each data point of this Data object.
1009       *       *
1010    */    */
1011      ESCRIPT_DLL_API
1012    Data    Data
1013    log() const;    log() const;
1014    
# Line 865  class Data { Line 1017  class Data {
1017       Return the exponential function of each data point of this Data object.       Return the exponential function of each data point of this Data object.
1018       *       *
1019    */    */
1020      ESCRIPT_DLL_API
1021    Data    Data
1022    exp() const;    exp() const;
1023    
# Line 873  class Data { Line 1026  class Data {
1026       Return the square root of each data point of this Data object.       Return the square root of each data point of this Data object.
1027       *       *
1028    */    */
1029      ESCRIPT_DLL_API
1030    Data    Data
1031    sqrt() const;    sqrt() const;
1032    
# Line 881  class Data { Line 1035  class Data {
1035       Return the negation of each data point of this Data object.       Return the negation of each data point of this Data object.
1036       *       *
1037    */    */
1038      ESCRIPT_DLL_API
1039    Data    Data
1040    neg() const;    neg() const;
1041    
# Line 890  class Data { Line 1045  class Data {
1045       Simply returns this object unmodified.       Simply returns this object unmodified.
1046       *       *
1047    */    */
1048      ESCRIPT_DLL_API
1049    Data    Data
1050    pos() const;    pos() const;
1051    
# Line 900  class Data { Line 1056  class Data {
1056       \param right Input - the power to raise the object to.       \param right Input - the power to raise the object to.
1057       *       *
1058    */    */
1059      ESCRIPT_DLL_API
1060    Data    Data
1061    powD(const Data& right) const;    powD(const Data& right) const;
1062    
# Line 910  class Data { Line 1067  class Data {
1067       \param right Input - the power to raise the object to.       \param right Input - the power to raise the object to.
1068       *       *
1069     */     */
1070      ESCRIPT_DLL_API
1071    Data    Data
1072    powO(const boost::python::object& right) const;    powO(const boost::python::object& right) const;
1073    
1074    /**    /**
1075       \brief       \brief
1076         Return the given power of each data point of this boost python object.
1077        
1078         \param left Input - the bases
1079         *
1080       */
1081    
1082      ESCRIPT_DLL_API
1083      Data
1084      rpowO(const boost::python::object& left) const;
1085    
1086      /**
1087         \brief
1088       writes the object to a file in the DX file format       writes the object to a file in the DX file format
1089    */    */
1090      ESCRIPT_DLL_API
1091    void    void
1092    saveDX(std::string fileName) const;    saveDX(std::string fileName) const;
1093    
# Line 924  class Data { Line 1095  class Data {
1095       \brief       \brief
1096       writes the object to a file in the VTK file format       writes the object to a file in the VTK file format
1097    */    */
1098      ESCRIPT_DLL_API
1099    void    void
1100    saveVTK(std::string fileName) const;    saveVTK(std::string fileName) const;
1101    
# Line 933  class Data { Line 1105  class Data {
1105       \param right - Input - The right hand side.       \param right - Input - The right hand side.
1106       *       *
1107    */    */
1108      ESCRIPT_DLL_API
1109    Data& operator+=(const Data& right);    Data& operator+=(const Data& right);
1110      ESCRIPT_DLL_API
1111    Data& operator+=(const boost::python::object& right);    Data& operator+=(const boost::python::object& right);
1112    
1113    /**    /**
# Line 942  class Data { Line 1116  class Data {
1116       \param right - Input - The right hand side.       \param right - Input - The right hand side.
1117       *       *
1118    */    */
1119      ESCRIPT_DLL_API
1120    Data& operator-=(const Data& right);    Data& operator-=(const Data& right);
1121      ESCRIPT_DLL_API
1122    Data& operator-=(const boost::python::object& right);    Data& operator-=(const boost::python::object& right);
1123    
1124   /**   /**
# Line 951  class Data { Line 1127  class Data {
1127       \param right - Input - The right hand side.       \param right - Input - The right hand side.
1128       *       *
1129    */    */
1130      ESCRIPT_DLL_API
1131    Data& operator*=(const Data& right);    Data& operator*=(const Data& right);
1132      ESCRIPT_DLL_API
1133    Data& operator*=(const boost::python::object& right);    Data& operator*=(const boost::python::object& right);
1134    
1135   /**   /**
# Line 960  class Data { Line 1138  class Data {
1138       \param right - Input - The right hand side.       \param right - Input - The right hand side.
1139       *       *
1140    */    */
1141      ESCRIPT_DLL_API
1142    Data& operator/=(const Data& right);    Data& operator/=(const Data& right);
1143      ESCRIPT_DLL_API
1144    Data& operator/=(const boost::python::object& right);    Data& operator/=(const boost::python::object& right);
1145    
1146    /**    /**
1147       \brief       \brief
1148       Returns true if this can be interpolated to functionspace.       Returns true if this can be interpolated to functionspace.
1149    */    */
1150      ESCRIPT_DLL_API
1151    bool    bool
1152    probeInterpolation(const FunctionSpace& functionspace) const;    probeInterpolation(const FunctionSpace& functionspace) const;
1153    
# Line 985  class Data { Line 1166  class Data {
1166       \param key - Input - python slice tuple specifying       \param key - Input - python slice tuple specifying
1167       slice to return.       slice to return.
1168    */    */
1169      ESCRIPT_DLL_API
1170    Data    Data
1171    getItem(const boost::python::object& key) const;    getItem(const boost::python::object& key) const;
1172    
# Line 999  class Data { Line 1181  class Data {
1181       slice to copy from value.       slice to copy from value.
1182       \param value - Input - Data object to copy from.       \param value - Input - Data object to copy from.
1183    */    */
1184      ESCRIPT_DLL_API
1185    void    void
1186    setItemD(const boost::python::object& key,    setItemD(const boost::python::object& key,
1187             const Data& value);             const Data& value);
1188    
1189      ESCRIPT_DLL_API
1190    void    void
1191    setItemO(const boost::python::object& key,    setItemO(const boost::python::object& key,
1192             const boost::python::object& value);             const boost::python::object& value);
# Line 1015  class Data { Line 1199  class Data {
1199       this Data object.       this Data object.
1200    */    */
1201    template <class UnaryFunction>    template <class UnaryFunction>
1202      ESCRIPT_DLL_API
1203    inline    inline
1204    void    void
1205    unaryOp(UnaryFunction operation);    unaryOp(UnaryFunction operation);
# Line 1026  class Data { Line 1211  class Data {
1211       \param region - Input - Region to copy.       \param region - Input - Region to copy.
1212       *       *
1213    */    */
1214      ESCRIPT_DLL_API
1215    Data    Data
1216    getSlice(const DataArrayView::RegionType& region) const;    getSlice(const DataArrayView::RegionType& region) const;
1217    
# Line 1037  class Data { Line 1223  class Data {
1223       \param region - Input - Region to copy.       \param region - Input - Region to copy.
1224       *       *
1225    */    */
1226      ESCRIPT_DLL_API
1227    void    void
1228    setSlice(const Data& value,    setSlice(const Data& value,
1229             const DataArrayView::RegionType& region);             const DataArrayView::RegionType& region);
# Line 1046  class Data { Line 1233  class Data {
1233       Archive the current Data object to the given file.       Archive the current Data object to the given file.
1234       \param fileName - Input - file to archive to.       \param fileName - Input - file to archive to.
1235    */    */
1236      ESCRIPT_DLL_API
1237    void    void
1238    archiveData(const std::string fileName);    archiveData(const std::string fileName);
1239    
# Line 1057  class Data { Line 1245  class Data {
1245       \param fileName - Input - file to extract from.       \param fileName - Input - file to extract from.
1246       \param fspace - Input - a suitable FunctionSpace descibing the data.       \param fspace - Input - a suitable FunctionSpace descibing the data.
1247    */    */
1248      ESCRIPT_DLL_API
1249    void    void
1250    extractData(const std::string fileName,    extractData(const std::string fileName,
1251                const FunctionSpace& fspace);                const FunctionSpace& fspace);
1252    
1253    
1254      /**
1255         \brief
1256         print the data values to stdout. Used for debugging
1257      */
1258      ESCRIPT_DLL_API
1259      void
1260        print(void);
1261    
1262      /**
1263         \brief
1264         return the MPI rank number of the local data
1265             MPI_COMM_WORLD is assumed and the result of MPI_Comm_size()
1266             is returned
1267      */
1268      ESCRIPT_DLL_API
1269        int
1270        get_MPIRank(void) const;
1271    
1272      /**
1273         \brief
1274         return the MPI rank number of the local data
1275             MPI_COMM_WORLD is assumed and the result of MPI_Comm_rank()
1276             is returned
1277      */
1278      ESCRIPT_DLL_API
1279        int
1280        get_MPISize(void) const;
1281    
1282      /**
1283         \brief
1284         return the MPI rank number of the local data
1285             MPI_COMM_WORLD is assumed and returned.
1286      */
1287      ESCRIPT_DLL_API
1288        MPI_Comm
1289        get_MPIComm(void) const;
1290    
1291      /**
1292         \brief
1293         return the object produced by the factory, which is a DataConstant or DataExpanded
1294      */
1295      ESCRIPT_DLL_API
1296        DataAbstract*
1297        borrowData(void) const;
1298    
1299   protected:   protected:
1300    
1301   private:   private:
# Line 1118  class Data { Line 1353  class Data {
1353    
1354    /**    /**
1355       \brief       \brief
      Perform the given binary operation on all of the data's elements.  
      RHS is a boost::python object.  
   */  
   template <class BinaryFunction>  
   inline  
   void  
   binaryOp(const boost::python::object& right,  
            BinaryFunction operation);  
   
   /**  
      \brief  
1356       Convert the data type of the RHS to match this.       Convert the data type of the RHS to match this.
1357       \param right - Input - data type to match.       \param right - Input - data type to match.
1358    */    */
# Line 1153  class Data { Line 1377  class Data {
1377               const FunctionSpace& what,               const FunctionSpace& what,
1378               bool expanded);               bool expanded);
1379    
1380    /**    //
1381       \brief    // flag to protect the data object against any update
1382       Reshape the data point if the data point is currently rank 0.    bool m_protected;
      Will throw an exception if the data points are not rank 0.  
      The original data point value is used for all values of the new  
      data point.  
   */  
   void  
   reshapeDataPoint(const DataArrayView::ShapeType& shape);  
1383    
1384    //    //
1385    // pointer to the actual data object    // pointer to the actual data object
# Line 1198  Data::initialise(const IValueType& value Line 1416  Data::initialise(const IValueType& value
1416  /**  /**
1417     Binary Data object operators.     Binary Data object operators.
1418  */  */
1419    inline double rpow(double x,double y)
1420    {
1421        return pow(y,x);
1422    };
1423    
1424  /**  /**
1425    \brief    \brief
1426    Operator+    Operator+
1427    Takes two Data objects.    Takes two Data objects.
1428  */  */
1429  Data operator+(const Data& left, const Data& right);  ESCRIPT_DLL_API Data operator+(const Data& left, const Data& right);
1430    
1431  /**  /**
1432    \brief    \brief
1433    Operator-    Operator-
1434    Takes two Data objects.    Takes two Data objects.
1435  */  */
1436  Data operator-(const Data& left, const Data& right);  ESCRIPT_DLL_API Data operator-(const Data& left, const Data& right);
1437    
1438  /**  /**
1439    \brief    \brief
1440    Operator*    Operator*
1441    Takes two Data objects.    Takes two Data objects.
1442  */  */
1443  Data operator*(const Data& left, const Data& right);  ESCRIPT_DLL_API Data operator*(const Data& left, const Data& right);
1444    
1445  /**  /**
1446    \brief    \brief
1447    Operator/    Operator/
1448    Takes two Data objects.    Takes two Data objects.
1449  */  */
1450  Data operator/(const Data& left, const Data& right);  ESCRIPT_DLL_API Data operator/(const Data& left, const Data& right);
1451    
1452  /**  /**
1453    \brief    \brief
# Line 1233  Data operator/(const Data& left, const D Line 1455  Data operator/(const Data& left, const D
1455    Takes LHS Data object and RHS python::object.    Takes LHS Data object and RHS python::object.
1456    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1457  */  */
1458  Data operator+(const Data& left, const boost::python::object& right);  ESCRIPT_DLL_API Data operator+(const Data& left, const boost::python::object& right);
1459    
1460  /**  /**
1461    \brief    \brief
# Line 1241  Data operator+(const Data& left, const b Line 1463  Data operator+(const Data& left, const b
1463    Takes LHS Data object and RHS python::object.    Takes LHS Data object and RHS python::object.
1464    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1465  */  */
1466  Data operator-(const Data& left, const boost::python::object& right);  ESCRIPT_DLL_API Data operator-(const Data& left, const boost::python::object& right);
1467    
1468  /**  /**
1469    \brief    \brief
# Line 1249  Data operator-(const Data& left, const b Line 1471  Data operator-(const Data& left, const b
1471    Takes LHS Data object and RHS python::object.    Takes LHS Data object and RHS python::object.
1472    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1473  */  */
1474  Data operator*(const Data& left, const boost::python::object& right);  ESCRIPT_DLL_API Data operator*(const Data& left, const boost::python::object& right);
1475    
1476  /**  /**
1477    \brief    \brief
# Line 1257  Data operator*(const Data& left, const b Line 1479  Data operator*(const Data& left, const b
1479    Takes LHS Data object and RHS python::object.    Takes LHS Data object and RHS python::object.
1480    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1481  */  */
1482  Data operator/(const Data& left, const boost::python::object& right);  ESCRIPT_DLL_API Data operator/(const Data& left, const boost::python::object& right);
1483    
1484  /**  /**
1485    \brief    \brief
# Line 1265  Data operator/(const Data& left, const b Line 1487  Data operator/(const Data& left, const b
1487    Takes LHS python::object and RHS Data object.    Takes LHS python::object and RHS Data object.
1488    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1489  */  */
1490  Data operator+(const boost::python::object& left, const Data& right);  ESCRIPT_DLL_API Data operator+(const boost::python::object& left, const Data& right);
1491    
1492  /**  /**
1493    \brief    \brief
# Line 1273  Data operator+(const boost::python::obje Line 1495  Data operator+(const boost::python::obje
1495    Takes LHS python::object and RHS Data object.    Takes LHS python::object and RHS Data object.
1496    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1497  */  */
1498  Data operator-(const boost::python::object& left, const Data& right);  ESCRIPT_DLL_API Data operator-(const boost::python::object& left, const Data& right);
1499    
1500  /**  /**
1501    \brief    \brief
# Line 1281  Data operator-(const boost::python::obje Line 1503  Data operator-(const boost::python::obje
1503    Takes LHS python::object and RHS Data object.    Takes LHS python::object and RHS Data object.
1504    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1505  */  */
1506  Data operator*(const boost::python::object& left, const Data& right);  ESCRIPT_DLL_API Data operator*(const boost::python::object& left, const Data& right);
1507    
1508  /**  /**
1509    \brief    \brief
# Line 1289  Data operator*(const boost::python::obje Line 1511  Data operator*(const boost::python::obje
1511    Takes LHS python::object and RHS Data object.    Takes LHS python::object and RHS Data object.
1512    python::object must be convertable to Data type.    python::object must be convertable to Data type.
1513  */  */
1514  Data operator/(const boost::python::object& left, const Data& right);  ESCRIPT_DLL_API Data operator/(const boost::python::object& left, const Data& right);
1515    
1516  /**  /**
1517    \brief    \brief
1518    Output operator    Output operator
1519  */  */
1520  std::ostream& operator<<(std::ostream& o, const Data& data);  ESCRIPT_DLL_API std::ostream& operator<<(std::ostream& o, const Data& data);
1521    
1522    /**
1523      \brief
1524      Compute a tensor product of two Data objects
1525      \param arg0 - Input - Data object
1526      \param arg1 - Input - Data object
1527      \param axis_offset - Input - axis offset
1528      \param transpose - Input - 0: transpose neither, 1: transpose arg0, 2: transpose arg1
1529    */
1530    ESCRIPT_DLL_API
1531    Data
1532    C_GeneralTensorProduct(Data& arg0,
1533                         Data& arg1,
1534                         int axis_offset=0,
1535                         int transpose=0);
1536    
1537  /**  /**
1538    \brief    \brief
# Line 1303  std::ostream& operator<<(std::ostream& o Line 1540  std::ostream& operator<<(std::ostream& o
1540    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
1541    be relied on. Requires further implementation.    be relied on. Requires further implementation.
1542  */  */
1543  //bool operator==(const Data& left, const Data& right);  //ESCRIPT_DLL_API bool operator==(const Data& left, const Data& right);
1544    
1545  /**  /**
1546    \brief    \brief
# Line 1319  Data::binaryOp(const Data& right, Line 1556  Data::binaryOp(const Data& right,
1556     //     //
1557     // if this has a rank of zero promote it to the rank of the RHS     // if this has a rank of zero promote it to the rank of the RHS
1558     if (getPointDataView().getRank()==0 && right.getPointDataView().getRank()!=0) {     if (getPointDataView().getRank()==0 && right.getPointDataView().getRank()!=0) {
1559       reshapeDataPoint(right.getPointDataView().getShape());       throw DataException("Error - attempt to update rank zero object with object with rank bigger than zero.");
1560     }     }
1561     //     //
1562     // initially make the temporary a shallow copy     // initially make the temporary a shallow copy
# Line 1371  Data::binaryOp(const Data& right, Line 1608  Data::binaryOp(const Data& right,
1608       EsysAssert((leftC!=0 && rightC!=0), "Programming error - casting to DataConstant.");       EsysAssert((leftC!=0 && rightC!=0), "Programming error - casting to DataConstant.");
1609       escript::binaryOp(*leftC,*rightC,operation);       escript::binaryOp(*leftC,*rightC,operation);
1610     }     }
1611  }     #if defined DOPROF
1612       profData->binary++;
1613  /**     #endif
   \brief  
   Perform the given binary operation with this and right as operands.  
   Right is a boost::python object.  
 */  
 template <class BinaryFunction>  
 inline  
 void  
 Data::binaryOp(const boost::python::object& right,  
                BinaryFunction operation)  
 {  
    DataArray temp(right);  
    //  
    // if this has a rank of zero promote it to the rank of the RHS.  
    if (getPointDataView().getRank()==0 && temp.getView().getRank()!=0) {  
       reshapeDataPoint(temp.getView().getShape());  
    }  
    //  
    // Always allow scalar values for the RHS but check other shapes  
    if (temp.getView().getRank()!=0) {  
      if (!getPointDataView().checkShape(temp.getView().getShape())) {  
        throw DataException(getPointDataView().createShapeErrorMessage(  
                   "Error - RHS shape doesn't match LHS shape.",temp.getView().getShape()));  
      }  
    }  
    if (isExpanded()) {  
      DataExpanded* leftC=dynamic_cast<DataExpanded*>(m_data.get());  
      EsysAssert((leftC!=0),"Programming error - casting to DataExpanded.");  
      escript::binaryOp(*leftC,temp.getView(),operation);  
    } else if (isTagged()) {  
      DataTagged* leftC=dynamic_cast<DataTagged*>(m_data.get());  
      EsysAssert((leftC!=0), "Programming error - casting to DataTagged.");  
      escript::binaryOp(*leftC,temp.getView(),operation);  
    } else if (isConstant()) {  
      DataConstant* leftC=dynamic_cast<DataConstant*>(m_data.get());  
      EsysAssert((leftC!=0),"Programming error - casting to DataConstant.");  
      escript::binaryOp(*leftC,temp.getView(),operation);  
    }  
1614  }  }
1615    
1616  /**  /**

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

  ViewVC Help
Powered by ViewVC 1.1.26