/[escript]/temp/escript/src/Data.h
ViewVC logotype

Diff of /temp/escript/src/Data.h

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

trunk/esys2/escript/src/Data/Data.h revision 149 by jgs, Thu Sep 1 03:31:39 2005 UTC trunk/escript/src/Data.h revision 544 by jgs, Tue Feb 21 01:23:23 2006 UTC
# Line 18  Line 18 
18  #ifndef DATA_H  #ifndef DATA_H
19  #define DATA_H  #define DATA_H
20    
21  #include "escript/Data/DataAbstract.h"  #include "DataAbstract.h"
22  #include "escript/Data/DataTagged.h"  #include "DataAlgorithm.h"
23  #include "escript/Data/DataAlgorithm.h"  #include "FunctionSpace.h"
24  #include "escript/Data/FunctionSpace.h"  #include "BinaryOp.h"
25  #include "escript/Data/BinaryOp.h"  #include "UnaryOp.h"
26  #include "escript/Data/UnaryOp.h"  #include "DataException.h"
 #include "escript/Data/DataException.h"  
27    
28  extern "C" {  extern "C" {
29  #include "escript/Data/DataC.h"  #include "DataC.h"
30  }  }
31    
 #include <iostream>  
32  #include <string>  #include <string>
 #include <memory>  
33  #include <algorithm>  #include <algorithm>
34    
35  #include <boost/shared_ptr.hpp>  #include <boost/shared_ptr.hpp>
36  #include <boost/python/object.hpp>  #include <boost/python/object.hpp>
 #include <boost/python/list.hpp>  
37  #include <boost/python/tuple.hpp>  #include <boost/python/tuple.hpp>
38  #include <boost/python/numeric.hpp>  #include <boost/python/numeric.hpp>
39    
# Line 45  namespace escript { Line 41  namespace escript {
41    
42  //  //
43  // Forward declaration for various implementations of Data.  // Forward declaration for various implementations of Data.
 class DataEmpty;  
44  class DataConstant;  class DataConstant;
45  class DataTagged;  class DataTagged;
46  class DataExpanded;  class DataExpanded;
# Line 150  class Data { Line 145  class Data {
145       \param what - Input - A description of what this data represents.       \param what - Input - A description of what this data represents.
146       \param expanded - Input - Flag, if true fill the entire container with       \param expanded - Input - Flag, if true fill the entire container with
147                         the appropriate values.                         the appropriate values.
148        ==>*
149    */    */
150    Data(const DataTagged::TagListType& tagKeys,    Data(const DataTagged::TagListType& tagKeys,
151         const DataTagged::ValueListType& values,         const DataTagged::ValueListType& values,
# Line 206  class Data { Line 202  class Data {
202         const boost::python::tuple& shape=boost::python::make_tuple(),         const boost::python::tuple& shape=boost::python::make_tuple(),
203         const FunctionSpace& what=FunctionSpace(),         const FunctionSpace& what=FunctionSpace(),
204         bool expanded=false);         bool expanded=false);
205      /**
206         \brief
207         Destructor
208      */
209      ~Data();
210    
211    /**    /**
212       \brief       \brief
# Line 307  class Data { Line 308  class Data {
308       If possible convert this Data to DataTagged. This will only allow       If possible convert this Data to DataTagged. This will only allow
309       Constant data to be converted to tagged. An attempt to convert       Constant data to be converted to tagged. An attempt to convert
310       Expanded data to tagged will throw an exception.       Expanded data to tagged will throw an exception.
311        ==>*
312    */    */
313    void    void
314    tag();    tag();
# Line 525  class Data { Line 527  class Data {
527       cannot be converted to a DataTagged object.       cannot be converted to a DataTagged object.
528       \param tagKey - Input - Integer key.       \param tagKey - Input - Integer key.
529       \param value - Input - Value to associate with given key.       \param value - Input - Value to associate with given key.
530        ==>*
531    */    */
532    void    void
533    setTaggedValue(int tagKey,    setTaggedValue(int tagKey,
# Line 537  class Data { Line 540  class Data {
540       cannot be converted to a DataTagged object.       cannot be converted to a DataTagged object.
541       \param tagKey - Input - Integer key.       \param tagKey - Input - Integer key.
542       \param value - Input - Value to associate with given key.       \param value - Input - Value to associate with given key.
543        ==>*
544    */    */
545    void    void
546    setTaggedValueFromCPP(int tagKey,    setTaggedValueFromCPP(int tagKey,
# Line 701  class Data { Line 705  class Data {
705    
706    /**    /**
707       \brief       \brief
      Return the length of each data point of this Data object.  
      sqrt(sum(A[i,j,k,l]^2))  
      *  
   */  
   Data  
   length() const;  
   
   /**  
      \brief  
708       Return the sign of each data point of this Data object.       Return the sign of each data point of this Data object.
709       -1 for negative values, zero for zero values, 1 for positive values.       -1 for negative values, zero for zero values, 1 for positive values.
710       *       *
# Line 761  class Data { Line 756  class Data {
756    
757    /**    /**
758       \brief       \brief
759         Return the asin of each data point of this Data object.
760         *
761      */
762      Data
763      asin() const;
764    
765      /**
766         \brief
767         Return the acos of each data point of this Data object.
768         *
769      */
770      Data
771      acos() const;
772    
773      /**
774         \brief
775         Return the atan of each data point of this Data object.
776         *
777      */
778      Data
779      atan() const;
780    
781      /**
782         \brief
783         Return the sinh of each data point of this Data object.
784         *
785      */
786      Data
787      sinh() const;
788    
789      /**
790         \brief
791         Return the cosh of each data point of this Data object.
792         *
793      */
794      Data
795      cosh() const;
796    
797      /**
798         \brief
799         Return the tanh of each data point of this Data object.
800         *
801      */
802      Data
803      tanh() const;
804    
805      /**
806         \brief
807         Return the asinh of each data point of this Data object.
808         *
809      */
810      Data
811      asinh() const;
812    
813      /**
814         \brief
815         Return the acosh of each data point of this Data object.
816         *
817      */
818      Data
819      acosh() const;
820    
821      /**
822         \brief
823         Return the atanh of each data point of this Data object.
824         *
825      */
826      Data
827      atanh() const;
828    
829      /**
830         \brief
831       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.
832       *       *
833    */    */
834    Data    Data
835    log() const;    log10() const;
836    
837    /**    /**
838       \brief       \brief
# Line 773  class Data { Line 840  class Data {
840       *       *
841    */    */
842    Data    Data
843    ln() const;    log() const;
844    
845    /**    /**
846       \brief       \brief

Legend:
Removed from v.149  
changed lines
  Added in v.544

  ViewVC Help
Powered by ViewVC 1.1.26