/[escript]/trunk/finley/test/python/run_generators.py
ViewVC logotype

Annotation of /trunk/finley/test/python/run_generators.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1829 - (hide annotations)
Thu Oct 2 05:40:30 2008 UTC (11 years ago) by ksteube
File MIME type: text/x-python
File size: 19039 byte(s)
Adjusted tests for MPI.
Enabled two tests in run_inputOutput.py for order=2 after recent bugfix.

1 ksteube 1809
2     ########################################################
3 ksteube 1312 #
4 ksteube 1809 # Copyright (c) 2003-2008 by University of Queensland
5     # Earth Systems Science Computational Center (ESSCC)
6     # http://www.uq.edu.au/esscc
7 ksteube 1312 #
8 ksteube 1809 # Primary Business: Queensland, Australia
9     # Licensed under the Open Software License version 3.0
10     # http://www.opensource.org/licenses/osl-3.0.php
11 ksteube 1312 #
12 ksteube 1809 ########################################################
13 jgs 150
14 ksteube 1809 __copyright__="""Copyright (c) 2003-2008 by University of Queensland
15     Earth Systems Science Computational Center (ESSCC)
16     http://www.uq.edu.au/esscc
17     Primary Business: Queensland, Australia"""
18     __license__="""Licensed under the Open Software License version 3.0
19     http://www.opensource.org/licenses/osl-3.0.php"""
20     __url__="http://www.uq.edu.au/esscc/escript-finley"
21    
22 jgs 150 """
23 gross 1341 checks the mesh generators against the reference meshes in test_meshes and test the finley integration schemes.
24 jgs 150 """
25    
26 elspeth 626 import sys
27 gross 706 import os
28 elspeth 626 import unittest
29     from esys.escript import *
30 ksteube 1312 from esys.finley import Rectangle,Brick,JoinFaces, ReadGmsh, ReadMesh
31 elspeth 626
32 gross 798 try:
33     FINLEY_TEST_DATA=os.environ['FINLEY_TEST_DATA']
34     except KeyError:
35     FINLEY_TEST_DATA='.'
36    
37     try:
38     FINLEY_WORKDIR=os.environ['FINLEY_WORKDIR']
39     except KeyError:
40     FINLEY_WORKDIR='.'
41    
42 ksteube 1312 FINLEY_TEST_MESH_PATH=FINLEY_TEST_DATA+"/data_meshes/"
43 phornby 1455 #if os.name == "nt":
44     # FINLEY_TEST_MESH_PATH = FINLEY_TEST_MESH_PATH+"win32/"
45 ksteube 1312 FINLEY_WORKDIR_PATH=FINLEY_WORKDIR+"/"
46 gross 709
47 gross 706 TEST_FILE_EXT=".test"
48 jgs 150 class Test_Generators(unittest.TestCase):
49    
50     def checker(self,dom,reference):
51 ksteube 1829 if getMPISizeWorld() > 1: return
52 ksteube 1312 dom_file=FINLEY_WORKDIR_PATH+TEST_FILE_EXT
53 jgs 150 dom.write(dom_file)
54 woo409 757 # Uncomment this section to dump the files for regression testing
55     # if True:
56 ksteube 1312 # dom.write(FINLEY_TEST_MESH_PATH+reference)
57 jgs 150 dom_string=open(dom_file).read().splitlines()
58 ksteube 1312 ref_string=open(FINLEY_TEST_MESH_PATH+reference).read().splitlines()
59 jgs 150 self.failUnlessEqual(len(dom_string),len(ref_string),"number of lines in mesh files does not match reference")
60     for l in range(1,len(ref_string)):
61 phornby 1455 line=dom_string[l].strip()
62     if os.name == "nt":
63     line=line.replace("e+00","e+0").replace("e-00","e-0")
64     self.failUnlessEqual(line,ref_string[l].strip(),"line %d (%s) in mesh files does not match reference (%s)"%(l,ref_string[l].strip(),line))
65 jgs 150
66     def test_hex_2D_order1(self):
67     file="hex_2D_order1.msh"
68     my_dom=Rectangle(1,1,1)
69     self.checker(my_dom,file)
70    
71     def test_hex_2D_order1_onFace(self):
72     file="hex_2D_order1_onFace.msh"
73     my_dom=Rectangle(1,1,1,useElementsOnFace=1)
74     self.checker(my_dom,file)
75    
76     def test_hex_2D_order2(self):
77     file="hex_2D_order2.msh"
78     my_dom=Rectangle(1,1,2)
79     self.checker(my_dom,file)
80    
81     def test_hex_2D_order2_onFace(self):
82     file="hex_2D_order2_onFace.msh"
83     my_dom=Rectangle(1,1,2,useElementsOnFace=1)
84     self.checker(my_dom,file)
85    
86     def test_hex_3D_order1(self):
87     file="hex_3D_order1.msh"
88     my_dom=Brick(1,1,1,1)
89     self.checker(my_dom,file)
90    
91     def test_hex_3D_order1_onFace(self):
92     file="hex_3D_order1_onFace.msh"
93     my_dom=Brick(1,1,1,1,useElementsOnFace=1)
94     self.checker(my_dom,file)
95    
96     def test_hex_3D_order2(self):
97     file="hex_3D_order2.msh"
98     my_dom=Brick(1,1,1,2)
99     self.checker(my_dom,file)
100    
101     def test_hex_3D_order2_onFace(self):
102     file="hex_3D_order2_onFace.msh"
103     my_dom=Brick(1,1,1,2,useElementsOnFace=1)
104     self.checker(my_dom,file)
105    
106     def test_hex_contact_2D_order1(self):
107     file="hex_contact_2D_order1.msh"
108     ms1=Rectangle(1,1,1,l1=0.5,useElementsOnFace=False)
109     ms2=Rectangle(1,1,1,l1=0.5,useElementsOnFace=False)
110     ms2.setX(ms2.getX()+[0,0.5])
111 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
112 jgs 150 self.checker(my_dom,file)
113    
114     def test_hex_contact_2D_order1_onFace(self):
115     file="hex_contact_2D_order1_onFace.msh"
116     ms1=Rectangle(1,1,1,l1=0.5,useElementsOnFace=True)
117     ms2=Rectangle(1,1,1,l1=0.5,useElementsOnFace=True)
118     ms2.setX(ms2.getX()+[0,0.5])
119 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
120 jgs 150 self.checker(my_dom,file)
121    
122     def test_hex_contact_2D_order2(self):
123     file="hex_contact_2D_order2.msh"
124     ms1=Rectangle(1,1,2,l1=0.5,useElementsOnFace=False)
125     ms2=Rectangle(1,1,2,l1=0.5,useElementsOnFace=False)
126     ms2.setX(ms2.getX()+[0,0.5])
127 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
128 jgs 150 self.checker(my_dom,file)
129    
130     def test_hex_contact_2D_order2_onFace(self):
131     file="hex_contact_2D_order2_onFace.msh"
132     ms1=Rectangle(1,1,2,l1=0.5,useElementsOnFace=True)
133     ms2=Rectangle(1,1,2,l1=0.5,useElementsOnFace=True)
134     ms2.setX(ms2.getX()+[0,0.5])
135 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
136 jgs 150 self.checker(my_dom,file)
137    
138     def test_hex_contact_3D_order1(self):
139     file="hex_contact_3D_order1.msh"
140     ms1=Brick(1,1,1,1,l2=0.5,useElementsOnFace=False)
141     ms2=Brick(1,1,1,1,l2=0.5,useElementsOnFace=False)
142     ms2.setX(ms2.getX()+[0,0,0.5])
143 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
144 jgs 150 self.checker(my_dom,file)
145    
146     def test_hex_contact_3D_order1_onFace(self):
147     file="hex_contact_3D_order1_onFace.msh"
148     ms1=Brick(1,1,1,1,l2=0.5,useElementsOnFace=True)
149     ms2=Brick(1,1,1,1,l2=0.5,useElementsOnFace=True)
150     ms2.setX(ms2.getX()+[0,0,0.5])
151 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
152 jgs 150 self.checker(my_dom,file)
153    
154     def test_hex_contact_3D_order2(self):
155     file="hex_contact_3D_order2.msh"
156     ms1=Brick(1,1,1,2,l2=0.5,useElementsOnFace=False)
157     ms2=Brick(1,1,1,2,l2=0.5,useElementsOnFace=False)
158     ms2.setX(ms2.getX()+[0,0,0.5])
159 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
160 jgs 150 self.checker(my_dom,file)
161    
162     def test_hex_contact_3D_order2_onFace(self):
163     file="hex_contact_3D_order2_onFace.msh"
164     ms1=Brick(1,1,1,2,l2=0.5,useElementsOnFace=True)
165     ms2=Brick(1,1,1,2,l2=0.5,useElementsOnFace=True)
166     ms2.setX(ms2.getX()+[0,0,0.5])
167 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
168 jgs 150 self.checker(my_dom,file)
169    
170 gross 934 class Test_GMSHReader(unittest.TestCase):
171     def compare(self, test_file, reference_file):
172     dom_string=open(test_file).read().splitlines()
173     ref_string=open(reference_file).read().splitlines()
174     self.failUnlessEqual(len(dom_string),len(ref_string),"number of lines in mesh files does not match reference")
175     for l in range(1,len(ref_string)):
176 phornby 1455 line=dom_string[l].strip()
177     if os.name == "nt":
178     line=line.replace("e+00","e+0").replace("e-00","e-0")
179     self.failUnlessEqual(line,ref_string[l].strip(),"line %d (%s) in mesh files does not match reference (%s)"%(l,ref_string[l].strip(),line))
180 gross 934
181     def test_Tri3(self):
182 ksteube 1829 # ReadGmsh is not MPI parallel
183     if getMPISizeWorld() == 1:
184     file="tri3_gmsh.msh"
185     ref ="tri3.fly"
186     test = FINLEY_WORKDIR+os.sep+"tri3_test.fly"
187     dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,2,optimize=False)
188     dom.write(test)
189     self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
190 gross 934
191     def test_Tri6(self):
192 ksteube 1829 # ReadGmsh is not MPI parallel
193     if getMPISizeWorld() == 1:
194     file="tri6_gmsh.msh"
195     ref="tri6.fly"
196     test = FINLEY_WORKDIR+os.sep+"tri8_test.fly"
197     dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,2,optimize=False)
198     dom.write(test)
199     self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
200 gross 934
201     def test_Tet4(self):
202 ksteube 1829 # ReadGmsh is not MPI parallel
203     if getMPISizeWorld() == 1:
204     file="tet4_gmsh.msh"
205     ref="tet4.fly"
206     test = FINLEY_WORKDIR+os.sep+"tet4_test.fly"
207     dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)
208     dom.write(test)
209     self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
210 gross 934
211 ksteube 1312 def test_Tet10(self):
212 ksteube 1829 # ReadGmsh is not MPI parallel
213     if getMPISizeWorld() == 1:
214     file="tet10_gmsh.msh"
215     ref="tet10.fly"
216     test = FINLEY_WORKDIR+os.sep+"tet10_test.fly"
217     dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)
218     dom.write(test)
219     self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
220 gross 934
221 gross 1044 class Test_Reader(unittest.TestCase):
222     def test_ReadWriteTagNames(self):
223     file="hex_2D_order2.msh"
224 ksteube 1312 test = FINLEY_WORKDIR+os.sep+"test.fly"
225     dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)
226 gross 1044 insertTagNames(dom,A=1,B=2)
227     dom.write(test)
228 ksteube 1312 dom2 = ReadMesh(test,3,optimize=False)
229 gross 1044 t=getTagNames(dom)
230 ksteube 1312 self.failUnless(len(t)==6)
231 gross 1044 self.failUnless("A" in t)
232     self.failUnless("B" in t)
233     self.failUnless(dom2.getTag("A") == 1)
234     self.failUnless(dom2.getTag("B") == 2)
235     self.failUnless(dom2.isValidTagName("A"))
236     self.failUnless(dom2.isValidTagName("B"))
237    
238 gross 1341 class Test_Integration(unittest.TestCase):
239     TOL=EPSILON*100.
240     def __test_2DQ(self,dom,order):
241     x=Function(dom).getX()
242     x_bound=FunctionOnBoundary(dom).getX()
243     for i in xrange(order+1):
244     for j in xrange(order+1):
245     res=integrate(x[0]**i*x[1]**j)
246     ref=1./((i+1)*(j+1))
247     error=abs(res-ref)/abs(ref)
248     self.failUnless(error<=self.TOL,"integration for order (%s,%s) failed. True value = %s, calculated = %s"%(i,j,ref,res))
249    
250     res=integrate(x_bound[0]**i*x_bound[1]**j)
251     ref=0
252     if i == 0:
253     ref += 2./(j+1)
254     else:
255     ref += 1./(j+1)
256     if j == 0:
257     ref += 2./(i+1)
258     else:
259     ref += 1./(i+1)
260     error=abs(res-ref)/abs(ref)
261     self.failUnless(error<=self.TOL,"surface integration for order (%s,%s) failed. True value = %s, calculated = %s"%(i,j,ref,res))
262    
263     def __test_2DT(self,dom,order,raise_tol=1.):
264     x=Function(dom).getX()
265     x_bound=FunctionOnBoundary(dom).getX()
266     for i in xrange(order+1):
267     for j in xrange(order+1):
268     if i+j<=order:
269     res=integrate(x[0]**i*x[1]**j)
270     ref=1./((i+1)*(j+1))
271     error=abs(res-ref)/abs(ref)
272     # print order,error
273     self.failUnless(error<=self.TOL*raise_tol,"integration for order (%s,%s) failed. True value = %s, calculated = %s"%(i,j,ref,res))
274    
275     res=integrate(x_bound[0]**i*x_bound[1]**j)
276     ref=0
277     if i == 0:
278     ref += 2./(j+1)
279     else:
280     ref += 1./(j+1)
281     if j == 0:
282     ref += 2./(i+1)
283     else:
284     ref += 1./(i+1)
285     error=abs(res-ref)/abs(ref)
286     self.failUnless(error<=self.TOL*raise_tol,"surface integration for order (%s,%s) failed. True value = %s, calculated = %s"%(i,j,ref,res))
287    
288    
289     def __test_3DQ(self,dom,order):
290     x=Function(dom).getX()
291     x_bound=FunctionOnBoundary(dom).getX()
292     for i in xrange(order+1):
293     for j in xrange(order+1):
294     for k in xrange(order+1):
295     res=integrate(x[0]**i*x[1]**j*x[2]**k)
296     ref=1./((i+1)*(j+1)*(k+1))
297     error=abs(res-ref)/abs(ref)
298     self.failUnless(error<=self.TOL,"integration for order (%s,%s,%s) failed. True value = %s, calculated = %s"%(i,j,k,ref,res))
299    
300     res=integrate(x_bound[0]**i*x_bound[1]**j*x_bound[2]**k)
301     ref=0
302     if i == 0:
303     ref += 2./((j+1)*(k+1))
304     else:
305     ref += 1./((j+1)*(k+1))
306     if j == 0:
307     ref += 2./((i+1)*(k+1))
308     else:
309     ref += 1./((i+1)*(k+1))
310     if k == 0:
311     ref += 2./((i+1)*(j+1))
312     else:
313     ref += 1./((i+1)*(j+1))
314     error=abs(res-ref)/abs(ref)
315     self.failUnless(error<=self.TOL,"surface integration for order (%s,%s,%s) failed. True value = %s, calculated = %s"%(i,j,k,ref,res))
316    
317     def __test_3DT(self,dom,order,raise_tol=1.):
318     x=Function(dom).getX()
319     x_bound=FunctionOnBoundary(dom).getX()
320     for i in xrange(order+1):
321     for j in xrange(order+1):
322     for k in xrange(order+1):
323     if i+j+k<=order:
324     res=integrate(x[0]**i*x[1]**j*x[2]**k)
325     ref=1./((i+1)*(j+1)*(k+1))
326     error=abs(res-ref)/abs(ref)
327     self.failUnless(error<=self.TOL*raise_tol,"integration for order (%s,%s,%s) failed. True value = %s, calculated = %s"%(i,j,k,ref,res))
328    
329     res=integrate(x_bound[0]**i*x_bound[1]**j*x_bound[2]**k)
330     ref=0
331     if i == 0:
332     ref += 2./((j+1)*(k+1))
333     else:
334     ref += 1./((j+1)*(k+1))
335     if j == 0:
336     ref += 2./((i+1)*(k+1))
337     else:
338     ref += 1./((i+1)*(k+1))
339     if k == 0:
340     ref += 2./((i+1)*(j+1))
341     else:
342     ref += 1./((i+1)*(j+1))
343     error=abs(res-ref)/abs(ref)
344     self.failUnless(error<=self.TOL*raise_tol,"surface integration for order (%s,%s,%s) failed. True value = %s, calculated = %s"%(i,j,k,ref,res))
345    
346     def test_hex2D_order1(self):
347     my_dom=Rectangle(1,1,integrationOrder=1)
348     self.__test_2DQ(my_dom,1)
349     def test_hex2D_order2(self):
350     my_dom=Rectangle(1,1,integrationOrder=2)
351     self.__test_2DQ(my_dom,2)
352     def test_hex2D_order3(self):
353     my_dom=Rectangle(1,1,integrationOrder=3)
354     self.__test_2DQ(my_dom,3)
355     def test_hex2D_order4(self):
356     my_dom=Rectangle(1,1,integrationOrder=4)
357     self.__test_2DQ(my_dom,4)
358     def test_hex2D_order5(self):
359     my_dom=Rectangle(1,1,integrationOrder=5)
360     self.__test_2DQ(my_dom,5)
361     def test_hex2D_order6(self):
362     my_dom=Rectangle(1,1,integrationOrder=6)
363     self.__test_2DQ(my_dom,6)
364     def test_hex2D_order7(self):
365     my_dom=Rectangle(1,1,integrationOrder=7)
366     self.__test_2DQ(my_dom,7)
367     def test_hex2D_order8(self):
368     my_dom=Rectangle(1,1,integrationOrder=8)
369     self.__test_2DQ(my_dom,8)
370     def test_hex2D_order9(self):
371     my_dom=Rectangle(1,1,integrationOrder=9)
372     self.__test_2DQ(my_dom,9)
373     def test_hex2D_order10(self):
374     my_dom=Rectangle(1,1,integrationOrder=10)
375     self.__test_2DQ(my_dom,10)
376    
377     def test_Tet2D_order1(self):
378     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=1)
379     self.__test_2DT(my_dom,1)
380     def test_Tet2D_order2(self):
381     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=2)
382     self.__test_2DT(my_dom,2)
383     def test_Tet2D_order3(self):
384     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=3)
385     self.__test_2DT(my_dom,3)
386     def test_Tet2D_order4(self):
387     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=4)
388     self.__test_2DT(my_dom,4)
389     def test_Tet2D_order5(self):
390     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=5)
391     self.__test_2DT(my_dom,5)
392     def test_Tet2D_order6(self):
393     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=6)
394     self.__test_2DT(my_dom,6)
395     def test_Tet2D_order7(self):
396     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=7)
397     self.__test_2DT(my_dom,7)
398     def test_Tet2D_order8(self):
399     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=8)
400     self.__test_2DT(my_dom,8,1./sqrt(EPSILON))
401     def test_Tet2D_order9(self):
402     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=9)
403     self.__test_2DT(my_dom,9,1./sqrt(EPSILON))
404     def test_Tet2D_order10(self):
405     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=10)
406     self.__test_2DT(my_dom,10)
407    
408     def test_hex3D_order1(self):
409     my_dom=Brick(1,1,1,integrationOrder=1)
410     self.__test_3DQ(my_dom,1)
411     def test_hex3D_order2(self):
412     my_dom=Brick(1,1,1,integrationOrder=2)
413     self.__test_3DQ(my_dom,2)
414     def test_hex3D_order3(self):
415     my_dom=Brick(1,1,1,integrationOrder=3)
416     self.__test_3DQ(my_dom,3)
417     def test_hex3D_order4(self):
418     my_dom=Brick(1,1,1,integrationOrder=4)
419     self.__test_3DQ(my_dom,4)
420     def test_hex3D_order5(self):
421     my_dom=Brick(1,1,1,integrationOrder=5)
422     self.__test_3DQ(my_dom,5)
423     def test_hex3D_order6(self):
424     my_dom=Brick(1,1,1,integrationOrder=6)
425     self.__test_3DQ(my_dom,6)
426     def test_hex3D_order7(self):
427     my_dom=Brick(1,1,1,integrationOrder=7)
428     self.__test_3DQ(my_dom,7)
429     def test_hex3D_order8(self):
430     my_dom=Brick(1,1,1,integrationOrder=8)
431     self.__test_3DQ(my_dom,8)
432     def test_hex3D_order9(self):
433     my_dom=Brick(1,1,1,integrationOrder=9)
434     self.__test_3DQ(my_dom,9)
435     def test_hex3D_order10(self):
436     my_dom=Brick(1,1,1,integrationOrder=10)
437     self.__test_3DQ(my_dom,10)
438    
439     def test_Tet3D_order1(self):
440     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=1)
441     self.__test_3DT(my_dom,1)
442     def test_Tet3D_order2(self):
443     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=2)
444     self.__test_3DT(my_dom,2)
445     def test_Tet3D_order3(self):
446     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=3)
447     self.__test_3DT(my_dom,3)
448     def test_Tet3D_order4(self):
449     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=4)
450     self.__test_3DT(my_dom,4)
451     def test_Tet3D_order5(self):
452     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=5)
453     self.__test_3DT(my_dom,5)
454     def test_Tet3D_order6(self):
455     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=6)
456     self.__test_3DT(my_dom,6,1./sqrt(EPSILON))
457     def test_Tet3D_order7(self):
458     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=7)
459     self.__test_3DT(my_dom,7,1./sqrt(EPSILON))
460     def test_Tet3D_order8(self):
461     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=8)
462     self.__test_3DT(my_dom,8,1./sqrt(EPSILON))
463     def test_Tet3D_order9(self):
464     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=9)
465     self.__test_3DT(my_dom,9,1./sqrt(EPSILON))
466     def test_Tet3D_order10(self):
467     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=10)
468     self.__test_3DT(my_dom,10)
469    
470 jgs 150 if __name__ == '__main__':
471     suite = unittest.TestSuite()
472     suite.addTest(unittest.makeSuite(Test_Generators))
473 gross 934 suite.addTest(unittest.makeSuite(Test_GMSHReader))
474 gross 1044 suite.addTest(unittest.makeSuite(Test_Reader))
475 gross 1341 suite.addTest(unittest.makeSuite(Test_Integration))
476 jgs 150 s=unittest.TextTestRunner(verbosity=2).run(suite)
477 gross 1376 if not s.wasSuccessful(): sys.exit(1)
478    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26