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

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

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

revision 122 by jgs, Thu Jun 9 05:38:05 2005 UTC revision 123 by jgs, Fri Jul 8 04:08:13 2005 UTC
# Line 541  class Data { Line 541  class Data {
541       \brief       \brief
542       Interpolates this onto the given functionspace and returns       Interpolates this onto the given functionspace and returns
543       the result as a Data object.       the result as a Data object.
544         *
545    */    */
546    Data    Data
547    interpolate(const FunctionSpace& functionspace) const;    interpolate(const FunctionSpace& functionspace) const;
# Line 549  class Data { Line 550  class Data {
550       \brief       \brief
551       Calculates the gradient of the data at the data points of functionspace.       Calculates the gradient of the data at the data points of functionspace.
552       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.
553         *
554    */    */
555    Data    Data
556    gradOn(const FunctionSpace& functionspace) const;    gradOn(const FunctionSpace& functionspace) const;
# Line 559  class Data { Line 561  class Data {
561    /**    /**
562       \brief       \brief
563       Calculate the integral over the function space domain.       Calculate the integral over the function space domain.
564         *
565    */    */
566    boost::python::numeric::array    boost::python::numeric::array
567    integrate() const;    integrate() const;
# Line 566  class Data { Line 569  class Data {
569    /**    /**
570       \brief       \brief
571       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.
572         *
573    */    */
574    Data    Data
575    wherePositive() const;    wherePositive() const;
# Line 573  class Data { Line 577  class Data {
577    /**    /**
578       \brief       \brief
579       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.
580         *
581    */    */
582    Data    Data
583    whereNegative() const;    whereNegative() const;
# Line 580  class Data { Line 585  class Data {
585    /**    /**
586       \brief       \brief
587       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.
588         *
589    */    */
590    Data    Data
591    whereNonNegative() const;    whereNonNegative() const;
# Line 587  class Data { Line 593  class Data {
593    /**    /**
594       \brief       \brief
595       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.
596         *
597    */    */
598    Data    Data
599    whereNonPositive() const;    whereNonPositive() const;
# Line 594  class Data { Line 601  class Data {
601    /**    /**
602       \brief       \brief
603       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.
604         *
605    */    */
606    Data    Data
607    whereZero() const;    whereZero() const;
# Line 601  class Data { Line 609  class Data {
609    /**    /**
610       \brief       \brief
611       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.
612         *
613    */    */
614    Data    Data
615    whereNonZero() const;    whereNonZero() const;
616    
617    /**    /**
618       \brief       \brief
      Return the sin of each data point of this Data object.  
   */  
   Data  
   sin() const;  
   
   /**  
      \brief  
      Return the cos of each data point of this Data object.  
   */  
   Data  
   cos() const;  
   
   /**  
      \brief  
      Return the tan of each data point of this Data object.  
   */  
   Data  
   tan() const;  
   
   /**  
      \brief  
      Return the log to base 10 of each data point of this Data object.  
   */  
   Data  
   log() const;  
   
   /**  
      \brief  
      Return the natural log of each data point of this Data object.  
   */  
   Data  
   ln() const;  
   
   /**  
      \brief  
619       Return the maximum absolute value of this Data object.       Return the maximum absolute value of this Data object.
620         *
621    */    */
622    double    double
623    Lsup() const;    Lsup() const;
# Line 650  class Data { Line 625  class Data {
625    /**    /**
626       \brief       \brief
627       Return the minimum absolute value of this Data object.       Return the minimum absolute value of this Data object.
628         *
629    */    */
630    double    double
631    Linf() const;    Linf() const;
# Line 657  class Data { Line 633  class Data {
633    /**    /**
634       \brief       \brief
635       Return the maximum value of this Data object.       Return the maximum value of this Data object.
636         *
637    */    */
638    double    double
639    sup() const;    sup() const;
# Line 664  class Data { Line 641  class Data {
641    /**    /**
642       \brief       \brief
643       Return the minimum value of this Data object.       Return the minimum value of this Data object.
644         *
645    */    */
646    double    double
647    inf() const;    inf() const;
# Line 671  class Data { Line 649  class Data {
649    /**    /**
650       \brief       \brief
651       Return the absolute value of each data point of this Data object.       Return the absolute value of each data point of this Data object.
652         *
653    */    */
654    Data    Data
655    abs() const;    abs() const;
# Line 678  class Data { Line 657  class Data {
657    /**    /**
658       \brief       \brief
659       Return the maximum value of each data point of this Data object.       Return the maximum value of each data point of this Data object.
660         *
661    */    */
662    Data    Data
663    maxval() const;    maxval() const;
# Line 685  class Data { Line 665  class Data {
665    /**    /**
666       \brief       \brief
667       Return the minimum value of each data point of this Data object.       Return the minimum value of each data point of this Data object.
668         *
669    */    */
670    Data    Data
671    minval() const;    minval() const;
# Line 701  class Data { Line 682  class Data {
682       \brief       \brief
683       Return the length of each data point of this Data object.       Return the length of each data point of this Data object.
684       sqrt(sum(A[i,j,k,l]^2))       sqrt(sum(A[i,j,k,l]^2))
685         *
686    */    */
687    Data    Data
688    length() const;    length() const;
# Line 709  class Data { Line 691  class Data {
691       \brief       \brief
692       Return the sign of each data point of this Data object.       Return the sign of each data point of this Data object.
693       -1 for negative values, zero for zero values, 1 for positive values.       -1 for negative values, zero for zero values, 1 for positive values.
694         *
695    */    */
696    Data    Data
697    sign() const;    sign() const;
698    
699    /**    /**
700      \brief       \brief
701      Transpose each data point of this Data object around the given axis.       Transpose each data point of this Data object around the given axis.
702      --* not implemented yet *--       --* not implemented yet *--
703         *
704    */    */
705    Data    Data
706    transpose(int axis) const;    transpose(int axis) const;
707    
708    /**    /**
709      \brief       \brief
710      Calculate the trace of each data point of this Data object.       Calculate the trace of each data point of this Data object.
711      sum(A[i,i,i,i])       sum(A[i,i,i,i])
712         *
713    */    */
714    Data    Data
715    trace() const;    trace() const;
716    
717    /**    /**
718      \brief       \brief
719      Return the exponential function of each data point of this Data object.       Return the sin of each data point of this Data object.
720         *
721      */
722      Data
723      sin() const;
724    
725      /**
726         \brief
727         Return the cos of each data point of this Data object.
728         *
729      */
730      Data
731      cos() const;
732    
733      /**
734         \brief
735         Return the tan of each data point of this Data object.
736         *
737      */
738      Data
739      tan() const;
740    
741      /**
742         \brief
743         Return the log to base 10 of each data point of this Data object.
744         *
745      */
746      Data
747      log() const;
748    
749      /**
750         \brief
751         Return the natural log of each data point of this Data object.
752         *
753      */
754      Data
755      ln() const;
756    
757      /**
758         \brief
759         Return the exponential function of each data point of this Data object.
760         *
761    */    */
762    Data    Data
763    exp() const;    exp() const;
764    
765    /**    /**
766      \brief       \brief
767      Return the square root of each data point of this Data object.       Return the square root of each data point of this Data object.
768         *
769    */    */
770    Data    Data
771    sqrt() const;    sqrt() const;
772    
773    /**    /**
774      \brief       \brief
775      Return the negation of each data point of this Data object.       Return the negation of each data point of this Data object.
776         *
777    */    */
778    Data    Data
779    neg() const;    neg() const;
780    
781    /**    /**
782      \brief       \brief
783      Return the identity of each data point of this Data object.       Return the identity of each data point of this Data object.
784      Simply returns this object unmodified.       Simply returns this object unmodified.
785         *
786    */    */
787    Data    Data
788    pos() const;    pos() const;
# Line 763  class Data { Line 792  class Data {
792       Return the given power of each data point of this Data object.       Return the given power of each data point of this Data object.
793    
794       \param right Input - the power to raise the object to.       \param right Input - the power to raise the object to.
795         *
796    */    */
797    Data    Data
798    powD(const Data& right) const;    powD(const Data& right) const;
799    
800    /**    /**
801     * \brief       \brief
802     * Return the given power of each data point of this boost python object.       Return the given power of each data point of this boost python object.
803     *      
804     * \param right Input - the power to raise the object to.       \param right Input - the power to raise the object to.
805         *
806     */     */
807    Data    Data
808    powO(const boost::python::object& right) const;    powO(const boost::python::object& right) const;
809    
810    /**    /**
811      \brief       \brief
812      writes the object to a file in the DX file format       writes the object to a file in the DX file format
813    */    */
814    void    void
815    saveDX(std::string fileName) const;    saveDX(std::string fileName) const;
816    
817    /**    /**
818      \brief       \brief
819      writes the object to a file in the VTK file format       writes the object to a file in the VTK file format
820    */    */
821    void    void
822    saveVTK(std::string fileName) const;    saveVTK(std::string fileName) const;
# Line 794  class Data { Line 825  class Data {
825       \brief       \brief
826       Overloaded operator +=       Overloaded operator +=
827       \param right - Input - The right hand side.       \param right - Input - The right hand side.
828         *
829    */    */
830    Data& operator+=(const Data& right);    Data& operator+=(const Data& right);
831    Data& operator+=(const boost::python::object& right);    Data& operator+=(const boost::python::object& right);
# Line 802  class Data { Line 834  class Data {
834       \brief       \brief
835       Overloaded operator -=       Overloaded operator -=
836       \param right - Input - The right hand side.       \param right - Input - The right hand side.
837         *
838    */    */
839    Data& operator-=(const Data& right);    Data& operator-=(const Data& right);
840    Data& operator-=(const boost::python::object& right);    Data& operator-=(const boost::python::object& right);
# Line 810  class Data { Line 843  class Data {
843       \brief       \brief
844       Overloaded operator *=       Overloaded operator *=
845       \param right - Input - The right hand side.       \param right - Input - The right hand side.
846         *
847    */    */
848    Data& operator*=(const Data& right);    Data& operator*=(const Data& right);
849    Data& operator*=(const boost::python::object& right);    Data& operator*=(const boost::python::object& right);
# Line 818  class Data { Line 852  class Data {
852       \brief       \brief
853       Overloaded operator /=       Overloaded operator /=
854       \param right - Input - The right hand side.       \param right - Input - The right hand side.
855         *
856    */    */
857    Data& operator/=(const Data& right);    Data& operator/=(const Data& right);
858    Data& operator/=(const boost::python::object& right);    Data& operator/=(const boost::python::object& right);
# Line 883  class Data { Line 918  class Data {
918       Return a Data object containing the specified slice of       Return a Data object containing the specified slice of
919       this Data object.       this Data object.
920       \param region - Input - Region to copy.       \param region - Input - Region to copy.
921         *
922    */    */
923    Data    Data
924    getSlice(const DataArrayView::RegionType& region) const;    getSlice(const DataArrayView::RegionType& region) const;
# Line 893  class Data { Line 929  class Data {
929       Data object.       Data object.
930       \param value - Input - Data to copy from.       \param value - Input - Data to copy from.
931       \param region - Input - Region to copy.       \param region - Input - Region to copy.
932         *
933    */    */
934    void    void
935    setSlice(const Data& value,    setSlice(const Data& value,
# Line 1022  class Data { Line 1059  class Data {
1059    // pointer to the actual data object    // pointer to the actual data object
1060    boost::shared_ptr<DataAbstract> m_data;    boost::shared_ptr<DataAbstract> m_data;
1061    
1062      //
1063      // pointer to the internal profiling data
1064      struct profDataEntry *profData;
1065    
1066  };  };
1067    
1068  template <class IValueType>  template <class IValueType>

Legend:
Removed from v.122  
changed lines
  Added in v.123

  ViewVC Help
Powered by ViewVC 1.1.26