Diff of /trunk/doc/examples/usersguide/mount.py

revision 2484 by gross, Mon Jun 22 04:22:19 2009 UTC revision 2502 by gross, Tue Jun 30 05:49:22 2009 UTC
# Line 11  TOL=1.e-4 Line 11  TOL=1.e-4
11  OMEGA=10  OMEGA=10
12  EPS=0.01  EPS=0.01
13  t=0  t=0
14  T_END=(2*pi)/OMEGA  T_END=0.05 # set T_END=(2*pi)/OMEGA to run a full simulation
15  n=0  n=0
16  if DIM==2:  if DIM==2:
17    mydomain=Rectangle(int(ceil(L*NE/H)),NE,l0=L,l1=H,order=1, useFullElementOrder=True,optimize=True)    mydomain=Rectangle(int(ceil(L*NE/H)),NE,l0=L,l1=H,order=1, useFullElementOrder=True,optimize=True)
# Line 44  dt=0. Line 44  dt=0.
44  while t<T_END:  while t<T_END:
45      print "STEP ", t      print "STEP ", t
46      u=v*cos(OMEGA*t)      u=v*cos(OMEGA*t)
47      u,Z=mts.update(u=u,H_t=H_t,verbose=False)      u,Z=mts.update(u=u,H_t=H_t)
48
49      saveVTK("state.%d.vtu"%n,sol=Z)      saveVTK("state.%d.vtu"%n,sol=Z)
50      print "Integral(Z)=",integrate(Z),Lsup(u[DIM-1])      print "Integral(Z)=",integrate(Z),Lsup(u[DIM-1])

Legend:
 Removed from v.2484 changed lines Added in v.2502

 ViewVC Help Powered by ViewVC 1.1.26