/[escript]/trunk/dudley/test/python/fixme_run_generators.py
ViewVC logotype

Annotation of /trunk/dudley/test/python/fixme_run_generators.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1830 - (hide annotations)
Thu Oct 2 06:51:48 2008 UTC (11 years, 2 months ago) by ksteube
Original Path: trunk/finley/test/python/run_generators.py
File MIME type: text/x-python
File size: 19400 byte(s)
Tests using JoinFaces() and domain.write() will not work under MPI and must be disabled for num procs > 1

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 ksteube 1830 if getMPISizeWorld() != 1: return
108 jgs 150 file="hex_contact_2D_order1.msh"
109     ms1=Rectangle(1,1,1,l1=0.5,useElementsOnFace=False)
110     ms2=Rectangle(1,1,1,l1=0.5,useElementsOnFace=False)
111     ms2.setX(ms2.getX()+[0,0.5])
112 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
113 jgs 150 self.checker(my_dom,file)
114    
115     def test_hex_contact_2D_order1_onFace(self):
116 ksteube 1830 if getMPISizeWorld() != 1: return
117 jgs 150 file="hex_contact_2D_order1_onFace.msh"
118     ms1=Rectangle(1,1,1,l1=0.5,useElementsOnFace=True)
119     ms2=Rectangle(1,1,1,l1=0.5,useElementsOnFace=True)
120     ms2.setX(ms2.getX()+[0,0.5])
121 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
122 jgs 150 self.checker(my_dom,file)
123    
124     def test_hex_contact_2D_order2(self):
125 ksteube 1830 if getMPISizeWorld() != 1: return
126 jgs 150 file="hex_contact_2D_order2.msh"
127     ms1=Rectangle(1,1,2,l1=0.5,useElementsOnFace=False)
128     ms2=Rectangle(1,1,2,l1=0.5,useElementsOnFace=False)
129     ms2.setX(ms2.getX()+[0,0.5])
130 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
131 jgs 150 self.checker(my_dom,file)
132    
133     def test_hex_contact_2D_order2_onFace(self):
134 ksteube 1830 if getMPISizeWorld() != 1: return
135 jgs 150 file="hex_contact_2D_order2_onFace.msh"
136     ms1=Rectangle(1,1,2,l1=0.5,useElementsOnFace=True)
137     ms2=Rectangle(1,1,2,l1=0.5,useElementsOnFace=True)
138     ms2.setX(ms2.getX()+[0,0.5])
139 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
140 jgs 150 self.checker(my_dom,file)
141    
142     def test_hex_contact_3D_order1(self):
143 ksteube 1830 if getMPISizeWorld() != 1: return
144 jgs 150 file="hex_contact_3D_order1.msh"
145     ms1=Brick(1,1,1,1,l2=0.5,useElementsOnFace=False)
146     ms2=Brick(1,1,1,1,l2=0.5,useElementsOnFace=False)
147     ms2.setX(ms2.getX()+[0,0,0.5])
148 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
149 jgs 150 self.checker(my_dom,file)
150    
151     def test_hex_contact_3D_order1_onFace(self):
152 ksteube 1830 if getMPISizeWorld() != 1: return
153 jgs 150 file="hex_contact_3D_order1_onFace.msh"
154     ms1=Brick(1,1,1,1,l2=0.5,useElementsOnFace=True)
155     ms2=Brick(1,1,1,1,l2=0.5,useElementsOnFace=True)
156     ms2.setX(ms2.getX()+[0,0,0.5])
157 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
158 jgs 150 self.checker(my_dom,file)
159    
160     def test_hex_contact_3D_order2(self):
161 ksteube 1830 if getMPISizeWorld() != 1: return
162 jgs 150 file="hex_contact_3D_order2.msh"
163     ms1=Brick(1,1,1,2,l2=0.5,useElementsOnFace=False)
164     ms2=Brick(1,1,1,2,l2=0.5,useElementsOnFace=False)
165     ms2.setX(ms2.getX()+[0,0,0.5])
166 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
167 jgs 150 self.checker(my_dom,file)
168    
169     def test_hex_contact_3D_order2_onFace(self):
170 ksteube 1830 if getMPISizeWorld() != 1: return
171 jgs 150 file="hex_contact_3D_order2_onFace.msh"
172     ms1=Brick(1,1,1,2,l2=0.5,useElementsOnFace=True)
173     ms2=Brick(1,1,1,2,l2=0.5,useElementsOnFace=True)
174     ms2.setX(ms2.getX()+[0,0,0.5])
175 ksteube 1312 my_dom=JoinFaces([ms1,ms2],optimize=False)
176 jgs 150 self.checker(my_dom,file)
177    
178 gross 934 class Test_GMSHReader(unittest.TestCase):
179     def compare(self, test_file, reference_file):
180     dom_string=open(test_file).read().splitlines()
181     ref_string=open(reference_file).read().splitlines()
182     self.failUnlessEqual(len(dom_string),len(ref_string),"number of lines in mesh files does not match reference")
183     for l in range(1,len(ref_string)):
184 phornby 1455 line=dom_string[l].strip()
185     if os.name == "nt":
186     line=line.replace("e+00","e+0").replace("e-00","e-0")
187     self.failUnlessEqual(line,ref_string[l].strip(),"line %d (%s) in mesh files does not match reference (%s)"%(l,ref_string[l].strip(),line))
188 gross 934
189     def test_Tri3(self):
190 ksteube 1829 # ReadGmsh is not MPI parallel
191     if getMPISizeWorld() == 1:
192     file="tri3_gmsh.msh"
193     ref ="tri3.fly"
194     test = FINLEY_WORKDIR+os.sep+"tri3_test.fly"
195     dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,2,optimize=False)
196     dom.write(test)
197     self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
198 gross 934
199     def test_Tri6(self):
200 ksteube 1829 # ReadGmsh is not MPI parallel
201     if getMPISizeWorld() == 1:
202     file="tri6_gmsh.msh"
203     ref="tri6.fly"
204     test = FINLEY_WORKDIR+os.sep+"tri8_test.fly"
205     dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,2,optimize=False)
206     dom.write(test)
207     self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
208 gross 934
209     def test_Tet4(self):
210 ksteube 1829 # ReadGmsh is not MPI parallel
211     if getMPISizeWorld() == 1:
212     file="tet4_gmsh.msh"
213     ref="tet4.fly"
214     test = FINLEY_WORKDIR+os.sep+"tet4_test.fly"
215     dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)
216     dom.write(test)
217     self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
218 gross 934
219 ksteube 1312 def test_Tet10(self):
220 ksteube 1829 # ReadGmsh is not MPI parallel
221     if getMPISizeWorld() == 1:
222     file="tet10_gmsh.msh"
223     ref="tet10.fly"
224     test = FINLEY_WORKDIR+os.sep+"tet10_test.fly"
225     dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)
226     dom.write(test)
227     self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
228 gross 934
229 gross 1044 class Test_Reader(unittest.TestCase):
230     def test_ReadWriteTagNames(self):
231 ksteube 1830 if getMPISizeWorld() != 1: return
232 gross 1044 file="hex_2D_order2.msh"
233 ksteube 1312 test = FINLEY_WORKDIR+os.sep+"test.fly"
234     dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)
235 gross 1044 insertTagNames(dom,A=1,B=2)
236     dom.write(test)
237 ksteube 1312 dom2 = ReadMesh(test,3,optimize=False)
238 gross 1044 t=getTagNames(dom)
239 ksteube 1312 self.failUnless(len(t)==6)
240 gross 1044 self.failUnless("A" in t)
241     self.failUnless("B" in t)
242     self.failUnless(dom2.getTag("A") == 1)
243     self.failUnless(dom2.getTag("B") == 2)
244     self.failUnless(dom2.isValidTagName("A"))
245     self.failUnless(dom2.isValidTagName("B"))
246    
247 gross 1341 class Test_Integration(unittest.TestCase):
248     TOL=EPSILON*100.
249     def __test_2DQ(self,dom,order):
250     x=Function(dom).getX()
251     x_bound=FunctionOnBoundary(dom).getX()
252     for i in xrange(order+1):
253     for j in xrange(order+1):
254     res=integrate(x[0]**i*x[1]**j)
255     ref=1./((i+1)*(j+1))
256     error=abs(res-ref)/abs(ref)
257     self.failUnless(error<=self.TOL,"integration for order (%s,%s) failed. True value = %s, calculated = %s"%(i,j,ref,res))
258    
259     res=integrate(x_bound[0]**i*x_bound[1]**j)
260     ref=0
261     if i == 0:
262     ref += 2./(j+1)
263     else:
264     ref += 1./(j+1)
265     if j == 0:
266     ref += 2./(i+1)
267     else:
268     ref += 1./(i+1)
269     error=abs(res-ref)/abs(ref)
270     self.failUnless(error<=self.TOL,"surface integration for order (%s,%s) failed. True value = %s, calculated = %s"%(i,j,ref,res))
271    
272     def __test_2DT(self,dom,order,raise_tol=1.):
273     x=Function(dom).getX()
274     x_bound=FunctionOnBoundary(dom).getX()
275     for i in xrange(order+1):
276     for j in xrange(order+1):
277     if i+j<=order:
278     res=integrate(x[0]**i*x[1]**j)
279     ref=1./((i+1)*(j+1))
280     error=abs(res-ref)/abs(ref)
281     # print order,error
282     self.failUnless(error<=self.TOL*raise_tol,"integration for order (%s,%s) failed. True value = %s, calculated = %s"%(i,j,ref,res))
283    
284     res=integrate(x_bound[0]**i*x_bound[1]**j)
285     ref=0
286     if i == 0:
287     ref += 2./(j+1)
288     else:
289     ref += 1./(j+1)
290     if j == 0:
291     ref += 2./(i+1)
292     else:
293     ref += 1./(i+1)
294     error=abs(res-ref)/abs(ref)
295     self.failUnless(error<=self.TOL*raise_tol,"surface integration for order (%s,%s) failed. True value = %s, calculated = %s"%(i,j,ref,res))
296    
297    
298     def __test_3DQ(self,dom,order):
299     x=Function(dom).getX()
300     x_bound=FunctionOnBoundary(dom).getX()
301     for i in xrange(order+1):
302     for j in xrange(order+1):
303     for k in xrange(order+1):
304     res=integrate(x[0]**i*x[1]**j*x[2]**k)
305     ref=1./((i+1)*(j+1)*(k+1))
306     error=abs(res-ref)/abs(ref)
307     self.failUnless(error<=self.TOL,"integration for order (%s,%s,%s) failed. True value = %s, calculated = %s"%(i,j,k,ref,res))
308    
309     res=integrate(x_bound[0]**i*x_bound[1]**j*x_bound[2]**k)
310     ref=0
311     if i == 0:
312     ref += 2./((j+1)*(k+1))
313     else:
314     ref += 1./((j+1)*(k+1))
315     if j == 0:
316     ref += 2./((i+1)*(k+1))
317     else:
318     ref += 1./((i+1)*(k+1))
319     if k == 0:
320     ref += 2./((i+1)*(j+1))
321     else:
322     ref += 1./((i+1)*(j+1))
323     error=abs(res-ref)/abs(ref)
324     self.failUnless(error<=self.TOL,"surface integration for order (%s,%s,%s) failed. True value = %s, calculated = %s"%(i,j,k,ref,res))
325    
326     def __test_3DT(self,dom,order,raise_tol=1.):
327     x=Function(dom).getX()
328     x_bound=FunctionOnBoundary(dom).getX()
329     for i in xrange(order+1):
330     for j in xrange(order+1):
331     for k in xrange(order+1):
332     if i+j+k<=order:
333     res=integrate(x[0]**i*x[1]**j*x[2]**k)
334     ref=1./((i+1)*(j+1)*(k+1))
335     error=abs(res-ref)/abs(ref)
336     self.failUnless(error<=self.TOL*raise_tol,"integration for order (%s,%s,%s) failed. True value = %s, calculated = %s"%(i,j,k,ref,res))
337    
338     res=integrate(x_bound[0]**i*x_bound[1]**j*x_bound[2]**k)
339     ref=0
340     if i == 0:
341     ref += 2./((j+1)*(k+1))
342     else:
343     ref += 1./((j+1)*(k+1))
344     if j == 0:
345     ref += 2./((i+1)*(k+1))
346     else:
347     ref += 1./((i+1)*(k+1))
348     if k == 0:
349     ref += 2./((i+1)*(j+1))
350     else:
351     ref += 1./((i+1)*(j+1))
352     error=abs(res-ref)/abs(ref)
353     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))
354    
355     def test_hex2D_order1(self):
356     my_dom=Rectangle(1,1,integrationOrder=1)
357     self.__test_2DQ(my_dom,1)
358     def test_hex2D_order2(self):
359     my_dom=Rectangle(1,1,integrationOrder=2)
360     self.__test_2DQ(my_dom,2)
361     def test_hex2D_order3(self):
362     my_dom=Rectangle(1,1,integrationOrder=3)
363     self.__test_2DQ(my_dom,3)
364     def test_hex2D_order4(self):
365     my_dom=Rectangle(1,1,integrationOrder=4)
366     self.__test_2DQ(my_dom,4)
367     def test_hex2D_order5(self):
368     my_dom=Rectangle(1,1,integrationOrder=5)
369     self.__test_2DQ(my_dom,5)
370     def test_hex2D_order6(self):
371     my_dom=Rectangle(1,1,integrationOrder=6)
372     self.__test_2DQ(my_dom,6)
373     def test_hex2D_order7(self):
374     my_dom=Rectangle(1,1,integrationOrder=7)
375     self.__test_2DQ(my_dom,7)
376     def test_hex2D_order8(self):
377     my_dom=Rectangle(1,1,integrationOrder=8)
378     self.__test_2DQ(my_dom,8)
379     def test_hex2D_order9(self):
380     my_dom=Rectangle(1,1,integrationOrder=9)
381     self.__test_2DQ(my_dom,9)
382     def test_hex2D_order10(self):
383     my_dom=Rectangle(1,1,integrationOrder=10)
384     self.__test_2DQ(my_dom,10)
385    
386     def test_Tet2D_order1(self):
387     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=1)
388     self.__test_2DT(my_dom,1)
389     def test_Tet2D_order2(self):
390     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=2)
391     self.__test_2DT(my_dom,2)
392     def test_Tet2D_order3(self):
393     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=3)
394     self.__test_2DT(my_dom,3)
395     def test_Tet2D_order4(self):
396     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=4)
397     self.__test_2DT(my_dom,4)
398     def test_Tet2D_order5(self):
399     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=5)
400     self.__test_2DT(my_dom,5)
401     def test_Tet2D_order6(self):
402     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=6)
403     self.__test_2DT(my_dom,6)
404     def test_Tet2D_order7(self):
405     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=7)
406     self.__test_2DT(my_dom,7)
407     def test_Tet2D_order8(self):
408     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=8)
409     self.__test_2DT(my_dom,8,1./sqrt(EPSILON))
410     def test_Tet2D_order9(self):
411     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=9)
412     self.__test_2DT(my_dom,9,1./sqrt(EPSILON))
413     def test_Tet2D_order10(self):
414     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=10)
415     self.__test_2DT(my_dom,10)
416    
417     def test_hex3D_order1(self):
418     my_dom=Brick(1,1,1,integrationOrder=1)
419     self.__test_3DQ(my_dom,1)
420     def test_hex3D_order2(self):
421     my_dom=Brick(1,1,1,integrationOrder=2)
422     self.__test_3DQ(my_dom,2)
423     def test_hex3D_order3(self):
424     my_dom=Brick(1,1,1,integrationOrder=3)
425     self.__test_3DQ(my_dom,3)
426     def test_hex3D_order4(self):
427     my_dom=Brick(1,1,1,integrationOrder=4)
428     self.__test_3DQ(my_dom,4)
429     def test_hex3D_order5(self):
430     my_dom=Brick(1,1,1,integrationOrder=5)
431     self.__test_3DQ(my_dom,5)
432     def test_hex3D_order6(self):
433     my_dom=Brick(1,1,1,integrationOrder=6)
434     self.__test_3DQ(my_dom,6)
435     def test_hex3D_order7(self):
436     my_dom=Brick(1,1,1,integrationOrder=7)
437     self.__test_3DQ(my_dom,7)
438     def test_hex3D_order8(self):
439     my_dom=Brick(1,1,1,integrationOrder=8)
440     self.__test_3DQ(my_dom,8)
441     def test_hex3D_order9(self):
442     my_dom=Brick(1,1,1,integrationOrder=9)
443     self.__test_3DQ(my_dom,9)
444     def test_hex3D_order10(self):
445     my_dom=Brick(1,1,1,integrationOrder=10)
446     self.__test_3DQ(my_dom,10)
447    
448     def test_Tet3D_order1(self):
449     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=1)
450     self.__test_3DT(my_dom,1)
451     def test_Tet3D_order2(self):
452     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=2)
453     self.__test_3DT(my_dom,2)
454     def test_Tet3D_order3(self):
455     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=3)
456     self.__test_3DT(my_dom,3)
457     def test_Tet3D_order4(self):
458     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=4)
459     self.__test_3DT(my_dom,4)
460     def test_Tet3D_order5(self):
461     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=5)
462     self.__test_3DT(my_dom,5)
463     def test_Tet3D_order6(self):
464     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=6)
465     self.__test_3DT(my_dom,6,1./sqrt(EPSILON))
466     def test_Tet3D_order7(self):
467     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=7)
468     self.__test_3DT(my_dom,7,1./sqrt(EPSILON))
469     def test_Tet3D_order8(self):
470     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=8)
471     self.__test_3DT(my_dom,8,1./sqrt(EPSILON))
472     def test_Tet3D_order9(self):
473     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=9)
474     self.__test_3DT(my_dom,9,1./sqrt(EPSILON))
475     def test_Tet3D_order10(self):
476     my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=10)
477     self.__test_3DT(my_dom,10)
478    
479 jgs 150 if __name__ == '__main__':
480     suite = unittest.TestSuite()
481     suite.addTest(unittest.makeSuite(Test_Generators))
482 gross 934 suite.addTest(unittest.makeSuite(Test_GMSHReader))
483 gross 1044 suite.addTest(unittest.makeSuite(Test_Reader))
484 gross 1341 suite.addTest(unittest.makeSuite(Test_Integration))
485 jgs 150 s=unittest.TextTestRunner(verbosity=2).run(suite)
486 gross 1376 if not s.wasSuccessful(): sys.exit(1)
487    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26