/[escript]/trunk/escript/test/python/test_objects.py
ViewVC logotype

Annotation of /trunk/escript/test/python/test_objects.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1149 - (hide annotations)
Thu May 17 00:30:15 2007 UTC (15 years, 6 months ago) by gross
File MIME type: text/x-python
File size: 70191 byte(s)
some fixes from the windows version
1 gross 983 # $Id:$
2     """
3     Test suite for data objects. at the moment for dump and load only.
4    
5     The tests must be linked with some function space class object in the setUp method:
6     to run the use:
7    
8     from esys.finley import Brick
9     class Test_DumpOnFinley(Test_Dump):
10     def setUp(self):
11     self.domain =Rectangle(NE,NE+1,2)
12     self.domain_with_different_number_of_samples =Rectangle(2*NE,NE+1,2)
13     self.domain_with_different_number_of_data_points_per_sample =Rectangle(2*NE,NE+1,2,integrationOrder=2)
14     self.domain_with_different_sample_ordering =Rectangle(1,(NE+1)*NE,2)
15 gross 1141 self.filename_base="."
16 gross 983
17     suite = unittest.TestSuite()
18     suite.addTest(unittest.makeSuite(Test_DumpOnFinley))
19     unittest.TextTestRunner(verbosity=2).run(suite)
20    
21     @var __author__: name of author
22     @var __copyright__: copyrights
23     @var __license__: licence agreement
24     @var __url__: url entry point on documentation
25     @var __version__: version
26     @var __date__: date of the version
27     """
28    
29     __author__="Lutz Gross, l.gross@uq.edu.au"
30     __copyright__=""" Copyright (c) 2006, 2007 by ACcESS MNRF
31     http://www.access.edu.au
32     Primary Business: Queensland, Australia"""
33     __license__="""Licensed under the Open Software License version 3.0
34     http://www.opensource.org/licenses/osl-3.0.php"""
35     __url__="http://www.iservo.edu.au/esys/escript"
36     __version__="$Revision:$"
37     __date__="$Date:$"
38    
39     import unittest
40     import os
41     import numarray
42     from esys.escript import *
43    
44 gross 1044 class Test_Domain(unittest.TestCase):
45     def test_addTags(self):
46     tag1="A"
47     tag2="B"
48     tag3="C"
49     self.domain.setTagMap(tag1,1)
50     self.failUnless(self.domain.isValidTagName(tag1))
51     self.failUnless(not self.domain.isValidTagName(tag2))
52     self.domain.setTagMap(tag2,2)
53     self.failUnless(self.domain.isValidTagName(tag1))
54     self.failUnless(self.domain.isValidTagName(tag2))
55     self.failUnless(not self.domain.isValidTagName(tag3))
56     self.failUnless(self.domain.getTag(tag1)==1)
57     self.failUnless(self.domain.getTag(tag2)==2)
58     self.failUnlessRaises(RuntimeError,self.domain.getTag,tag3)
59    
60     # set tag:
61     s=Scalar(0,Function(self.domain))
62     r=Scalar(0,Function(self.domain))
63     s.setTaggedValue(tag1,1.)
64     r.setTaggedValue(1,1.)
65     s.setTaggedValue(tag2,2.)
66     r.setTaggedValue(2,2.)
67     s.setTaggedValue(tag3,3.)
68     self.failUnless(Lsup(s-r)<=0.)
69     # get tag:
70     names=getTagNames(self.domain)
71     self.failUnless(len(names) == 2)
72     self.failUnless( tag1 in names )
73     self.failUnless( tag2 in names )
74     self.failUnless(self.domain.isValidTagName(tag1))
75     self.failUnless(self.domain.isValidTagName(tag2))
76     # insert tag shortcut:
77     s2=insertTaggedValues(Scalar(0,Function(self.domain)),**{ tag1 : 1., tag2 : 2.})
78     self.failUnless(Lsup(s2-r)<=0.)
79 gross 1063 def test_functionspace_ContinuousFunction(self):
80     fs=ContinuousFunction(self.domain)
81     self.failUnless(fs.getDomain()==self.domain)
82     self.failUnless(self.domain.getDim() == fs.getDim())
83     x=fs.getX()
84     self.failUnless(x.getFunctionSpace() == fs)
85     self.failUnless(x.getShape() == (fs.getDim(),))
86     self.failUnless(inf(x[0])>=0.)
87     if self.domain.getDim()>1: self.failUnless(inf(x[1])>=0.)
88     if self.domain.getDim()>2: self.failUnless(inf(x[2])>=0.)
89     self.failUnless(sup(x[0])<=1.)
90     if self.domain.getDim()>1: self.failUnless(sup(x[1])<=1.)
91     if self.domain.getDim()>2: self.failUnless(sup(x[2])<=1.)
92 gross 1044
93 gross 1063 def test_functionspace_Solution(self):
94     fs=Solution(self.domain)
95     self.failUnless(fs.getDomain()==self.domain)
96     self.failUnless(self.domain.getDim() == fs.getDim())
97     x=fs.getX()
98     self.failUnless(x.getFunctionSpace() == fs)
99     self.failUnless(x.getShape() == (fs.getDim(),))
100     self.failUnless(inf(x[0])>=0.)
101     if self.domain.getDim()>1: self.failUnless(inf(x[1])>=0.)
102     if self.domain.getDim()>2: self.failUnless(inf(x[2])>=0.)
103     self.failUnless(sup(x[0])<=1.)
104     if self.domain.getDim()>1: self.failUnless(sup(x[1])<=1.)
105     if self.domain.getDim()>2: self.failUnless(sup(x[2])<=1.)
106 gross 1044
107 gross 1063 def test_functionspace_ReducedSolution(self):
108     fs=ReducedSolution(self.domain)
109     self.failUnless(fs.getDomain()==self.domain)
110     self.failUnless(self.domain.getDim() == fs.getDim())
111     x=fs.getX()
112     self.failUnless(x.getFunctionSpace() == fs)
113     self.failUnless(x.getShape() == (fs.getDim(),))
114     self.failUnless(inf(x[0])>=0.)
115     if self.domain.getDim()>1: self.failUnless(inf(x[1])>=0.)
116     if self.domain.getDim()>2: self.failUnless(inf(x[2])>=0.)
117     self.failUnless(sup(x[0])<=1.)
118     if self.domain.getDim()>1: self.failUnless(sup(x[1])<=1.)
119     if self.domain.getDim()>2: self.failUnless(sup(x[2])<=1.)
120    
121     def test_functionspace_Function(self):
122     fs=Function(self.domain)
123     self.failUnless(fs.getDomain()==self.domain)
124     self.failUnless(self.domain.getDim() == fs.getDim())
125     x=fs.getX()
126     self.failUnless(x.getFunctionSpace() == fs)
127     self.failUnless(x.getShape() == (fs.getDim(),))
128     self.failUnless(inf(x[0])>=0.)
129     if self.domain.getDim()>1: self.failUnless(inf(x[1])>=0.)
130     if self.domain.getDim()>2: self.failUnless(inf(x[2])>=0.)
131     self.failUnless(sup(x[0])<=1.)
132     if self.domain.getDim()>1: self.failUnless(sup(x[1])<=1.)
133     if self.domain.getDim()>2: self.failUnless(sup(x[2])<=1.)
134    
135     def test_functionspace_ReducedFunction(self):
136     fs=ReducedFunction(self.domain)
137     self.failUnless(fs.getDomain()==self.domain)
138     self.failUnless(self.domain.getDim() == fs.getDim())
139     x=fs.getX()
140     self.failUnless(x.getFunctionSpace() == fs)
141     self.failUnless(x.getShape() == (fs.getDim(),))
142     self.failUnless(inf(x[0])>=0.)
143     if self.domain.getDim()>1: self.failUnless(inf(x[1])>=0.)
144     if self.domain.getDim()>2: self.failUnless(inf(x[2])>=0.)
145     self.failUnless(sup(x[0])<=1.)
146     if self.domain.getDim()>1: self.failUnless(sup(x[1])<=1.)
147     if self.domain.getDim()>2: self.failUnless(sup(x[2])<=1.)
148     def test_functionspace_FunctionOnBoundary(self):
149     fs=FunctionOnBoundary(self.domain)
150     self.failUnless(fs.getDomain()==self.domain)
151     self.failUnless(self.domain.getDim() == fs.getDim())
152     x=fs.getX()
153     self.failUnless(x.getFunctionSpace() == fs)
154     self.failUnless(x.getShape() == (fs.getDim(),))
155     self.failUnless(inf(x[0])>=0.)
156     if self.domain.getDim()>1: self.failUnless(inf(x[1])>=0.)
157     if self.domain.getDim()>2: self.failUnless(inf(x[2])>=0.)
158     self.failUnless(sup(x[0])<=1.)
159     if self.domain.getDim()>1: self.failUnless(sup(x[1])<=1.)
160     if self.domain.getDim()>2: self.failUnless(sup(x[2])<=1.)
161    
162     def test_functionspace_ReducedFunctionOnBoundary(self):
163     fs=ReducedFunctionOnBoundary(self.domain)
164     self.failUnless(fs.getDomain()==self.domain)
165     self.failUnless(self.domain.getDim() == fs.getDim())
166     x=fs.getX()
167     self.failUnless(x.getFunctionSpace() == fs)
168     self.failUnless(x.getShape() == (fs.getDim(),))
169     self.failUnless(inf(x[0])>=0.)
170     if self.domain.getDim()>1: self.failUnless(inf(x[1])>=0.)
171     if self.domain.getDim()>2: self.failUnless(inf(x[2])>=0.)
172     self.failUnless(sup(x[0])<=1.)
173     if self.domain.getDim()>1: self.failUnless(sup(x[1])<=1.)
174     if self.domain.getDim()>2: self.failUnless(sup(x[2])<=1.)
175 gross 1141 #===========================================================================
176     class Test_SetDataPointValue(unittest.TestCase):
177     arg0=9.81
178     arg1=numarray.array([3.098, -3.111])
179     arg2=numarray.array([[3.82, -3.81, -0.957, 0.892, -1.367], [-4.589, -1.835, -2.679, -1.517, -4.2515], [-4.909, 1.634, -2.883, -2.135, 1.187], [0.6431, 4.638, -4.616, -0.196, -4.370]])
180     arg3=numarray.array([[[-2.3667, -0.040], [-4.7398, -3.2412]], [[-2.125, -2.240], [2.237, -4.279]], [[0.68720, 2.4059], [-2.4964, 3.17453]], [[-4.907, -4.9431], [-0.3604, 0.4269]], [[1.4179, 3.326], [1.356, -0.4610]], [[3.378, 2.0902], [-2.6857, 1.3585]]])
181     arg4=numarray.array([[[[-3.810, -1.3597, -1.5307, 1.099], [-1.828, 0.2526, -1.4429, 2.326], [4.9732, -2.063, 1.3153, -3.809]], [[-4.8902, -4.714, 1.520, -1.931], [-3.8847, 4.3867, 1.894030, 2.432], [-1.2082, -0.8304, 2.2612, 4.6399]]], [[[-4.5922, -3.309, -0.8171, -0.7210], [2.8051, -4.93047, 0.08450, 4.3824], [0.43204, 2.1908, 4.512633, -1.8218]], [[2.2493, -4.190, -2.3893, -4.147], [-2.104, -4.635, -4.2767, -3.53151], [-2.351, -1.6614, 2.9385, 4.099]]], [[[1.710, 0.2235, -3.4917, 0.8713], [-0.2881, 4.6278, 3.603, -2.1211], [-0.565, 4.294, -2.210827, -0.37651]], [[0.6578, -2.869, -2.490, -4.789], [3.232, 2.483, 0.9531, 2.260], [-1.785, 0.42156, -1.8379, 4.212]]]])
182     def test_SetDataPointValue_Function_Rank0(self):
183     d=Data(self.arg0,Function(self.domain))
184     d.setValueOfDataPoint(0,self.arg0*2)
185     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg1)
186     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg0)
187     d_0=d.getValueOfDataPoint(0)
188     d_1=d.getValueOfDataPoint(1)
189     self.failUnless(Lsup(d_0-self.arg0*2)<=Lsup(self.arg0*2), "wrong setting")
190     self.failUnless(Lsup(d_1-self.arg0)<=Lsup(self.arg0), "wrong setting")
191     def test_SetDataPointValue_Function_Rank1(self):
192     d=Data(self.arg1,Function(self.domain))
193     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg2)
194     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg1)
195     d.setValueOfDataPoint(0,self.arg1*2)
196     d_0=d.getValueOfDataPoint(0)
197     d_1=d.getValueOfDataPoint(1)
198     self.failUnless(Lsup(d_0-self.arg1*2)<=Lsup(self.arg1*2), "wrong setting")
199     self.failUnless(Lsup(d_1-self.arg1)<=Lsup(self.arg1), "wrong setting")
200     def test_SetDataPointValue_Function_Rank1_list(self):
201     d=Data(self.arg1,Function(self.domain))
202     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg2)
203     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg1)
204     d.setValueOfDataPoint(0,numarray.array2list(self.arg1*2))
205     d_0=d.getValueOfDataPoint(0)
206     d_1=d.getValueOfDataPoint(1)
207     self.failUnless(Lsup(d_0-self.arg1*2)<=Lsup(self.arg1*2), "wrong setting")
208     self.failUnless(Lsup(d_1-self.arg1)<=Lsup(self.arg1), "wrong setting")
209     def test_SetDataPointValue_Function_Rank2(self):
210     d=Data(self.arg2,Function(self.domain))
211     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg1)
212     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg2)
213     d.setValueOfDataPoint(0,self.arg2*2)
214     d_0=d.getValueOfDataPoint(0)
215     d_1=d.getValueOfDataPoint(1)
216     self.failUnless(Lsup(d_0-self.arg2*2)<=Lsup(self.arg2*2), "wrong setting")
217     self.failUnless(Lsup(d_1-self.arg2)<=Lsup(self.arg2), "wrong setting")
218     def test_SetDataPointValue_Function_Rank2_list(self):
219     d=Data(self.arg2,Function(self.domain))
220     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg1)
221     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg2)
222     d.setValueOfDataPoint(0,numarray.array2list(self.arg2*2))
223     d_0=d.getValueOfDataPoint(0)
224     d_1=d.getValueOfDataPoint(1)
225     self.failUnless(Lsup(d_0-self.arg2*2)<=Lsup(self.arg2*2), "wrong setting")
226     self.failUnless(Lsup(d_1-self.arg2)<=Lsup(self.arg2), "wrong setting")
227     def test_SetDataPointValue_Function_Rank3(self):
228     d=Data(self.arg3,Function(self.domain))
229     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg1)
230     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg3)
231     d.setValueOfDataPoint(0,self.arg3*2)
232     d_0=d.getValueOfDataPoint(0)
233     d_1=d.getValueOfDataPoint(1)
234     self.failUnless(Lsup(d_0-self.arg3*2)<=Lsup(self.arg3*2), "wrong setting")
235     self.failUnless(Lsup(d_1-self.arg3)<=Lsup(self.arg3), "wrong setting")
236     def test_SetDataPointValue_Function_Rank3_list(self):
237     d=Data(self.arg3,Function(self.domain))
238     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg1)
239     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg3)
240     d.setValueOfDataPoint(0,numarray.array2list(self.arg3*2))
241     d_0=d.getValueOfDataPoint(0)
242     d_1=d.getValueOfDataPoint(1)
243     self.failUnless(Lsup(d_0-self.arg3*2)<=Lsup(self.arg3*2), "wrong setting")
244     self.failUnless(Lsup(d_1-self.arg3)<=Lsup(self.arg3), "wrong setting")
245     def test_SetDataPointValue_Function_Rank4(self):
246     d=Data(self.arg4,Function(self.domain))
247     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg1)
248     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg4)
249     d.setValueOfDataPoint(0,self.arg4*2)
250     d_0=d.getValueOfDataPoint(0)
251     d_1=d.getValueOfDataPoint(1)
252     self.failUnless(Lsup(d_0-self.arg4*2)<=Lsup(self.arg4*2), "wrong setting")
253     self.failUnless(Lsup(d_1-self.arg4)<=Lsup(self.arg4), "wrong setting")
254     def test_SetDataPointValue_Function_Rank4_list(self):
255     d=Data(self.arg4,Function(self.domain))
256     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg1)
257     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg4)
258     d.setValueOfDataPoint(0,numarray.array2list(self.arg4*2))
259     d_0=d.getValueOfDataPoint(0)
260     d_1=d.getValueOfDataPoint(1)
261     self.failUnless(Lsup(d_0-self.arg4*2)<=Lsup(self.arg4*2), "wrong setting")
262     self.failUnless(Lsup(d_1-self.arg4)<=Lsup(self.arg4), "wrong setting")
263     #===========================================================================
264     def test_SetDataPointValue_ReducedFunction_Rank0(self):
265     d=Data(self.arg0,ReducedFunction(self.domain))
266     d.setValueOfDataPoint(0,self.arg0*2)
267     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg1)
268     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg0)
269     d_0=d.getValueOfDataPoint(0)
270     d_1=d.getValueOfDataPoint(1)
271     self.failUnless(Lsup(d_0-self.arg0*2)<=Lsup(self.arg0*2), "wrong setting")
272     self.failUnless(Lsup(d_1-self.arg0)<=Lsup(self.arg0), "wrong setting")
273     def test_SetDataPointValue_ReducedFunction_Rank1(self):
274     d=Data(self.arg1,ReducedFunction(self.domain))
275     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg2)
276     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg1)
277     d.setValueOfDataPoint(0,self.arg1*2)
278     d_0=d.getValueOfDataPoint(0)
279     d_1=d.getValueOfDataPoint(1)
280     self.failUnless(Lsup(d_0-self.arg1*2)<=Lsup(self.arg1*2), "wrong setting")
281     self.failUnless(Lsup(d_1-self.arg1)<=Lsup(self.arg1), "wrong setting")
282     def test_SetDataPointValue_ReducedFunction_Rank1_list(self):
283     d=Data(self.arg1,ReducedFunction(self.domain))
284     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg2)
285     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg1)
286     d.setValueOfDataPoint(0,numarray.array2list(self.arg1*2))
287     d_0=d.getValueOfDataPoint(0)
288     d_1=d.getValueOfDataPoint(1)
289     self.failUnless(Lsup(d_0-self.arg1*2)<=Lsup(self.arg1*2), "wrong setting")
290     self.failUnless(Lsup(d_1-self.arg1)<=Lsup(self.arg1), "wrong setting")
291     def test_SetDataPointValue_ReducedFunction_Rank2(self):
292     d=Data(self.arg2,ReducedFunction(self.domain))
293     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg1)
294     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg2)
295     d.setValueOfDataPoint(0,self.arg2*2)
296     d_0=d.getValueOfDataPoint(0)
297     d_1=d.getValueOfDataPoint(1)
298     self.failUnless(Lsup(d_0-self.arg2*2)<=Lsup(self.arg2*2), "wrong setting")
299     self.failUnless(Lsup(d_1-self.arg2)<=Lsup(self.arg2), "wrong setting")
300     def test_SetDataPointValue_ReducedFunction_Rank2_list(self):
301     d=Data(self.arg2,ReducedFunction(self.domain))
302     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg1)
303     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg2)
304     d.setValueOfDataPoint(0,numarray.array2list(self.arg2*2))
305     d_0=d.getValueOfDataPoint(0)
306     d_1=d.getValueOfDataPoint(1)
307     self.failUnless(Lsup(d_0-self.arg2*2)<=Lsup(self.arg2*2), "wrong setting")
308     self.failUnless(Lsup(d_1-self.arg2)<=Lsup(self.arg2), "wrong setting")
309     def test_SetDataPointValue_ReducedFunction_Rank3(self):
310     d=Data(self.arg3,ReducedFunction(self.domain))
311     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg1)
312     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg3)
313     d.setValueOfDataPoint(0,self.arg3*2)
314     d_0=d.getValueOfDataPoint(0)
315     d_1=d.getValueOfDataPoint(1)
316     self.failUnless(Lsup(d_0-self.arg3*2)<=Lsup(self.arg3*2), "wrong setting")
317     self.failUnless(Lsup(d_1-self.arg3)<=Lsup(self.arg3), "wrong setting")
318     def test_SetDataPointValue_ReducedFunction_Rank3_list(self):
319     d=Data(self.arg3,ReducedFunction(self.domain))
320     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg1)
321     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg3)
322     d.setValueOfDataPoint(0,numarray.array2list(self.arg3*2))
323     d_0=d.getValueOfDataPoint(0)
324     d_1=d.getValueOfDataPoint(1)
325     self.failUnless(Lsup(d_0-self.arg3*2)<=Lsup(self.arg3*2), "wrong setting")
326     self.failUnless(Lsup(d_1-self.arg3)<=Lsup(self.arg3), "wrong setting")
327     def test_SetDataPointValue_ReducedFunction_Rank4(self):
328     d=Data(self.arg4,ReducedFunction(self.domain))
329     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg1)
330     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg4)
331     d.setValueOfDataPoint(0,self.arg4*2)
332     d_0=d.getValueOfDataPoint(0)
333     d_1=d.getValueOfDataPoint(1)
334     self.failUnless(Lsup(d_0-self.arg4*2)<=Lsup(self.arg4*2), "wrong setting")
335     self.failUnless(Lsup(d_1-self.arg4)<=Lsup(self.arg4), "wrong setting")
336     def test_SetDataPointValue_ReducedFunction_Rank4_list(self):
337     d=Data(self.arg4,ReducedFunction(self.domain))
338     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, 0, self.arg1)
339     self.failUnlessRaises(RuntimeError, d.setValueOfDataPoint, -1, self.arg4)
340     d.setValueOfDataPoint(0,numarray.array2list(self.arg4*2))
341     d_0=d.getValueOfDataPoint(0)
342     d_1=d.getValueOfDataPoint(1)
343     self.failUnless(Lsup(d_0-self.arg4*2)<=Lsup(self.arg4*2), "wrong setting")
344     self.failUnless(Lsup(d_1-self.arg4)<=Lsup(self.arg4), "wrong setting")
345 gross 1063
346 gross 983 class Test_Dump(unittest.TestCase):
347     arg0=9.81
348     arg1=numarray.array([3.098, -3.111])
349     arg2=numarray.array([[3.82, -3.81, -0.957, 0.892, -1.367], [-4.589, -1.835, -2.679, -1.517, -4.2515], [-4.909, 1.634, -2.883, -2.135, 1.187], [0.6431, 4.638, -4.616, -0.196, -4.370]])
350     arg3=numarray.array([[[-2.3667, -0.040], [-4.7398, -3.2412]], [[-2.125, -2.240], [2.237, -4.279]], [[0.68720, 2.4059], [-2.4964, 3.17453]], [[-4.907, -4.9431], [-0.3604, 0.4269]], [[1.4179, 3.326], [1.356, -0.4610]], [[3.378, 2.0902], [-2.6857, 1.3585]]])
351     arg4=numarray.array([[[[-3.810, -1.3597, -1.5307, 1.099], [-1.828, 0.2526, -1.4429, 2.326], [4.9732, -2.063, 1.3153, -3.809]], [[-4.8902, -4.714, 1.520, -1.931], [-3.8847, 4.3867, 1.894030, 2.432], [-1.2082, -0.8304, 2.2612, 4.6399]]], [[[-4.5922, -3.309, -0.8171, -0.7210], [2.8051, -4.93047, 0.08450, 4.3824], [0.43204, 2.1908, 4.512633, -1.8218]], [[2.2493, -4.190, -2.3893, -4.147], [-2.104, -4.635, -4.2767, -3.53151], [-2.351, -1.6614, 2.9385, 4.099]]], [[[1.710, 0.2235, -3.4917, 0.8713], [-0.2881, 4.6278, 3.603, -2.1211], [-0.565, 4.294, -2.210827, -0.37651]], [[0.6578, -2.869, -2.490, -4.789], [3.232, 2.483, 0.9531, 2.260], [-1.785, 0.42156, -1.8379, 4.212]]]])
352    
353 gross 1141 def _diffDataObjects(self,d_ref,filemame):
354 gross 1149 d_ref.dump(filemame)
355     d=load(filemame, self.domain)
356 gross 1141 self.failUnless(not d.isEmpty(),"data in %s are empty."%filemame)
357     self.failUnless(d_ref.getFunctionSpace() == d.getFunctionSpace(), "wrong function space in %s."%filemame)
358     self.failUnless(d_ref.getRank() == d.getRank(), "different rank in %s. "%filemame)
359     self.failUnless(d_ref.getShape() == d.getShape(), "different shape %s. "%filemame)
360     self.failUnless(Lsup(d_ref-d)<=0., "different entries %s."%filemame)
361 gross 983
362     #===========================================================================
363     def test_DumpAndLoad_Constant_Solution_Rank0(self):
364 gross 1023 if loadIsConfigured():
365 gross 1141 filemame=os.path.join(self.filename_base,"constant_solution_rank0.nc")
366 gross 1023 d=Data(self.arg0,Solution(self.domain))
367 gross 1141 self._diffDataObjects(d,filemame)
368 gross 983
369     def test_DumpAndLoad_Constant_Solution_Rank1(self):
370 gross 1023 if loadIsConfigured():
371 gross 1141 filemame=os.path.join(self.filename_base,"constant_solution_rank1.nc")
372 gross 1023 d=Data(self.arg1,Solution(self.domain))
373 gross 1141 self._diffDataObjects(d,filemame)
374 gross 983
375     def test_DumpAndLoad_Constant_Solution_Rank2(self):
376 gross 1023 if loadIsConfigured():
377 gross 1141 filemame=os.path.join(self.filename_base,"constant_solution_rank2.nc")
378 gross 1023 d=Data(self.arg2,Solution(self.domain))
379 gross 1141 self._diffDataObjects(d,filemame)
380 gross 983
381     def test_DumpAndLoad_Constant_Solution_Rank3(self):
382 gross 1023 if loadIsConfigured():
383 gross 1141 filemame=os.path.join(self.filename_base,"constant_solution_rank3.nc")
384 gross 1023 d=Data(self.arg3,Solution(self.domain))
385 gross 1141 self._diffDataObjects(d,filemame)
386 gross 983
387     def test_DumpAndLoad_Constant_Solution_Rank4(self):
388 gross 1023 if loadIsConfigured():
389 gross 1141 filemame=os.path.join(self.filename_base,"constant_solution_rank4.nc")
390 gross 1023 d=Data(self.arg4,Solution(self.domain))
391 gross 1141 self._diffDataObjects(d,filemame)
392 gross 983 #===========================================================================
393     def test_DumpAndLoad_Constant_ReducedSolution_Rank0(self):
394 gross 1023 if loadIsConfigured():
395 gross 1141 filemame=os.path.join(self.filename_base,"constant_reduced_solution_rank0.nc")
396 gross 1023 d=Data(self.arg0,ReducedSolution(self.domain))
397 gross 1141 self._diffDataObjects(d,filemame)
398 gross 983
399     def test_DumpAndLoad_Constant_ReducedSolution_Rank1(self):
400 gross 1023 if loadIsConfigured():
401 gross 1141 filemame=os.path.join(self.filename_base,"constant_reduced_solution_rank1.nc")
402 gross 1023 d=Data(self.arg1,ReducedSolution(self.domain))
403 gross 1141 self._diffDataObjects(d,filemame)
404 gross 983
405     def test_DumpAndLoad_Constant_ReducedSolution_Rank2(self):
406 gross 1023 if loadIsConfigured():
407 gross 1141 filemame=os.path.join(self.filename_base,"constant_reduced_solution_rank2.nc")
408 gross 1023 d=Data(self.arg2,ReducedSolution(self.domain))
409 gross 1141 self._diffDataObjects(d,filemame)
410 gross 983
411     def test_DumpAndLoad_Constant_ReducedSolution_Rank3(self):
412 gross 1023 if loadIsConfigured():
413 gross 1141 filemame=os.path.join(self.filename_base,"constant_reduced_solution_rank3.nc")
414 gross 1023 d=Data(self.arg3,ReducedSolution(self.domain))
415 gross 1141 self._diffDataObjects(d,filemame)
416 gross 983
417     def test_DumpAndLoad_Constant_ReducedSolution_Rank4(self):
418 gross 1023 if loadIsConfigured():
419 gross 1141 filemame=os.path.join(self.filename_base,"constant_reduced_solution_rank4.nc")
420 gross 1023 d=Data(self.arg4,ReducedSolution(self.domain))
421 gross 1141 self._diffDataObjects(d,filemame)
422 gross 983 #===========================================================================
423     def test_DumpAndLoad_Constant_ContinuousFunction_Rank0(self):
424 gross 1023 if loadIsConfigured():
425 gross 1141 filemame=os.path.join(self.filename_base,"constant_continuous_function_rank0.nc")
426 gross 1023 d=Data(self.arg0,ContinuousFunction(self.domain))
427 gross 1141 self._diffDataObjects(d,filemame)
428 gross 983
429     def test_DumpAndLoad_Constant_ContinuousFunction_Rank1(self):
430 gross 1023 if loadIsConfigured():
431 gross 1141 filemame=os.path.join(self.filename_base,"constant_continuous_function_rank1.nc")
432 gross 1023 d=Data(self.arg1,ContinuousFunction(self.domain))
433 gross 1141 self._diffDataObjects(d,filemame)
434 gross 983
435     def test_DumpAndLoad_Constant_ContinuousFunction_Rank2(self):
436 gross 1023 if loadIsConfigured():
437 gross 1141 filemame=os.path.join(self.filename_base,"constant_continuous_function_rank2.nc")
438 gross 1023 d=Data(self.arg2,ContinuousFunction(self.domain))
439 gross 1141 self._diffDataObjects(d,filemame)
440 gross 983
441     def test_DumpAndLoad_Constant_ContinuousFunction_Rank3(self):
442 gross 1023 if loadIsConfigured():
443 gross 1141 filemame=os.path.join(self.filename_base,"constant_continuous_function_rank3.nc")
444 gross 1023 d=Data(self.arg3,ContinuousFunction(self.domain))
445 gross 1141 self._diffDataObjects(d,filemame)
446 gross 983
447     def test_DumpAndLoad_Constant_ContinuousFunction_Rank4(self):
448 gross 1023 if loadIsConfigured():
449 gross 1141 filemame=os.path.join(self.filename_base,"constant_continuous_function_rank4.nc")
450 gross 1023 d=Data(self.arg4,ContinuousFunction(self.domain))
451 gross 1141 self._diffDataObjects(d,filemame)
452 gross 983
453     #===========================================================================
454     def test_DumpAndLoad_Constant_Function_Rank0(self):
455 gross 1023 if loadIsConfigured():
456 gross 1141 filemame=os.path.join(self.filename_base,"constant_function_rank0.nc")
457 gross 1023 d=Data(self.arg0,Function(self.domain))
458 gross 1141 self._diffDataObjects(d,filemame)
459 gross 983
460     def test_DumpAndLoad_Constant_Function_Rank1(self):
461 gross 1023 if loadIsConfigured():
462 gross 1141 filemame=os.path.join(self.filename_base,"constant_function_rank1.nc")
463 gross 1023 d=Data(self.arg1,Function(self.domain))
464 gross 1141 self._diffDataObjects(d,filemame)
465 gross 983
466     def test_DumpAndLoad_Constant_Function_Rank2(self):
467 gross 1023 if loadIsConfigured():
468 gross 1141 filemame=os.path.join(self.filename_base,"constant_function_rank2.nc")
469 gross 1023 d=Data(self.arg2,Function(self.domain))
470 gross 1141 self._diffDataObjects(d,filemame)
471 gross 983
472     def test_DumpAndLoad_Constant_Function_Rank3(self):
473 gross 1023 if loadIsConfigured():
474 gross 1141 filemame=os.path.join(self.filename_base,"constant_function_rank3.nc")
475 gross 1023 d=Data(self.arg3,Function(self.domain))
476 gross 1141 self._diffDataObjects(d,filemame)
477 gross 983
478 gross 1063 #===========================================================================
479     def test_DumpAndLoad_Constant_ReducedFunction_Rank0(self):
480 gross 1023 if loadIsConfigured():
481 gross 1141 filemame=os.path.join(self.filename_base,"constant_reduced_function_rank0.nc")
482 gross 1063 d=Data(self.arg0,ReducedFunction(self.domain))
483 gross 1141 self._diffDataObjects(d,filemame)
484 gross 983
485 gross 1063 def test_DumpAndLoad_Constant_ReducedFunction_Rank1(self):
486     if loadIsConfigured():
487 gross 1141 filemame=os.path.join(self.filename_base,"constant_reduced_function_rank1.nc")
488 gross 1063 d=Data(self.arg1,ReducedFunction(self.domain))
489 gross 1141 self._diffDataObjects(d,filemame)
490 gross 1063
491     def test_DumpAndLoad_Constant_ReducedFunction_Rank2(self):
492     if loadIsConfigured():
493 gross 1141 filemame=os.path.join(self.filename_base,"constant_reduced_function_rank2.nc")
494 gross 1063 d=Data(self.arg2,ReducedFunction(self.domain))
495 gross 1141 self._diffDataObjects(d,filemame)
496 gross 1063
497     def test_DumpAndLoad_Constant_ReducedFunction_Rank3(self):
498     if loadIsConfigured():
499 gross 1141 filemame=os.path.join(self.filename_base,"constant_reduced_function_rank3.nc")
500 gross 1063 d=Data(self.arg3,ReducedFunction(self.domain))
501 gross 1141 self._diffDataObjects(d,filemame)
502 gross 1063 def test_DumpAndLoad_Constant_ReducedFunction_Rank4(self):
503     if loadIsConfigured():
504 gross 1141 filemame=os.path.join(self.filename_base,"constant_reduced_function_rank4.nc")
505 gross 1063 d=Data(self.arg4,ReducedFunction(self.domain))
506 gross 1141 self._diffDataObjects(d,filemame)
507 gross 1063
508 gross 983 #===========================================================================
509     def test_DumpAndLoad_Constant_FunctionOnBoundary_Rank0(self):
510 gross 1023 if loadIsConfigured():
511 gross 1141 filemame=os.path.join(self.filename_base,"constant_function_on_boundary_rank0.nc")
512 gross 1023 d=Data(self.arg0,FunctionOnBoundary(self.domain))
513 gross 1141 self._diffDataObjects(d,filemame)
514 gross 983
515     def test_DumpAndLoad_Constant_FunctionOnBoundary_Rank1(self):
516 gross 1023 if loadIsConfigured():
517 gross 1141 filemame=os.path.join(self.filename_base,"constant_function_on_boundary_rank1.nc")
518 gross 1023 d=Data(self.arg1,FunctionOnBoundary(self.domain))
519 gross 1141 self._diffDataObjects(d,filemame)
520 gross 983
521     def test_DumpAndLoad_Constant_FunctionOnBoundary_Rank2(self):
522 gross 1023 if loadIsConfigured():
523 gross 1141 filemame=os.path.join(self.filename_base,"constant_function_on_boundary_rank2.nc")
524 gross 1023 d=Data(self.arg2,FunctionOnBoundary(self.domain))
525 gross 1141 self._diffDataObjects(d,filemame)
526 gross 983
527     def test_DumpAndLoad_Constant_FunctionOnBoundary_Rank3(self):
528 gross 1023 if loadIsConfigured():
529 gross 1141 filemame=os.path.join(self.filename_base,"constant_function_on_boundary_rank3.nc")
530 gross 1023 d=Data(self.arg3,FunctionOnBoundary(self.domain))
531 gross 1141 self._diffDataObjects(d,filemame)
532 gross 983
533     def test_DumpAndLoad_Constant_FunctionOnBoundary_Rank4(self):
534 gross 1023 if loadIsConfigured():
535 gross 1141 filemame=os.path.join(self.filename_base,"constant_function_on_boundary_rank4.nc")
536 gross 1023 d=Data(self.arg4,FunctionOnBoundary(self.domain))
537 gross 1141 self._diffDataObjects(d,filemame)
538 gross 983
539     #===========================================================================
540 gross 1063 def test_DumpAndLoad_Constant_ReducedFunctionOnBoundary_Rank0(self):
541     if loadIsConfigured():
542 gross 1141 filemame=os.path.join(self.filename_base,"constant_reduced_function_on_boundary_rank0.nc")
543 gross 1063 d=Data(self.arg0,FunctionOnBoundary(self.domain))
544 gross 1141 self._diffDataObjects(d,filemame)
545 gross 1063
546     def test_DumpAndLoad_Constant_ReducedFunctionOnBoundary_Rank1(self):
547     if loadIsConfigured():
548 gross 1141 filemame=os.path.join(self.filename_base,"constant_reduced_function_on_boundary_rank1.nc")
549 gross 1063 d=Data(self.arg1,ReducedFunctionOnBoundary(self.domain))
550 gross 1141 self._diffDataObjects(d,filemame)
551 gross 1063
552     def test_DumpAndLoad_Constant_ReducedFunctionOnBoundary_Rank2(self):
553     if loadIsConfigured():
554 gross 1141 filemame=os.path.join(self.filename_base,"constant_reduced_function_on_boundary_rank2.nc")
555 gross 1063 d=Data(self.arg2,ReducedFunctionOnBoundary(self.domain))
556 gross 1141 self._diffDataObjects(d,filemame)
557 gross 1063
558     def test_DumpAndLoad_Constant_ReducedFunctionOnBoundary_Rank3(self):
559     if loadIsConfigured():
560 gross 1141 filemame=os.path.join(self.filename_base,"constant_reduced_function_on_boundary_rank3.nc")
561 gross 1063 d=Data(self.arg3,ReducedFunctionOnBoundary(self.domain))
562 gross 1141 self._diffDataObjects(d,filemame)
563 gross 1063
564     def test_DumpAndLoad_Constant_ReducedFunctionOnBoundary_Rank4(self):
565     if loadIsConfigured():
566 gross 1141 filemame=os.path.join(self.filename_base,"constant_reduced_function_on_boundary_rank4.nc")
567 gross 1063 d=Data(self.arg4,ReducedFunctionOnBoundary(self.domain))
568 gross 1141 self._diffDataObjects(d,filemame)
569 gross 1063
570     #===========================================================================
571 gross 983 def test_DumpAndLoad_Expanded_Solution_Rank0(self):
572 gross 1023 if loadIsConfigured():
573 gross 1141 filemame=os.path.join(self.filename_base,"expanded_solution_rank0.nc")
574     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
575     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
576     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
577 gross 1023 d=Data(length(Solution(self.domain).getX())*self.arg0,Solution(self.domain))
578 gross 1141 self._diffDataObjects(d,filemame)
579 gross 983
580     def test_DumpAndLoad_Expanded_Solution_Rank1(self):
581 gross 1023 if loadIsConfigured():
582 gross 1141 filemame=os.path.join(self.filename_base,"expanded_solution_rank1.nc")
583     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
584     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
585     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
586 gross 1023 d=Data(length(Solution(self.domain).getX())*self.arg1,Solution(self.domain))
587 gross 1141 self._diffDataObjects(d,filemame)
588 gross 983
589     def test_DumpAndLoad_Expanded_Solution_Rank2(self):
590 gross 1023 if loadIsConfigured():
591 gross 1141 filemame=os.path.join(self.filename_base,"expanded_solution_rank2.nc")
592     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
593     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
594     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
595 gross 1023 d=Data(length(Solution(self.domain).getX())*self.arg2,Solution(self.domain))
596 gross 1141 self._diffDataObjects(d,filemame)
597 gross 983
598     def test_DumpAndLoad_Expanded_Solution_Rank3(self):
599 gross 1023 if loadIsConfigured():
600 gross 1141 filemame=os.path.join(self.filename_base,"expanded_solution_rank3.nc")
601     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
602     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
603     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
604 gross 1023 d=Data(length(Solution(self.domain).getX())*self.arg3,Solution(self.domain))
605 gross 1141 self._diffDataObjects(d,filemame)
606 gross 983
607     def test_DumpAndLoad_Expanded_Solution_Rank4(self):
608 gross 1023 if loadIsConfigured():
609 gross 1141 filemame=os.path.join(self.filename_base,"expanded_solution_rank4.nc")
610     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
611     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
612     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
613 gross 1023 d=Data(length(Solution(self.domain).getX())*self.arg4,Solution(self.domain))
614 gross 1141 self._diffDataObjects(d,filemame)
615 gross 983 #===========================================================================
616     def test_DumpAndLoad_Expanded_ReducedSolution_Rank0(self):
617 gross 1023 if loadIsConfigured():
618 gross 1141 filemame=os.path.join(self.filename_base,"expanded_reduced_solution_rank0.nc")
619     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
620     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
621     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
622 gross 1023 d=Data(length(ReducedSolution(self.domain).getX())*self.arg0,ReducedSolution(self.domain))
623 gross 1141 self._diffDataObjects(d,filemame)
624 gross 983
625     def test_DumpAndLoad_Expanded_ReducedSolution_Rank1(self):
626 gross 1023 if loadIsConfigured():
627 gross 1141 filemame=os.path.join(self.filename_base,"expanded_reduced_solution_rank1.nc")
628     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
629     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
630     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
631 gross 1023 d=Data(length(ReducedSolution(self.domain).getX())*self.arg1,ReducedSolution(self.domain))
632 gross 1141 self._diffDataObjects(d,filemame)
633 gross 983
634     def test_DumpAndLoad_Expanded_ReducedSolution_Rank2(self):
635 gross 1023 if loadIsConfigured():
636 gross 1141 filemame=os.path.join(self.filename_base,"expanded_reduced_solution_rank2.nc")
637     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
638     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
639     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
640 gross 1023 d=Data(length(ReducedSolution(self.domain).getX())*self.arg2,ReducedSolution(self.domain))
641 gross 1141 self._diffDataObjects(d,filemame)
642 gross 983
643     def test_DumpAndLoad_Expanded_ReducedSolution_Rank3(self):
644 gross 1023 if loadIsConfigured():
645 gross 1141 filemame=os.path.join(self.filename_base,"expanded_reduced_solution_rank3.nc")
646     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
647     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
648     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
649 gross 1023 d=Data(length(ReducedSolution(self.domain).getX())*self.arg3,ReducedSolution(self.domain))
650 gross 1141 self._diffDataObjects(d,filemame)
651 gross 983
652     def test_DumpAndLoad_Expanded_ReducedSolution_Rank4(self):
653 gross 1023 if loadIsConfigured():
654 gross 1141 filemame=os.path.join(self.filename_base,"expanded_reduced_solution_rank4.nc")
655     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
656     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
657     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
658 gross 1023 d=Data(length(ReducedSolution(self.domain).getX())*self.arg4,ReducedSolution(self.domain))
659 gross 1141 self._diffDataObjects(d,filemame)
660 gross 983 #===========================================================================
661     def test_DumpAndLoad_Expanded_ContinuousFunction_Rank0(self):
662 gross 1023 if loadIsConfigured():
663 gross 1141 filemame=os.path.join(self.filename_base,"expanded_continuous_function_rank0.nc")
664     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
665     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
666     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
667 gross 1023 d=Data(length(ContinuousFunction(self.domain).getX())*self.arg0,ContinuousFunction(self.domain))
668 gross 1141 self._diffDataObjects(d,filemame)
669 gross 983
670     def test_DumpAndLoad_Expanded_ContinuousFunction_Rank1(self):
671 gross 1023 if loadIsConfigured():
672 gross 1141 filemame=os.path.join(self.filename_base,"expanded_continuous_function_rank1.nc")
673     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
674     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
675     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
676 gross 1023 d=Data(length(ContinuousFunction(self.domain).getX())*self.arg1,ContinuousFunction(self.domain))
677 gross 1141 self._diffDataObjects(d,filemame)
678 gross 983
679     def test_DumpAndLoad_Expanded_ContinuousFunction_Rank2(self):
680 gross 1023 if loadIsConfigured():
681 gross 1141 filemame=os.path.join(self.filename_base,"expanded_continuous_function_rank2.nc")
682     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
683     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
684     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
685 gross 1023 d=Data(length(ContinuousFunction(self.domain).getX())*self.arg2,ContinuousFunction(self.domain))
686 gross 1141 self._diffDataObjects(d,filemame)
687 gross 983
688     def test_DumpAndLoad_Expanded_ContinuousFunction_Rank3(self):
689 gross 1023 if loadIsConfigured():
690 gross 1141 filemame=os.path.join(self.filename_base,"expanded_continuous_function_rank3.nc")
691 gross 1023 d=Data(length(ContinuousFunction(self.domain).getX())*self.arg3,ContinuousFunction(self.domain))
692 gross 1141 self._diffDataObjects(d,filemame)
693 gross 983
694     def test_DumpAndLoad_Expanded_ContinuousFunction_Rank4(self):
695 gross 1023 if loadIsConfigured():
696 gross 1141 filemame=os.path.join(self.filename_base,"expanded_continuous_function_rank4.nc")
697     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
698     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
699     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
700 gross 1023 d=Data(length(ContinuousFunction(self.domain).getX())*self.arg4,ContinuousFunction(self.domain))
701 gross 1141 self._diffDataObjects(d,filemame)
702 gross 983
703     #===========================================================================
704     def test_DumpAndLoad_Expanded_Function_Rank0(self):
705 gross 1023 if loadIsConfigured():
706 gross 1141 filemame=os.path.join(self.filename_base,"expanded_function_rank0.nc")
707     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
708     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
709     # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
710 gross 1023 d=Data(length(Function(self.domain).getX())*self.arg0,Function(self.domain))
711 gross 1141 self._diffDataObjects(d,filemame)
712 gross 983
713     def test_DumpAndLoad_Expanded_Function_Rank1(self):
714 gross 1023 if loadIsConfigured():
715 gross 1141 filemame=os.path.join(self.filename_base,"expanded_function_rank1.nc")
716     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
717     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
718     # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
719 gross 1023 d=Data(length(Function(self.domain).getX())*self.arg1,Function(self.domain))
720 gross 1141 self._diffDataObjects(d,filemame)
721 gross 983
722     def test_DumpAndLoad_Expanded_Function_Rank2(self):
723 gross 1023 if loadIsConfigured():
724 gross 1141 filemame=os.path.join(self.filename_base,"expanded_function_rank2.nc")
725     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
726     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
727     # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
728 gross 1023 d=Data(length(Function(self.domain).getX())*self.arg2,Function(self.domain))
729 gross 1141 self._diffDataObjects(d,filemame)
730 gross 983
731     def test_DumpAndLoad_Expanded_Function_Rank3(self):
732 gross 1023 if loadIsConfigured():
733 gross 1141 filemame=os.path.join(self.filename_base,"expanded_function_rank3.nc")
734     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
735     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
736     # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
737 gross 1023 d=Data(length(Function(self.domain).getX())*self.arg3,Function(self.domain))
738 gross 1141 self._diffDataObjects(d,filemame)
739 gross 983
740     def test_DumpAndLoad_Expanded_Function_Rank4(self):
741 gross 1023 if loadIsConfigured():
742 gross 1141 filemame=os.path.join(self.filename_base,"expanded_function_rank4.nc")
743     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
744     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
745     # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
746 gross 1023 d=Data(length(Function(self.domain).getX())*self.arg4,Function(self.domain))
747 gross 1141 self._diffDataObjects(d,filemame)
748 gross 983
749     #===========================================================================
750 gross 1063 def test_DumpAndLoad_Expanded_ReducedFunction_Rank0(self):
751     if loadIsConfigured():
752 gross 1141 filemame=os.path.join(self.filename_base,"expanded_reduced_function_rank0.nc")
753     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
754     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
755     # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
756 gross 1063 d=Data(length(ReducedFunction(self.domain).getX())*self.arg0,ReducedFunction(self.domain))
757 gross 1141 self._diffDataObjects(d,filemame)
758 gross 1063
759     def test_DumpAndLoad_Expanded_ReducedFunction_Rank1(self):
760     if loadIsConfigured():
761 gross 1141 filemame=os.path.join(self.filename_base,"expanded_reduced_function_rank1.nc")
762     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
763     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
764     # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
765 gross 1063 d=Data(length(ReducedFunction(self.domain).getX())*self.arg1,ReducedFunction(self.domain))
766 gross 1141 self._diffDataObjects(d,filemame)
767 gross 1063
768     def test_DumpAndLoad_Expanded_ReducedFunction_Rank2(self):
769     if loadIsConfigured():
770 gross 1141 filemame=os.path.join(self.filename_base,"expanded_reduced_function_rank2.nc")
771     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
772     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
773     # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
774 gross 1063 d=Data(length(ReducedFunction(self.domain).getX())*self.arg2,ReducedFunction(self.domain))
775 gross 1141 self._diffDataObjects(d,filemame)
776 gross 1063
777     def test_DumpAndLoad_Expanded_ReducedFunction_Rank3(self):
778     if loadIsConfigured():
779 gross 1141 filemame=os.path.join(self.filename_base,"expanded_reduced_function_rank3.nc")
780     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
781     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
782     # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
783 gross 1063 d=Data(length(ReducedFunction(self.domain).getX())*self.arg3,ReducedFunction(self.domain))
784 gross 1141 self._diffDataObjects(d,filemame)
785 gross 1063
786     def test_DumpAndLoad_Expanded_ReducedFunction_Rank4(self):
787     if loadIsConfigured():
788 gross 1141 filemame=os.path.join(self.filename_base,"expanded_reduced_function_rank4.nc")
789     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
790     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
791     # elements are not in different order: self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
792 gross 1063 d=Data(length(ReducedFunction(self.domain).getX())*self.arg4,ReducedFunction(self.domain))
793 gross 1141 self._diffDataObjects(d,filemame)
794 gross 1063
795     #===========================================================================
796 gross 983 def test_DumpAndLoad_Expanded_FunctionOnBoundary_Rank0(self):
797 gross 1023 if loadIsConfigured():
798 gross 1141 filemame=os.path.join(self.filename_base,"expanded_function_on_boundary_rank0.nc")
799     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
800     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
801     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
802 gross 1023 d=Data(length(FunctionOnBoundary(self.domain).getX())*self.arg0,FunctionOnBoundary(self.domain))
803 gross 1141 self._diffDataObjects(d,filemame)
804 gross 983
805     def test_DumpAndLoad_Expanded_FunctionOnBoundary_Rank1(self):
806 gross 1023 if loadIsConfigured():
807 gross 1141 filemame=os.path.join(self.filename_base,"expanded_function_on_boundary_rank1.nc")
808     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
809     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
810     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
811 gross 1023 d=Data(length(FunctionOnBoundary(self.domain).getX())*self.arg1,FunctionOnBoundary(self.domain))
812 gross 1141 self._diffDataObjects(d,filemame)
813 gross 983
814     def test_DumpAndLoad_Expanded_FunctionOnBoundary_Rank2(self):
815 gross 1023 if loadIsConfigured():
816 gross 1141 filemame=os.path.join(self.filename_base,"expanded_function_on_boundary_rank2.nc")
817     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
818     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
819     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
820 gross 1023 d=Data(length(FunctionOnBoundary(self.domain).getX())*self.arg2,FunctionOnBoundary(self.domain))
821 gross 1141 self._diffDataObjects(d,filemame)
822 gross 983
823     def test_DumpAndLoad_Expanded_FunctionOnBoundary_Rank3(self):
824 gross 1023 if loadIsConfigured():
825 gross 1141 filemame=os.path.join(self.filename_base,"expanded_function_on_boundary_rank3.nc")
826     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
827     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
828     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
829 gross 1023 d=Data(length(FunctionOnBoundary(self.domain).getX())*self.arg3,FunctionOnBoundary(self.domain))
830 gross 1141 self._diffDataObjects(d,filemame)
831 gross 983
832     def test_DumpAndLoad_Expanded_FunctionOnBoundary_Rank4(self):
833 gross 1023 if loadIsConfigured():
834 gross 1141 filemame=os.path.join(self.filename_base,"expanded_function_on_boundary_rank4.nc")
835     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
836     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
837     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
838 gross 1023 d=Data(length(FunctionOnBoundary(self.domain).getX())*self.arg4,FunctionOnBoundary(self.domain))
839 gross 1141 self._diffDataObjects(d,filemame)
840 gross 983
841     #===========================================================================
842 gross 1063 def test_DumpAndLoad_Expanded_ReducedFunctionOnBoundary_Rank0(self):
843     if loadIsConfigured():
844 gross 1141 filemame=os.path.join(self.filename_base,"expanded_reduced_function_on_boundary_rank0.nc")
845     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
846     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
847     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
848 gross 1063 d=Data(length(ReducedFunctionOnBoundary(self.domain).getX())*self.arg0,ReducedFunctionOnBoundary(self.domain))
849 gross 1141 self._diffDataObjects(d,filemame)
850 gross 1063
851     def test_DumpAndLoad_Expanded_ReducedFunctionOnBoundary_Rank1(self):
852     if loadIsConfigured():
853 gross 1141 filemame=os.path.join(self.filename_base,"expanded_reduced_function_on_boundary_rank1.nc")
854     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
855     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
856     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
857 gross 1063 d=Data(length(ReducedFunctionOnBoundary(self.domain).getX())*self.arg1,ReducedFunctionOnBoundary(self.domain))
858 gross 1141 self._diffDataObjects(d,filemame)
859 gross 1063
860     def test_DumpAndLoad_Expanded_ReducedFunctionOnBoundary_Rank2(self):
861     if loadIsConfigured():
862 gross 1141 filemame=os.path.join(self.filename_base,"expanded_reduced_function_on_boundary_rank2.nc")
863     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
864     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
865     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
866 gross 1063 d=Data(length(ReducedFunctionOnBoundary(self.domain).getX())*self.arg2,ReducedFunctionOnBoundary(self.domain))
867 gross 1141 self._diffDataObjects(d,filemame)
868 gross 1063
869     def test_DumpAndLoad_Expanded_ReducedFunctionOnBoundary_Rank3(self):
870     if loadIsConfigured():
871 gross 1141 filemame=os.path.join(self.filename_base,"expanded_reduced_function_on_boundary_rank3.nc")
872     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
873     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
874     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
875 gross 1063 d=Data(length(ReducedFunctionOnBoundary(self.domain).getX())*self.arg3,ReducedFunctionOnBoundary(self.domain))
876 gross 1141 self._diffDataObjects(d,filemame)
877 gross 1063
878     def test_DumpAndLoad_Expanded_ReducedFunctionOnBoundary_Rank4(self):
879     if loadIsConfigured():
880 gross 1141 filemame=os.path.join(self.filename_base,"expanded_reduced_function_on_boundary_rank4.nc")
881     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_samples)
882     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_number_of_data_points_per_sample)
883     self.failUnlessRaises(RuntimeError, load, filemame, self.domain_with_different_sample_ordering)
884 gross 1063 d=Data(length(ReducedFunctionOnBoundary(self.domain).getX())*self.arg4,ReducedFunctionOnBoundary(self.domain))
885 gross 1141 self._diffDataObjects(d,filemame)
886 gross 1063
887     #===========================================================================
888 gross 983 def test_DumpAndLoad_Tagged_Solution_Rank0(self):
889 gross 1023 if loadIsConfigured():
890 gross 1141 filemame=os.path.join(self.filename_base,"tagged_solution_rank0.nc")
891 gross 1023 d=Data(self.arg0,Solution(self.domain))
892     d.setTaggedValue(1,self.arg0*2)
893     d.setTaggedValue(10,self.arg0*3)
894     d.setTaggedValue(100,self.arg0*4)
895 gross 1141 self._diffDataObjects(d,filemame)
896 gross 983
897     def test_DumpAndLoad_Tagged_Solution_Rank1(self):
898 gross 1023 if loadIsConfigured():
899 gross 1141 filemame=os.path.join(self.filename_base,"tagged_solution_rank1.nc")
900 gross 1023 d=Data(self.arg1,Solution(self.domain))
901     d.setTaggedValue(1,self.arg1*2)
902     d.setTaggedValue(10,self.arg1*3)
903     d.setTaggedValue(100,self.arg1*4)
904 gross 1141 self._diffDataObjects(d,filemame)
905 gross 983
906     def test_DumpAndLoad_Tagged_Solution_Rank2(self):
907 gross 1023 if loadIsConfigured():
908 gross 1141 filemame=os.path.join(self.filename_base,"tagged_solution_rank2.nc")
909 gross 1023 d=Data(self.arg2,Solution(self.domain))
910     d.setTaggedValue(1,self.arg2*2)
911     d.setTaggedValue(10,self.arg2*3)
912     d.setTaggedValue(100,self.arg2*4)
913 gross 1141 self._diffDataObjects(d,filemame)
914 gross 983
915     def test_DumpAndLoad_Tagged_Solution_Rank3(self):
916 gross 1023 if loadIsConfigured():
917 gross 1141 filemame=os.path.join(self.filename_base,"tagged_solution_rank3.nc")
918 gross 1023 d=Data(self.arg3,Solution(self.domain))
919     d.setTaggedValue(1,self.arg3*2)
920     d.setTaggedValue(10,self.arg3*3)
921     d.setTaggedValue(100,self.arg3*4)
922 gross 1141 self._diffDataObjects(d,filemame)
923 gross 983
924     def test_DumpAndLoad_Tagged_Solution_Rank4(self):
925 gross 1023 if loadIsConfigured():
926 gross 1141 filemame=os.path.join(self.filename_base,"tagged_solution_rank4.nc")
927 gross 1023 d=Data(self.arg4,Solution(self.domain))
928     d.setTaggedValue(1,self.arg4*2)
929     d.setTaggedValue(10,self.arg4*3)
930     d.setTaggedValue(100,self.arg4*4)
931 gross 1141 self._diffDataObjects(d,filemame)
932 gross 983 #===========================================================================
933     def test_DumpAndLoad_Tagged_ReducedSolution_Rank0(self):
934 gross 1023 if loadIsConfigured():
935 gross 1141 filemame=os.path.join(self.filename_base,"tagged_reduced_solution_rank0.nc")
936 gross 1023 d=Data(self.arg0,ReducedSolution(self.domain))
937     d.setTaggedValue(1,self.arg0*2)
938     d.setTaggedValue(10,self.arg0*3)
939     d.setTaggedValue(100,self.arg0*4)
940 gross 1141 self._diffDataObjects(d,filemame)
941 gross 983
942     def test_DumpAndLoad_Tagged_ReducedSolution_Rank1(self):
943 gross 1023 if loadIsConfigured():
944 gross 1141 filemame=os.path.join(self.filename_base,"tagged_reduced_solution_rank1.nc")
945 gross 1023 d=Data(self.arg1,ReducedSolution(self.domain))
946     d.setTaggedValue(1,self.arg1*2)
947     d.setTaggedValue(10,self.arg1*3)
948     d.setTaggedValue(100,self.arg1*4)
949 gross 1141 self._diffDataObjects(d,filemame)
950 gross 983
951     def test_DumpAndLoad_Tagged_ReducedSolution_Rank2(self):
952 gross 1023 if loadIsConfigured():
953 gross 1141 filemame=os.path.join(self.filename_base,"tagged_reduced_solution_rank2.nc")
954 gross 1023 d=Data(self.arg2,ReducedSolution(self.domain))
955     d.setTaggedValue(1,self.arg2*2)
956     d.setTaggedValue(10,self.arg2*3)
957     d.setTaggedValue(100,self.arg2*4)
958 gross 1141 self._diffDataObjects(d,filemame)
959 gross 983
960     def test_DumpAndLoad_Tagged_ReducedSolution_Rank3(self):
961 gross 1023 if loadIsConfigured():
962 gross 1141 filemame=os.path.join(self.filename_base,"tagged_reduced_solution_rank3.nc")
963 gross 1023 d=Data(self.arg3,ReducedSolution(self.domain))
964     d.setTaggedValue(1,self.arg3*2)
965     d.setTaggedValue(10,self.arg3*3)
966     d.setTaggedValue(100,self.arg3*4)
967 gross 1141 self._diffDataObjects(d,filemame)
968 gross 983
969     def test_DumpAndLoad_Tagged_ReducedSolution_Rank4(self):
970 gross 1023 if loadIsConfigured():
971 gross 1141 filemame=os.path.join(self.filename_base,"tagged_reduced_solution_rank4.nc")
972 gross 1023 d=Data(self.arg4,ReducedSolution(self.domain))
973     d.setTaggedValue(1,self.arg4*2)
974     d.setTaggedValue(10,self.arg4*3)
975     d.setTaggedValue(100,self.arg4*4)
976 gross 1141 self._diffDataObjects(d,filemame)
977 gross 983 #===========================================================================
978     def test_DumpAndLoad_Tagged_ContinuousFunction_Rank0(self):
979 gross 1023 if loadIsConfigured():
980 gross 1141 filemame=os.path.join(self.filename_base,"tagged_continuous_function_rank0.nc")
981 gross 1023 d=Data(self.arg0,ContinuousFunction(self.domain))
982     d.setTaggedValue(1,self.arg0*2)
983     d.setTaggedValue(10,self.arg0*3)
984     d.setTaggedValue(100,self.arg0*4)
985 gross 1141 self._diffDataObjects(d,filemame)
986 gross 983
987     def test_DumpAndLoad_Tagged_ContinuousFunction_Rank1(self):
988 gross 1023 if loadIsConfigured():
989 gross 1141 filemame=os.path.join(self.filename_base,"tagged_continuous_function_rank1.nc")
990 gross 1023 d=Data(self.arg1,ContinuousFunction(self.domain))
991     d.setTaggedValue(1,self.arg1*2)
992     d.setTaggedValue(10,self.arg1*3)
993     d.setTaggedValue(100,self.arg1*4)
994 gross 1141 self._diffDataObjects(d,filemame)
995 gross 983
996     def test_DumpAndLoad_Tagged_ContinuousFunction_Rank2(self):
997 gross 1023 if loadIsConfigured():
998 gross 1141 filemame=os.path.join(self.filename_base,"tagged_continuous_function_rank2.nc")
999 gross 1023 d=Data(self.arg2,ContinuousFunction(self.domain))
1000     d.setTaggedValue(1,self.arg2*2)
1001     d.setTaggedValue(10,self.arg2*3)
1002     d.setTaggedValue(100,self.arg2*4)
1003 gross 1141 self._diffDataObjects(d,filemame)
1004 gross 983
1005     def test_DumpAndLoad_Tagged_ContinuousFunction_Rank3(self):
1006 gross 1023 if loadIsConfigured():
1007 gross 1141 filemame=os.path.join(self.filename_base,"tagged_continuous_function_rank3.nc")
1008 gross 1023 d=Data(self.arg3,ContinuousFunction(self.domain))
1009     d.setTaggedValue(1,self.arg3*2)
1010     d.setTaggedValue(10,self.arg3*3)
1011     d.setTaggedValue(100,self.arg3*4)
1012 gross 1141 self._diffDataObjects(d,filemame)
1013 gross 983
1014     def test_DumpAndLoad_Tagged_ContinuousFunction_Rank4(self):
1015 gross 1023 if loadIsConfigured():
1016 gross 1141 filemame=os.path.join(self.filename_base,"tagged_continuous_function_rank4.nc")
1017 gross 1023 d=Data(self.arg4,ContinuousFunction(self.domain))
1018     d.setTaggedValue(1,self.arg4*2)
1019     d.setTaggedValue(10,self.arg4*3)
1020     d.setTaggedValue(100,self.arg4*4)
1021 gross 1141 self._diffDataObjects(d,filemame)
1022 gross 983
1023     #===========================================================================
1024     def test_DumpAndLoad_Tagged_Function_Rank0(self):
1025 gross 1023 if loadIsConfigured():
1026 gross 1141 filemame=os.path.join(self.filename_base,"tagged_function_rank0.nc")
1027 gross 1023 d=Data(self.arg0,Function(self.domain))
1028     d.setTaggedValue(1,self.arg0*2)
1029     d.setTaggedValue(10,self.arg0*3)
1030     d.setTaggedValue(100,self.arg0*4)
1031 gross 1141 self._diffDataObjects(d,filemame)
1032 gross 983
1033     def test_DumpAndLoad_Tagged_Function_Rank1(self):
1034 gross 1023 if loadIsConfigured():
1035 gross 1141 filemame=os.path.join(self.filename_base,"tagged_function_rank1.nc")
1036 gross 1023 d=Data(self.arg1,Function(self.domain))
1037     d.setTaggedValue(1,self.arg1*2)
1038     d.setTaggedValue(10,self.arg1*3)
1039     d.setTaggedValue(100,self.arg1*4)
1040 gross 1141 self._diffDataObjects(d,filemame)
1041 gross 983
1042     def test_DumpAndLoad_Tagged_Function_Rank2(self):
1043 gross 1023 if loadIsConfigured():
1044 gross 1141 filemame=os.path.join(self.filename_base,"tagged_function_rank2.nc")
1045 gross 1023 d=Data(self.arg2,Function(self.domain))
1046     d.setTaggedValue(1,self.arg2*2)
1047     d.setTaggedValue(10,self.arg2*3)
1048     d.setTaggedValue(100,self.arg2*4)
1049 gross 1141 self._diffDataObjects(d,filemame)
1050 gross 983
1051     def test_DumpAndLoad_Tagged_Function_Rank3(self):
1052 gross 1023 if loadIsConfigured():
1053 gross 1141 filemame=os.path.join(self.filename_base,"tagged_function_rank3.nc")
1054 gross 1023 d=Data(self.arg3,Function(self.domain))
1055     d.setTaggedValue(1,self.arg3*2)
1056     d.setTaggedValue(10,self.arg3*3)
1057     d.setTaggedValue(100,self.arg3*4)
1058 gross 1141 self._diffDataObjects(d,filemame)
1059 gross 983
1060     def test_DumpAndLoad_Tagged_Function_Rank4(self):
1061 gross 1023 if loadIsConfigured():
1062 gross 1141 filemame=os.path.join(self.filename_base,"tagged_function_rank4.nc")
1063 gross 1023 d=Data(self.arg4,Function(self.domain))
1064     d.setTaggedValue(1,self.arg4*2)
1065     d.setTaggedValue(10,self.arg4*3)
1066     d.setTaggedValue(100,self.arg4*4)
1067 gross 1141 self._diffDataObjects(d,filemame)
1068 gross 983
1069     #===========================================================================
1070     def test_DumpAndLoad_Tagged_FunctionOnBoundary_Rank0(self):
1071 gross 1023 if loadIsConfigured():
1072 gross 1141 filemame=os.path.join(self.filename_base,"tagged_function_on_boundary_rank0.nc")
1073 gross 1023 d=Data(self.arg0,FunctionOnBoundary(self.domain))
1074     d.setTaggedValue(1,self.arg0*2)
1075     d.setTaggedValue(10,self.arg0*3)
1076     d.setTaggedValue(100,self.arg0*4)
1077 gross 1141 self._diffDataObjects(d,filemame)
1078 gross 983
1079     def test_DumpAndLoad_Tagged_FunctionOnBoundary_Rank1(self):
1080 gross 1023 if loadIsConfigured():
1081 gross 1141 filemame=os.path.join(self.filename_base,"tagged_function_on_boundary_rank1.nc")
1082 gross 1023 d=Data(self.arg1,FunctionOnBoundary(self.domain))
1083     d.setTaggedValue(1,self.arg1*2)
1084     d.setTaggedValue(10,self.arg1*3)
1085     d.setTaggedValue(100,self.arg1*4)
1086 gross 1141 self._diffDataObjects(d,filemame)
1087 gross 983
1088     def test_DumpAndLoad_Tagged_FunctionOnBoundary_Rank2(self):
1089 gross 1023 if loadIsConfigured():
1090 gross 1141 filemame=os.path.join(self.filename_base,"tagged_function_on_boundary_rank2.nc")
1091 gross 1023 d=Data(self.arg2,FunctionOnBoundary(self.domain))
1092     d.setTaggedValue(1,self.arg2*2)
1093     d.setTaggedValue(10,self.arg2*3)
1094     d.setTaggedValue(100,self.arg2*4)
1095 gross 1141 self._diffDataObjects(d,filemame)
1096 gross 983
1097     def test_DumpAndLoad_Tagged_FunctionOnBoundary_Rank3(self):
1098 gross 1023 if loadIsConfigured():
1099 gross 1141 filemame=os.path.join(self.filename_base,"tagged_function_on_boundary_rank3.nc")
1100 gross 1023 d=Data(self.arg3,FunctionOnBoundary(self.domain))
1101     d.setTaggedValue(1,self.arg3*2)
1102     d.setTaggedValue(10,self.arg3*3)
1103     d.setTaggedValue(100,self.arg3*4)
1104 gross 1141 self._diffDataObjects(d,filemame)
1105 gross 983
1106     def test_DumpAndLoad_Tagged_FunctionOnBoundary_Rank4(self):
1107 gross 1023 if loadIsConfigured():
1108 gross 1141 filemame=os.path.join(self.filename_base,"tagged_function_on_boundary_rank4.nc")
1109 gross 1023 d=Data(self.arg4,FunctionOnBoundary(self.domain))
1110     d.setTaggedValue(1,self.arg4*2)
1111     d.setTaggedValue(10,self.arg4*3)
1112     d.setTaggedValue(100,self.arg4*4)
1113 gross 1141 self._diffDataObjects(d,filemame)
1114 gross 1034 #===========================================================================
1115 gross 1063 def test_DumpAndLoad_Tagged_ReducedFunction_Rank0(self):
1116     if loadIsConfigured():
1117 gross 1141 filemame=os.path.join(self.filename_base,"tagged_reduced_function_rank0.nc")
1118 gross 1063 d=Data(self.arg0,ReducedFunction(self.domain))
1119     d.setTaggedValue(1,self.arg0*2)
1120     d.setTaggedValue(10,self.arg0*3)
1121     d.setTaggedValue(100,self.arg0*4)
1122 gross 1141 self._diffDataObjects(d,filemame)
1123 gross 1063
1124     def test_DumpAndLoad_Tagged_ReducedFunction_Rank1(self):
1125     if loadIsConfigured():
1126 gross 1141 filemame=os.path.join(self.filename_base,"tagged_reduced_function_rank1.nc")
1127 gross 1063 d=Data(self.arg1,ReducedFunction(self.domain))
1128     d.setTaggedValue(1,self.arg1*2)
1129     d.setTaggedValue(10,self.arg1*3)
1130     d.setTaggedValue(100,self.arg1*4)
1131 gross 1141 self._diffDataObjects(d,filemame)
1132 gross 1063
1133     def test_DumpAndLoad_Tagged_ReducedFunction_Rank2(self):
1134     if loadIsConfigured():
1135 gross 1141 filemame=os.path.join(self.filename_base,"tagged_reduced_function_rank2.nc")
1136 gross 1063 d=Data(self.arg2,ReducedFunction(self.domain))
1137     d.setTaggedValue(1,self.arg2*2)
1138     d.setTaggedValue(10,self.arg2*3)
1139     d.setTaggedValue(100,self.arg2*4)
1140 gross 1141 self._diffDataObjects(d,filemame)
1141 gross 1063
1142     def test_DumpAndLoad_Tagged_ReducedFunction_Rank3(self):
1143     if loadIsConfigured():
1144 gross 1141 filemame=os.path.join(self.filename_base,"tagged_reduced_function_rank3.nc")
1145 gross 1063 d=Data(self.arg3,ReducedFunction(self.domain))
1146     d.setTaggedValue(1,self.arg3*2)
1147     d.setTaggedValue(10,self.arg3*3)
1148     d.setTaggedValue(100,self.arg3*4)
1149 gross 1141 self._diffDataObjects(d,filemame)
1150 gross 1063
1151     def test_DumpAndLoad_Tagged_ReducedFunction_Rank4(self):
1152     if loadIsConfigured():
1153 gross 1141 filemame=os.path.join(self.filename_base,"tagged_reduced_function_rank4.nc")
1154 gross 1063 d=Data(self.arg4,ReducedFunction(self.domain))
1155     d.setTaggedValue(1,self.arg4*2)
1156     d.setTaggedValue(10,self.arg4*3)
1157     d.setTaggedValue(100,self.arg4*4)
1158 gross 1141 self._diffDataObjects(d,filemame)
1159 gross 1063
1160     #===========================================================================
1161     def test_DumpAndLoad_Tagged_ReducedFunctionOnBoundary_Rank0(self):
1162     if loadIsConfigured():
1163 gross 1141 filemame=os.path.join(self.filename_base,"tagged_reduced_function_on_boundary_rank0.nc")
1164 gross 1063 d=Data(self.arg0,ReducedFunctionOnBoundary(self.domain))
1165     d.setTaggedValue(1,self.arg0*2)
1166     d.setTaggedValue(10,self.arg0*3)
1167     d.setTaggedValue(100,self.arg0*4)
1168 gross 1141 self._diffDataObjects(d,filemame)
1169 gross 1063
1170     def test_DumpAndLoad_Tagged_ReducedFunctionOnBoundary_Rank1(self):
1171     if loadIsConfigured():
1172 gross 1141 filemame=os.path.join(self.filename_base,"tagged_reduced_function_on_boundary_rank1.nc")
1173 gross 1063 d=Data(self.arg1,ReducedFunctionOnBoundary(self.domain))
1174     d.setTaggedValue(1,self.arg1*2)
1175     d.setTaggedValue(10,self.arg1*3)
1176     d.setTaggedValue(100,self.arg1*4)
1177 gross 1141 self._diffDataObjects(d,filemame)
1178 gross 1063
1179     def test_DumpAndLoad_Tagged_ReducedFunctionOnBoundary_Rank2(self):
1180     if loadIsConfigured():
1181 gross 1141 filemame=os.path.join(self.filename_base,"tagged_reduced_function_on_boundary_rank2.nc")
1182 gross 1063 d=Data(self.arg2,ReducedFunctionOnBoundary(self.domain))
1183     d.setTaggedValue(1,self.arg2*2)
1184     d.setTaggedValue(10,self.arg2*3)
1185     d.setTaggedValue(100,self.arg2*4)
1186 gross 1141 self._diffDataObjects(d,filemame)
1187 gross 1063
1188     def test_DumpAndLoad_Tagged_ReducedFunctionOnBoundary_Rank3(self):
1189     if loadIsConfigured():
1190 gross 1141 filemame=os.path.join(self.filename_base,"tagged_reduced_function_on_boundary_rank3.nc")
1191 gross 1063 d=Data(self.arg3,ReducedFunctionOnBoundary(self.domain))
1192     d.setTaggedValue(1,self.arg3*2)
1193     d.setTaggedValue(10,self.arg3*3)
1194     d.setTaggedValue(100,self.arg3*4)
1195 gross 1141 self._diffDataObjects(d,filemame)
1196 gross 1063
1197     def test_DumpAndLoad_Tagged_ReducedFunctionOnBoundary_Rank4(self):
1198     if loadIsConfigured():
1199 gross 1141 filemame=os.path.join(self.filename_base,"tagged_reduced_function_on_boundary_rank4.nc")
1200 gross 1063 d=Data(self.arg4,ReducedFunctionOnBoundary(self.domain))
1201     d.setTaggedValue(1,self.arg4*2)
1202     d.setTaggedValue(10,self.arg4*3)
1203     d.setTaggedValue(100,self.arg4*4)
1204 gross 1141 self._diffDataObjects(d,filemame)
1205    

  ViewVC Help
Powered by ViewVC 1.1.26