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

Diff of /trunk/esys2/finley/test/python/RecMeshTest.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 103 by jgs, Tue Oct 26 06:53:54 2004 UTC revision 104 by jgs, Fri Dec 17 07:43:12 2004 UTC
# Line 3  Line 3 
3    
4  import sys  import sys
5  import os  import os
6  esys_root=os.getenv('ESYS_ROOT')  
7  sys.path.append(esys_root+'/finley/lib')  import esys.escript
8  sys.path.append(esys_root+'/escript/lib')  import esys.finley
 import escript  
 import finley  
9    
10  TMPFILE="tmp.msh"  TMPFILE="tmp.msh"
11    
# Line 268  def checker(dom,reference): Line 266  def checker(dom,reference):
266    
267  failed=[]  failed=[]
268    
269  my_dom=finley.Interval(1,1)  my_dom=Interval(1,1)
270  if checker(my_dom,ref_line1):  if checker(my_dom,ref_line1):
271    print "@@@@ line, order 1 passed"    print "@@@@ line, order 1 passed"
272  else:  else:
273    failed.append("line, order 1")    failed.append("line, order 1")
274    
275  my_dom=finley.Interval(1,2)  my_dom=Interval(1,2)
276  if checker(my_dom,ref_line2):  if checker(my_dom,ref_line2):
277    print "@@@@ line, order 2 passed"    print "@@@@ line, order 2 passed"
278  else:  else:
279    failed.append("line, order 2")    failed.append("line, order 2")
280    
281  my_dom=finley.Rectangle(1,1,1)  my_dom=Rectangle(1,1,1)
282  if checker(my_dom,ref_rec1):  if checker(my_dom,ref_rec1):
283    print "@@@@ rec, order 1 passed"    print "@@@@ rec, order 1 passed"
284  else:  else:
285    failed.append("rec, order 1")    failed.append("rec, order 1")
286    
287  my_dom=finley.Rectangle(1,1,2)  my_dom=Rectangle(1,1,2)
288  if checker(my_dom,ref_rec2):  if checker(my_dom,ref_rec2):
289    print "@@@@ rec, order 2 passed"    print "@@@@ rec, order 2 passed"
290  else:  else:
291    failed.append("rec, order 2")    failed.append("rec, order 2")
292    
293  my_dom=finley.Brick(1,1,1,1)  my_dom=Brick(1,1,1,1)
294  if checker(my_dom,ref_brick1):  if checker(my_dom,ref_brick1):
295    print "@@@@ brick, order 1 passed"    print "@@@@ brick, order 1 passed"
296  else:  else:
297    failed.append("brick, order 1")    failed.append("brick, order 1")
298    
299  my_dom=finley.Brick(1,1,1,2)  my_dom=Brick(1,1,1,2)
300  if checker(my_dom,ref_brick2):  if checker(my_dom,ref_brick2):
301    print "@@@@ brick, order 2 passed"    print "@@@@ brick, order 2 passed"
302  else:  else:
303    failed.append("brick, order 2")    failed.append("brick, order 2")
304    
305  my_dom=finley.Interval(1,1,useElementsOnFace=1)  my_dom=Interval(1,1,useElementsOnFace=1)
306  if checker(my_dom,ref_line1_onElement):  if checker(my_dom,ref_line1_onElement):
307    print "@@@@ line, order 1, onElement passed"    print "@@@@ line, order 1, onElement passed"
308  else:  else:
309    failed.append("line, order 1, onElement")    failed.append("line, order 1, onElement")
310    
311  my_dom=finley.Interval(1,2,useElementsOnFace=1)  #my_dom=Interval(1,2,useElementsOnFace=1)
312  if checker(my_dom,ref_line2_onElement):  #if checker(my_dom,ref_line2_onElement):
313    print "@@@@ line, order 2, onElement passed"  #  print "@@@@ line, order 2, onElement passed"
314  else:  #else:
315    failed.append("line, order 2, onElement")  #  failed.append("line, order 2, onElement")
316    
317  my_dom=finley.Rectangle(1,1,1,useElementsOnFace=1)  my_dom=Rectangle(1,1,1,useElementsOnFace=1)
318  if checker(my_dom,ref_rec1_onElement):  if checker(my_dom,ref_rec1_onElement):
319    print "@@@@ rec, order 1, onElement passed"    print "@@@@ rec, order 1, onElement passed"
320  else:  else:
321    failed.append("rec, order 1, onElement")    failed.append("rec, order 1, onElement")
322    
323  my_dom=finley.Rectangle(1,1,2,useElementsOnFace=1)  my_dom=Rectangle(1,1,2,useElementsOnFace=1)
324  if checker(my_dom,ref_rec2_onElement):  if checker(my_dom,ref_rec2_onElement):
325    print "@@@@ rec, order 2, onElement passed"    print "@@@@ rec, order 2, onElement passed"
326  else:  else:
327    failed.append("rec, order 2, onElement")    failed.append("rec, order 2, onElement")
328    
329  my_dom=finley.Brick(1,1,1,1,useElementsOnFace=1)  my_dom=Brick(1,1,1,1,useElementsOnFace=1)
330  if checker(my_dom,ref_brick1_onElement):  if checker(my_dom,ref_brick1_onElement):
331    print "@@@@ brick, order 1, onElement passed"    print "@@@@ brick, order 1, onElement passed"
332  else:  else:
333    failed.append("brick, order 1, onElement")    failed.append("brick, order 1, onElement")
334    
335  my_dom=finley.Brick(1,1,1,2,useElementsOnFace=1)  my_dom=Brick(1,1,1,2,useElementsOnFace=1)
336  if checker(my_dom,ref_brick2_onElement):  if checker(my_dom,ref_brick2_onElement):
337    print "@@@@ brick, order 2, onElement passed"    print "@@@@ brick, order 2, onElement passed"
338  else:  else:

Legend:
Removed from v.103  
changed lines
  Added in v.104

  ViewVC Help
Powered by ViewVC 1.1.26