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

revision 3773 by jfenwick, Mon Oct 11 01:48:14 2010 UTC revision 3774 by jfenwick, Wed Jan 18 06:29:34 2012 UTC
# Line 37  import esys.dudley as dudley Line 37  import esys.dudley as dudley
37  TOL=1.e-8  TOL=1.e-8
38
39  def runTest(dom, n=1, a=0, b=0):  def runTest(dom, n=1, a=0, b=0):
40     print "================== TEST : n= %s a=%s b=%s ================"%(n,a,b)     print("================== TEST : n= %s a=%s b=%s ================"%(n,a,b))
41     DIM=dom.getDim()     DIM=dom.getDim()
42     normal=dom.getNormal()     normal=dom.getNormal()
43     mypde=LinearPDE(dom, numEquations=n, numSolutions=n)     mypde=LinearPDE(dom, numEquations=n, numSolutions=n)
# Line 80  def runTest(dom, n=1, a=0, b=0): Line 80  def runTest(dom, n=1, a=0, b=0):
80     mypde.setSymmetryOn()     mypde.setSymmetryOn()
81     u=mypde.getSolution()     u=mypde.getSolution()
82     error=Lsup(u-u_ref)/Lsup(u_ref)     error=Lsup(u-u_ref)/Lsup(u_ref)
83     print "error = ",error     print("error = ",error)
84     if error > 10*TOL: print "XXXXXXXXXX Error to large ! XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"     if error > 10*TOL: print("XXXXXXXXXX Error to large ! XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
85
86  domain=dudley.Rectangle(10,20,1,l0=1.,l1=1.0)  domain=dudley.Rectangle(10,20,1,l0=1.,l1=1.0)