|
28 | 28 |
|
29 | 29 | # This comes as read-in for the level class |
30 | 30 | lparams = {} |
31 | | - lparams['restol'] = 1E-12 |
| 31 | + lparams['restol'] = 1E-6 |
32 | 32 |
|
33 | 33 | swparams = {} |
34 | 34 | swparams['collocation_class'] = collclass.CollGaussLobatto |
|
41 | 41 | # setup parameters "in time" |
42 | 42 | t0 = 0 |
43 | 43 | Tend = 3000 |
44 | | - Nsteps = 500 |
| 44 | + Nsteps = 250 |
45 | 45 | dt = Tend/float(Nsteps) |
46 | 46 |
|
47 | 47 | # This comes as read-in for the problem class |
|
52 | 52 | pparams['Nfreq'] = 0.01 |
53 | 53 | pparams['x_bounds'] = [(-150.0, 150.0)] |
54 | 54 | pparams['z_bounds'] = [( 0.0, 10.0)] |
55 | | - pparams['order'] = [0, 0] # [fine_level, coarse_level] |
56 | | - pparams['gmres_maxiter'] = [50, 50] |
| 55 | + pparams['order'] = [0] # [fine_level, coarse_level] |
| 56 | + pparams['gmres_maxiter'] = [50] |
57 | 57 | pparams['gmres_restart'] = 20 |
58 | | - pparams['gmres_tol'] = 1e-14 |
| 58 | + pparams['gmres_tol'] = 1e-6 |
59 | 59 |
|
60 | 60 | # This comes as read-in for the transfer operations |
61 | 61 | tparams = {} |
|
80 | 80 | # get initial values on finest level |
81 | 81 | P = MS[0].levels[0].prob |
82 | 82 | uinit = P.u_exact(t0) |
| 83 | + |
| 84 | + cfl_advection = pparams['u_adv']*dt/P.h[0] |
| 85 | + cfl_acoustic_hor = pparams['c_s']*dt/P.h[0] |
| 86 | + cfl_acoustic_ver = pparams['c_s']*dt/P.h[1] |
| 87 | + print ("CFL number of advection: %4.2f" % cfl_advection) |
| 88 | + print ("CFL number of acoustics (horizontal): %4.2f" % cfl_acoustic_hor) |
| 89 | + print ("CFL number of acoustics (vertical): %4.2f" % cfl_acoustic_ver) |
83 | 90 |
|
84 | 91 | # call main function to get things done... |
85 | 92 | uend,stats = mp.run_pfasst(MS,u0=uinit,t0=t0,dt=dt,Tend=Tend) |
|
0 commit comments