/[escript]/trunk/downunder/test/python/run_forward.py
ViewVC logotype

Diff of /trunk/downunder/test/python/run_forward.py

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

revision 5169 by gross, Mon Sep 22 08:46:58 2014 UTC revision 5181 by gross, Tue Sep 30 01:42:49 2014 UTC
# Line 420  class TestSubsidence(unittest.TestCase): Line 420  class TestSubsidence(unittest.TestCase):
420          args1=acw.getArguments(P1)          args1=acw.getArguments(P1)
421          d1=acw.getDefect(P1, *args1)          d1=acw.getDefect(P1, *args1)
422          ref=abs((d1-d0)/INC)          ref=abs((d1-d0)/INC)
423            print "S.A",abs((d1-d0)/INC-integrate(grad_d* dP))/ref
424          self.assertTrue(abs((d1-d0)/INC-integrate(grad_d* dP)) < ref * 1.e-5)          self.assertTrue(abs((d1-d0)/INC-integrate(grad_d* dP)) < ref * 1.e-5)
425    
426          dP=exp(-(length(x-[0.3,0.3,0.5])/0.06)**2)          dP=exp(-(length(x-[0.3,0.3,0.5])/0.06)**2)
# Line 427  class TestSubsidence(unittest.TestCase): Line 428  class TestSubsidence(unittest.TestCase):
428          args2=acw.getArguments(P2)          args2=acw.getArguments(P2)
429          d2=acw.getDefect(P2, *args2)          d2=acw.getDefect(P2, *args2)
430          ref=abs((d2-d0)/INC)          ref=abs((d2-d0)/INC)
431            print "S.B",abs((d2-d0)/INC+integrate(grad_d* dP))/ref
432          self.assertTrue(abs((d2-d0)/INC+integrate(grad_d* dP)) < ref * 1.e-5)          self.assertTrue(abs((d2-d0)/INC+integrate(grad_d* dP)) < ref * 1.e-5)
433    
434    
# Line 442  class TestIsostaticPressure(unittest.Tes Line 444  class TestIsostaticPressure(unittest.Tes
444          rho=Scalar(100, Function(domain))          rho=Scalar(100, Function(domain))
445          p0=ps.getPressure(g, rho)          p0=ps.getPressure(g, rho)
446          p_ref=-(1.-domain.getX()[2])*981.          p_ref=-(1.-domain.getX()[2])*981.
447            print "P.A",Lsup(p0-p_ref)/Lsup(p_ref)
448          self.assertTrue(Lsup(p0-p_ref) < 1e-6 * Lsup(p_ref))          self.assertTrue(Lsup(p0-p_ref) < 1e-6 * Lsup(p_ref))
449    
450          g=Vector([0,0,-10], Function(domain))          g=Vector([0,0,-10], Function(domain))
451          rho=Scalar(0, Function(domain))          rho=Scalar(0, Function(domain))
452          p0=ps.getPressure(g, rho)          p0=ps.getPressure(g, rho)
453          p_ref=-(1.-domain.getX()[2])*26700          p_ref=-(1.-domain.getX()[2])*26700
454            print "P.B",Lsup(p0-p_ref)/Lsup(p_ref)
455          self.assertTrue(Lsup(p0-p_ref) < 1e-6 * Lsup(p_ref))          self.assertTrue(Lsup(p0-p_ref) < 1e-6 * Lsup(p_ref))
456    
457          g=Vector([0,0,-10], Function(domain))          g=Vector([0,0,-10], Function(domain))
458          rho=Scalar(100, Function(domain))          rho=Scalar(100, Function(domain))
459          p0=ps.getPressure(g, rho)          p0=ps.getPressure(g, rho)
460          p_ref=-(1.-domain.getX()[2])*(981.+26700+1000)          p_ref=-(1.-domain.getX()[2])*(981.+26700+1000)
461            print "P.C",Lsup(p0-p_ref)/Lsup(p_ref)
462          self.assertTrue(Lsup(p0-p_ref) < 1e-6 * Lsup(p_ref))          self.assertTrue(Lsup(p0-p_ref) < 1e-6 * Lsup(p_ref))
463                                                                
464  if __name__ == '__main__':  if __name__ == '__main__':

Legend:
Removed from v.5169  
changed lines
  Added in v.5181

  ViewVC Help
Powered by ViewVC 1.1.26