revision 422 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 *
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: