/[escript]/trunk/esys2/escript/inc/esys/AbstractAccessor.h
ViewVC logotype

Contents of /trunk/esys2/escript/inc/esys/AbstractAccessor.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 82 - (show annotations)
Tue Oct 26 06:53:54 2004 UTC (16 years ago) by jgs
File MIME type: text/plain
File size: 2217 byte(s)
Initial revision

1 /*=============================================================================
2
3 ******************************************************************************
4 * *
5 * COPYRIGHT ??????? - All Rights Reserved *
6 * *
7 * This software is the property of ??????????????. No part of this code *
8 * may be copied in any form or by any means without the expressed written *
9 * consent of ???????????. Copying, use or modification of this software *
10 * by any unauthorised person is illegal unless that *
11 * person has a software license agreement with ?????????????. *
12 * *
13 ******************************************************************************
14
15 *********************************************************************************/
16
17 #ifndef ABSTRACTACCESSOR_H
18 #define ABSTRACTACCESSOR_H
19
20 #include <string>
21 #include <vector>
22 #include <Python.h>
23 #include <boost/python/object.hpp>
24 #include <boost/python/list.hpp>
25 #include <boost/python/numeric.hpp>
26
27 /**
28 @memo
29 Data
30
31 @version 1.0.0
32
33 @doc
34
35 Class Description:
36 Base class for classes that provide a consistant interface to
37 an underlying vector of data.
38
39 Class Limitations:
40 None
41
42 Class Conditions of Use:
43 None
44
45 Throws:
46 None
47
48 */
49 class AbstractAccessor {
50 public:
51
52 typedef std::vector<double> ValueContainerType;
53
54 /**
55 @memo
56 Constructor which sets the shape of the point data.
57
58 */
59 AbstractAccessor(const std::vector<int>& pointDataShape, int blockSize, int numBlocks);
60 /**
61 @memo
62 Destructor
63 */
64 virtual ~AbstractAccessor();
65 /**
66 @memo
67 Method to copy from pointData into values
68
69 */
70 virtual void copy(const boost::python::numeric::array& pointData,ValueContainerType& values) const=0;
71 /**
72 @memo
73 Method to perform the given operation on each value
74 */
75 virtual void evaluate(ValueContainerType& values, void (*operation)(double)) const=0;
76 private:
77
78 };
79
80 #endif

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26