/[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 2674 by gross, Tue Sep 15 06:04:44 2009 UTC revision 2675 by gross, Mon Sep 21 02:32:17 2009 UTC
# Line 1123  class Test_FaultSystem(unittest.TestCase Line 1123  class Test_FaultSystem(unittest.TestCase
1123        self.failUnless(  m == 0.25, "wrong max value")        self.failUnless(  m == 0.25, "wrong max value")
1124        self.failUnless(  t == 1, "wrong max tag")        self.failUnless(  t == 1, "wrong max tag")
1125        self.failUnless(  abs(l-0.70710678118654) <= self.EPS,  "wrong max location")        self.failUnless(  abs(l-0.70710678118654) <= self.EPS,  "wrong max location")
1126       def test_Fault_MinValue(self):
1127          dom=Rectangle(2*self.NE,2*self.NE)
1128          x=dom.getX()
1129          f=FaultSystem(dim=2)
1130          f.addFault(V0=[0.5,0.], strikes=[3.*pi/4], ls=[0.70710678118654757], tag=1)
1131          f.addFault(V0=[1.,0.5], strikes=[pi, pi/2], ls=[0.5,0.5], tag=2)
1132    
1133          m, t, l=f.getMinValue(-x[0]*(1.-x[0])*(1-x[1]))
1134          self.failUnless(  m == -0.25, "wrong min value")
1135          self.failUnless(  t == 1, "wrong min tag")
1136          self.failUnless(  l == 0., "wrong min location")
1137          m, t, l=f.getMinValue(-x[1]*(1.-x[1])*(1-x[0])*x[0])
1138          self.failUnless(  m == -0.0625, "wrong min value")
1139          self.failUnless(  t == 2, "wrong min tag")
1140          self.failUnless(  l == 0.5, "wrong min location")
1141          m, t, l=f.getMinValue(-x[0]*(1.-x[0])*x[1])
1142          self.failUnless(  m == -0.25, "wrong min value")
1143          self.failUnless(  t == 2, "wrong min tag")
1144          self.failUnless(  l == 1.0, "wrong min location")
1145          m, t, l= f.getMinValue(-x[1]*(1.-x[1])*x[0])
1146          self.failUnless(  m == -0.25, "wrong min value")
1147          self.failUnless(  t == 2, "wrong min tag")
1148          self.failUnless(  l == 0., "wrong min location")
1149          m, t, l= f.getMinValue(-x[1]*(1.-x[1])*(1.-x[0]))
1150          self.failUnless(  m == -0.25, "wrong min value")
1151          self.failUnless(  t == 1, "wrong min tag")
1152          self.failUnless(  abs(l-0.70710678118654) <= self.EPS,  "wrong min location")
1153    
1154                
1155     def test_Fault2D(self):     def test_Fault2D(self):

Legend:
Removed from v.2674  
changed lines
  Added in v.2675

  ViewVC Help
Powered by ViewVC 1.1.26