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

Diff of /trunk/finley/test/python/run_models.py

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

revision 2647 by gross, Fri Sep 4 05:25:25 2009 UTC revision 2654 by gross, Tue Sep 8 07:11:12 2009 UTC
# Line 1125  class Test_FaultSystem(unittest.TestCase Line 1125  class Test_FaultSystem(unittest.TestCase
1125        self.failUnless(  abs(l-0.70710678118654) <= self.EPS,  "wrong max location")        self.failUnless(  abs(l-0.70710678118654) <= self.EPS,  "wrong max location")
1126    
1127                
1128     def xtest_Fault2D_TwoFaults(self):     def test_Fault2D_TwoFaults(self):
1129        f=FaultSystem(dim=2)        f=FaultSystem(dim=2)
1130        top1=[ [1.,0.], [1.,1.], [0.,1.] ]        top1=[ [1.,0.], [1.,1.], [0.,1.] ]
1131        self.failUnlessRaises(ValueError,f.addFault,top=top1,tag=1,bottom=top1)        self.failUnlessRaises(ValueError,f.addFault,top=top1,tag=1,bottom=top1)
# Line 1176  class Test_FaultSystem(unittest.TestCase Line 1176  class Test_FaultSystem(unittest.TestCase
1176        o=f.getOrientationOnSurface()/pi*180.        o=f.getOrientationOnSurface()/pi*180.
1177        self.failUnless( abs(o-45.) < self.EPS, "wrong orientation.")        self.failUnless( abs(o-45.) < self.EPS, "wrong orientation.")
1178    
1179          s,d=f.getSideAndDistance([0.,0.], tag=1)
1180          self.failUnless( s<0, "wrong side.")
1181          self.failUnless( abs(d-1.)<self.EPS, "wrong distance.")
1182          s,d=f.getSideAndDistance([0.,2.], tag=1)
1183          self.failUnless( s>0, "wrong side.")
1184          self.failUnless( abs(d-1.)<self.EPS, "wrong distance.")
1185          s,d=f.getSideAndDistance([1.,2.], tag=1)
1186          self.failUnless( s>0, "wrong side.")
1187          self.failUnless( abs(d-1.)<self.EPS, "wrong distance.")
1188          s,d=f.getSideAndDistance([2.,1.], tag=1)
1189          self.failUnless( s>0, "wrong side.")
1190          self.failUnless( abs(d-1.)<self.EPS, "wrong distance.")
1191          s,d=f.getSideAndDistance([2.,0.], tag=1)
1192          self.failUnless( s>0, "wrong side.")
1193          self.failUnless( abs(d-1.)<self.EPS, "wrong distance.")
1194          s,d=f.getSideAndDistance([0.,-1.], tag=1)
1195          self.failUnless( s<0, "wrong side.")
1196          self.failUnless( abs(d-1.41421356237)<self.EPS, "wrong distance.")
1197          s,d=f.getSideAndDistance([-1.,0], tag=1)
1198          self.failUnless( s<0, "wrong side.")
1199          self.failUnless( abs(d-1.41421356237)<self.EPS, "wrong distance.")
1200    
1201    
1202        f.transform(rot=-pi/2., shift=[-1.,-1.])        f.transform(rot=-pi/2., shift=[-1.,-1.])
1203        self.failUnless( [ 1, 2 ] == f.getTags(), "tags after transformation wrong")        self.failUnless( [ 1, 2 ] == f.getTags(), "tags after transformation wrong")
1204        self.failUnless(  2. == f.getLength(1), "length after transformation wrong")        self.failUnless(  2. == f.getLength(1), "length after transformation wrong")

Legend:
Removed from v.2647  
changed lines
  Added in v.2654

  ViewVC Help
Powered by ViewVC 1.1.26