/[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 1809 - (hide annotations)
Thu Sep 25 06:43:44 2008 UTC (11 years ago) by ksteube
File MIME type: text/x-python
File size: 18664 byte(s)
Copyright updated in all python files

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26