/[escript]/trunk/escript/src/Data/DataVariable.h
ViewVC logotype

Contents of /trunk/escript/src/Data/DataVariable.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 155 - (show annotations)
Wed Nov 9 02:02:19 2005 UTC (14 years, 6 months ago) by jgs
File MIME type: text/plain
File size: 3395 byte(s)
move all directories from trunk/esys2 into trunk and remove esys2

1 /*
2 ******************************************************************************
3 * *
4 * COPYRIGHT ACcESS 2004 - All Rights Reserved *
5 * *
6 * This software is the property of ACcESS. No part of this code *
7 * may be copied in any form or by any means without the expressed written *
8 * consent of ACcESS. Copying, use or modification of this software *
9 * by any unauthorised person is illegal unless that person has a software *
10 * license agreement with ACcESS. *
11 * *
12 ******************************************************************************
13 */
14
15 #if !defined escript_DataVariable_20050422_H
16 #define escript_DataVariable_20050422_H
17
18 #include "escript/Data/FunctionSpace.h"
19 #include "escript/Data/DataException.h"
20 #include "escript/Data/DataArrayView.h"
21 #include "escript/Data/DataVector.h"
22 #include "escript/Data/Data.h"
23 #include "escript/Data/DataExpanded.h"
24
25 namespace escript {
26
27 /**
28 \brief
29 Give a short description of what DataVariable does.
30
31 Description:
32 Give a detailed description of DataVariable
33
34 Template Parameters:
35 For templates describe any conditions that the parameters used in the
36 template must satisfy
37 */
38
39 class DataVariable {
40
41 public:
42
43 enum OpCode {nullop, idop, sumop, diffop};
44
45 /**
46 \brief
47 Default constructor for DataVariable
48
49 Description:
50 Default constructor for DataVariable
51
52 Preconditions:
53 Describe any preconditions
54
55 Throws:
56 Describe any exceptions thrown
57 */
58 DataVariable();
59
60 /**
61 \brief
62 Constructor for DataVariable
63
64 Description:
65 Constructor for DataVariable
66
67 Preconditions:
68 Describe any preconditions
69
70 Throws:
71 Describe any exceptions thrown
72 */
73 DataVariable(Data* data);
74
75 /**
76 \brief
77 Destructor for DataVariable
78
79 Description:
80 Destructor for DataVariable
81
82 Preconditions:
83 Describe any preconditions
84
85 Throws:
86 Describe any exceptions thrown
87 */
88 ~DataVariable();
89
90 /**
91 \brief
92 Evaluator for DataVariable
93
94 Description:
95 Evaluator for DataVariable
96
97 Preconditions:
98 Describe any preconditions
99
100 Throws:
101 Describe any exceptions thrown
102 */
103 Data evaluate();
104
105 /**
106 \brief
107 Evaluator by sampleNo for DataVariable
108
109 Description:
110 Evaluator by sampleNo for DataVariable
111
112 Preconditions:
113 Describe any preconditions
114
115 Throws:
116 Describe any exceptions thrown
117 */
118 double* evaluate_samp(int sampleNo);
119
120 /**
121 \brief
122 Addor for DataVariable
123
124 Description:
125 Addor for DataVariable
126
127 Preconditions:
128 Describe any preconditions
129
130 Throws:
131 Describe any exceptions thrown
132 */
133 void sum(DataVariable* right);
134
135 /**
136 \brief
137 Diffor for DataVariable
138
139 Description:
140 Diffor for DataVariable
141
142 Preconditions:
143 Describe any preconditions
144
145 Throws:
146 Describe any exceptions thrown
147 */
148 void diff(DataVariable* right);
149
150 protected:
151
152 private:
153
154 OpCode op;
155
156 Data* leftArg;
157
158 DataVariable* rightArg;
159
160 double* opBuffer;
161
162 };
163
164 } // end of namespace
165
166 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26