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

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

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

revision 3773 by jfenwick, Fri Aug 19 03:53:41 2011 UTC revision 3774 by jfenwick, Wed Jan 18 06:29:34 2012 UTC
# Line 419  class Test_Darcy(unittest.TestCase): Line 419  class Test_Darcy(unittest.TestCase):
419      #      #
420      def rescaleDomain(self):      def rescaleDomain(self):
421          x=self.dom.getX().copy()          x=self.dom.getX().copy()
422          for i in xrange(self.dom.getDim()):          for i in range(self.dom.getDim()):
423               x_inf=inf(x[i])               x_inf=inf(x[i])
424               x_sup=sup(x[i])               x_sup=sup(x[i])
425               if i == self.dom.getDim()-1:               if i == self.dom.getDim()-1:
# Line 437  class Test_Darcy(unittest.TestCase): Line 437  class Test_Darcy(unittest.TestCase):
437      def getVectorMask(self,include_bottom=True):      def getVectorMask(self,include_bottom=True):
438          x=self.dom.getX().copy()          x=self.dom.getX().copy()
439          out=Vector(0.,Solution(self.dom))          out=Vector(0.,Solution(self.dom))
440          for i in xrange(self.dom.getDim()):          for i in range(self.dom.getDim()):
441               x_inf=inf(x[i])               x_inf=inf(x[i])
442               x_sup=sup(x[i])               x_sup=sup(x[i])
443               if i != self.dom.getDim()-1: out[i]+=whereZero(x[i]-x_sup)               if i != self.dom.getDim()-1: out[i]+=whereZero(x[i]-x_sup)
# Line 773  class Test_Rheologies(unittest.TestCase) Line 773  class Test_Rheologies(unittest.TestCase)
773           pl.setDruckerPragerLaw(tau_Y=100.)           pl.setDruckerPragerLaw(tau_Y=100.)
774           pl.setPowerLaw(eta_N=2.)           pl.setPowerLaw(eta_N=2.)
775           pl.setEtaTolerance(self.TOL)           pl.setEtaTolerance(self.TOL)
776           for i in xrange(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])           for i in range(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])
777                    
778       def test_PowerLaw_QuadLarge(self):       def test_PowerLaw_QuadLarge(self):
779           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]
# Line 782  class Test_Rheologies(unittest.TestCase) Line 782  class Test_Rheologies(unittest.TestCase)
782           pl.setDruckerPragerLaw(tau_Y=100.)           pl.setDruckerPragerLaw(tau_Y=100.)
783           pl.setPowerLaws(eta_N=[2.,0.01],tau_t=[1, 25.], power=[1,2])           pl.setPowerLaws(eta_N=[2.,0.01],tau_t=[1, 25.], power=[1,2])
784           pl.setEtaTolerance(self.TOL)           pl.setEtaTolerance(self.TOL)
785           for i in xrange(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])           for i in range(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])
786    
787       def test_PowerLaw_QuadSmall(self):       def test_PowerLaw_QuadSmall(self):
788           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]
# Line 791  class Test_Rheologies(unittest.TestCase) Line 791  class Test_Rheologies(unittest.TestCase)
791           pl.setDruckerPragerLaw(tau_Y=100.)           pl.setDruckerPragerLaw(tau_Y=100.)
792           pl.setPowerLaws(eta_N=[2.,10.],tau_t=[1, 25.], power=[1,2])           pl.setPowerLaws(eta_N=[2.,10.],tau_t=[1, 25.], power=[1,2])
793           pl.setEtaTolerance(self.TOL)           pl.setEtaTolerance(self.TOL)
794           for i in xrange(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])           for i in range(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])
795    
796       def test_PowerLaw_CubeLarge(self):       def test_PowerLaw_CubeLarge(self):
797           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]
# Line 800  class Test_Rheologies(unittest.TestCase) Line 800  class Test_Rheologies(unittest.TestCase)
800           pl.setDruckerPragerLaw(tau_Y=100.)           pl.setDruckerPragerLaw(tau_Y=100.)
801           pl.setPowerLaws(eta_N=[2.,1./16.],tau_t=[1, 64.], power=[1,3])           pl.setPowerLaws(eta_N=[2.,1./16.],tau_t=[1, 64.], power=[1,3])
802           pl.setEtaTolerance(self.TOL)           pl.setEtaTolerance(self.TOL)
803           for i in xrange(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])           for i in range(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])
804    
805       def test_PowerLaw_CubeSmall(self):       def test_PowerLaw_CubeSmall(self):
806           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]
# Line 809  class Test_Rheologies(unittest.TestCase) Line 809  class Test_Rheologies(unittest.TestCase)
809           pl.setDruckerPragerLaw(tau_Y=100.)           pl.setDruckerPragerLaw(tau_Y=100.)
810           pl.setPowerLaws(eta_N=[2.,25./4.],tau_t=[1, 64.], power=[1,3])           pl.setPowerLaws(eta_N=[2.,25./4.],tau_t=[1, 64.], power=[1,3])
811           pl.setEtaTolerance(self.TOL)           pl.setEtaTolerance(self.TOL)
812           for i in xrange(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])           for i in range(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])
813    
814       def test_PowerLaw_QuadLarge_CubeLarge(self):       def test_PowerLaw_QuadLarge_CubeLarge(self):
815           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]
# Line 819  class Test_Rheologies(unittest.TestCase) Line 819  class Test_Rheologies(unittest.TestCase)
819           pl.setDruckerPragerLaw(tau_Y=100.)           pl.setDruckerPragerLaw(tau_Y=100.)
820           pl.setPowerLaws(eta_N=[2.,0.01,1./16.],tau_t=[1, 25.,64.], power=[1,2,3])           pl.setPowerLaws(eta_N=[2.,0.01,1./16.],tau_t=[1, 25.,64.], power=[1,2,3])
821           pl.setEtaTolerance(self.TOL)           pl.setEtaTolerance(self.TOL)
822           for i in xrange(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])           for i in range(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])
823    
824       def test_PowerLaw_QuadLarge_CubeSmall(self):       def test_PowerLaw_QuadLarge_CubeSmall(self):
825           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]
# Line 829  class Test_Rheologies(unittest.TestCase) Line 829  class Test_Rheologies(unittest.TestCase)
829           pl.setDruckerPragerLaw(tau_Y=100.)           pl.setDruckerPragerLaw(tau_Y=100.)
830           pl.setPowerLaws(eta_N=[2.,0.01,25./4.],tau_t=[1, 25.,64.], power=[1,2,3])           pl.setPowerLaws(eta_N=[2.,0.01,25./4.],tau_t=[1, 25.,64.], power=[1,2,3])
831           pl.setEtaTolerance(self.TOL)           pl.setEtaTolerance(self.TOL)
832           for i in xrange(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])           for i in range(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])
833    
834       def test_PowerLaw_QuadSmall_CubeLarge(self):       def test_PowerLaw_QuadSmall_CubeLarge(self):
835           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]
# Line 838  class Test_Rheologies(unittest.TestCase) Line 838  class Test_Rheologies(unittest.TestCase)
838           pl.setDruckerPragerLaw(tau_Y=100.)           pl.setDruckerPragerLaw(tau_Y=100.)
839           pl.setPowerLaws(eta_N=[2.,10.,1./16.],tau_t=[1, 25.,64.], power=[1,2,3])           pl.setPowerLaws(eta_N=[2.,10.,1./16.],tau_t=[1, 25.,64.], power=[1,2,3])
840           pl.setEtaTolerance(self.TOL)           pl.setEtaTolerance(self.TOL)
841           for i in xrange(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])           for i in range(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])
842    
843       def test_PowerLaw_QuadSmall_CubeSmall(self):       def test_PowerLaw_QuadSmall_CubeSmall(self):
844           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]
# Line 847  class Test_Rheologies(unittest.TestCase) Line 847  class Test_Rheologies(unittest.TestCase)
847           pl.setDruckerPragerLaw(tau_Y=100.)           pl.setDruckerPragerLaw(tau_Y=100.)
848           pl.setPowerLaws(eta_N=[2.,10.,25./4.],tau_t=[1, 25.,64.], power=[1,2,3])           pl.setPowerLaws(eta_N=[2.,10.,25./4.],tau_t=[1, 25.,64.], power=[1,2,3])
849           pl.setEtaTolerance(self.TOL)           pl.setEtaTolerance(self.TOL)
850           for i in xrange(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])           for i in range(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i]),taus[i])
851    
852       def test_PowerLaw_withShear(self):       def test_PowerLaw_withShear(self):
853           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]           taus=[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]
# Line 859  class Test_Rheologies(unittest.TestCase) Line 859  class Test_Rheologies(unittest.TestCase)
859           dt=1./3.           dt=1./3.
860           pl.setEtaTolerance(self.TOL)           pl.setEtaTolerance(self.TOL)
861           self.assertRaises(ValueError, pl.getEtaEff,gamma_dot_s[0])           self.assertRaises(ValueError, pl.getEtaEff,gamma_dot_s[0])
862           for i in xrange(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i],dt=dt),taus[i])           for i in range(len(taus)): self.checkResult(i,gamma_dot_s[i], pl.getEtaEff(gamma_dot_s[i],dt=dt),taus[i])
863    
864    
865  class Test_FaultSystem(unittest.TestCase):  class Test_FaultSystem(unittest.TestCase):

Legend:
Removed from v.3773  
changed lines
  Added in v.3774

  ViewVC Help
Powered by ViewVC 1.1.26