/[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 2793 by gross, Tue Dec 1 06:10:10 2009 UTC revision 2794 by gross, Wed Dec 2 00:43:17 2009 UTC
# Line 918  class Test_IncompressibleIsotropicFlowCa Line 918  class Test_IncompressibleIsotropicFlowCa
918     VERBOSE=False or True     VERBOSE=False or True
919     A=1.     A=1.
920     P_max=100     P_max=100
921     NE=2*getMPISizeWorld()*2     NE=2*getMPISizeWorld()
922     tau_Y=10.     tau_Y=10.
923     N_dt=10     N_dt=10
924    
# Line 992  class Test_IncompressibleIsotropicFlowCa Line 992  class Test_IncompressibleIsotropicFlowCa
992           t_ref=t+dt           t_ref=t+dt
993           v_ref, s_ref,p_ref=self.getReference(t_ref)           v_ref, s_ref,p_ref=self.getReference(t_ref)
994           mod.setExternals(f=matrixmult(s_ref,n)-p_ref*n, v_boundary=v_ref)           mod.setExternals(f=matrixmult(s_ref,n)-p_ref*n, v_boundary=v_ref)
995           mod.update(dt, eta_iter_max=10, iter_max=50, verbose=self.VERBOSE, usePCG=True, max_correction_steps=30)           # mod.update(dt, eta_iter_max=10, iter_max=50, verbose=self.VERBOSE, usePCG=True, max_correction_steps=30) new version
996             mod.update(dt, iter_max=50, verbose=self.VERBOSE, usePCG=True)
997           self.check(N_t,mod,t_ref,v_ref, s_ref,p_ref)           self.check(N_t,mod,t_ref,v_ref, s_ref,p_ref)
998           t+=dt           t+=dt
999           N_t+=1           N_t+=1
# Line 1005  class Test_IncompressibleIsotropicFlowCa Line 1006  class Test_IncompressibleIsotropicFlowCa
1006           error_v=Lsup(mod.getVelocity()-v_ref)/Lsup(v_ref)           error_v=Lsup(mod.getVelocity()-v_ref)/Lsup(v_ref)
1007           error_t=abs(mod.getTime()-t_ref)/abs(t_ref)           error_t=abs(mod.getTime()-t_ref)/abs(t_ref)
1008           if self.VERBOSE: print "time step ",N_t,"time = ",mod.getTime(),"errors s,p,v = ",error_s, error_p, error_v           if self.VERBOSE: print "time step ",N_t,"time = ",mod.getTime(),"errors s,p,v = ",error_s, error_p, error_v
1009           self.failUnless( error_p <= 10*self.TOL, "time step %s: pressure error %s too high."%(N_t,error_p) )           self.failUnless( error_p <= 80*self.TOL, "time step %s: pressure error %s too high."%(N_t,error_p) )
1010           self.failUnless( error_s <= 10*self.TOL, "time step %s: stress error %s too high."%(N_t,error_s) )           self.failUnless( error_v <= 80*self.TOL, "time step %s: velocity error %s too high."%(N_t,error_v) )
1011           self.failUnless( error_v <= 10*self.TOL, "time step %s: velocity error %s too high."%(N_t,error_v) )           self.failUnless( error_t <= 80*self.TOL, "time step %s: time marker error %s too high."%(N_t,error_t) )
1012           self.failUnless( error_t <= 10*self.TOL, "time step %s: time marker error %s too high."%(N_t,error_t) )           self.failUnless( error_s <= 99*self.TOL, "time step %s: stress error %s too high."%(N_t,error_s) )
1013     def tearDown(self):     def tearDown(self):
1014          del self.dom          del self.dom
1015    
# Line 1734  class Test_FaultSystem(unittest.TestCase Line 1735  class Test_FaultSystem(unittest.TestCase
1735    
1736  if __name__ == '__main__':  if __name__ == '__main__':
1737     suite = unittest.TestSuite()     suite = unittest.TestSuite()
1738     # suite.addTest(unittest.makeSuite(Test_FaultSystem))     suite.addTest(unittest.makeSuite(Test_FaultSystem))
1739     # suite.addTest(unittest.makeSuite(Test_StokesProblemCartesian2D))     suite.addTest(unittest.makeSuite(Test_StokesProblemCartesian2D))
1740     # suite.addTest(unittest.makeSuite(Test_Darcy3D))     suite.addTest(unittest.makeSuite(Test_Darcy3D))
1741     # suite.addTest(unittest.makeSuite(Test_Darcy2D))     suite.addTest(unittest.makeSuite(Test_Darcy2D))
1742     # suite.addTest(unittest.makeSuite(Test_StokesProblemCartesian3D))     suite.addTest(unittest.makeSuite(Test_StokesProblemCartesian3D))
1743     # suite.addTest(unittest.makeSuite(Test_Mountains3D))     suite.addTest(unittest.makeSuite(Test_Mountains3D))
1744     # suite.addTest(unittest.makeSuite(Test_Mountains2D))     suite.addTest(unittest.makeSuite(Test_Mountains2D))
1745     # suite.addTest(unittest.makeSuite(Test_Rheologies))     suite.addTest(unittest.makeSuite(Test_Rheologies))
1746     suite.addTest(Test_IncompressibleIsotropicFlowCartesian("test_D2_Fixed_Mu"))     # suite.addTest(Test_IncompressibleIsotropicFlowCartesian("test_D2_Fixed_Mu"))
1747     # suite.addTest(unittest.makeSuite(Test_IncompressibleIsotropicFlowCartesian))     suite.addTest(unittest.makeSuite(Test_IncompressibleIsotropicFlowCartesian))
1748     s=unittest.TextTestRunner(verbosity=2).run(suite)     s=unittest.TextTestRunner(verbosity=2).run(suite)
1749     if not s.wasSuccessful(): sys.exit(1)     if not s.wasSuccessful(): sys.exit(1)
1750    

Legend:
Removed from v.2793  
changed lines
  Added in v.2794

  ViewVC Help
Powered by ViewVC 1.1.26