/[escript]/trunk/finley/test/python/AdvectivePDETest.py
ViewVC logotype

Diff of /trunk/finley/test/python/AdvectivePDETest.py

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

revision 155 by jgs, Wed Nov 9 02:02:19 2005 UTC revision 423 by gross, Fri Jan 6 08:09:43 2006 UTC
# Line 26  Line 26 
26  #  #
27    
28  from esys.escript import *  from esys.escript import *
29  from esys.linearPDEs import AdvectivePDE,LinearPDE  from esys.escript.linearPDEs import AdvectivePDE,LinearPDE
30  from esys import finley  from esys import finley
31  from random import random  from random import random
32    
# Line 67  for d in [3]: Line 67  for d in [3]:
67     if d==2:     if d==2:
68       mydomain=finley.Rectangle(ne,ne,1)       mydomain=finley.Rectangle(ne,ne,1)
69       x=mydomain.getX()       x=mydomain.getX()
70       msk=x[0].whereZero()+(x[0]-1.).whereZero()+x[1].whereZero()+(x[1]-1.).whereZero()       msk=whereZero(x[0])+whereZero(x[0]-1.)+whereZero(x[1])+whereZero(x[1]-1.)
71     else:     else:
72       mydomain=finley.Brick(ne,ne,ne,1)       mydomain=finley.Brick(ne,ne,ne,1)
73       x=mydomain.getX()       x=mydomain.getX()
74       msk=x[0].whereZero()+(x[0]-1.).whereZero()+x[1].whereZero()+(x[1]-1.).whereZero()+x[2].whereZero()+(x[2]-1.).whereZero()       msk=whereZero(x[0])+whereZero(x[0]-1.)+whereZero(x[1])+whereZero(x[1]-1.)+whereZero(x[2])+whereZero(x[2]-1.)
75     print "@ generated %d-dimension mesh with %d elements in each direction"%(d,ne)     print "@ generated %d-dimension mesh with %d elements in each direction"%(d,ne)
76     # for ncomp in [1,2]:     # for ncomp in [1,2]:
77     for ncomp in [2]:     for ncomp in [2]:
# Line 113  for d in [3]: Line 113  for d in [3]:
113          # create domain:          # create domain:
114          mypde=AdvectivePDE(mydomain)          mypde=AdvectivePDE(mydomain)
115          # mypde.setSolverMethod(mypde.DIRECT)          # mypde.setSolverMethod(mypde.DIRECT)
116          mypde.setValue(q=msk*maskf,A=K)          print K
117            mypde.setValue(q=msk*maskf)
118            mypde.setValue(A=K)
119            mypde.setValue(A=K,q=msk*maskf)
120          mypde.checkSymmetry()          mypde.checkSymmetry()
121          # run Peclet          # run Peclet
122          for Pe in [0.001,1.,1.,10.,100,1000.,10000.,100000.,1000000.,10000000.]:          for Pe in [0.001,1.,1.,10.,100,1000.,10000.,100000.,1000000.,10000000.]:

Legend:
Removed from v.155  
changed lines
  Added in v.423

  ViewVC Help
Powered by ViewVC 1.1.26