|
58 | 58 | # 0 = normal backward Euler method |
59 | 59 | # 1 = artificially constructed method with phase error from backward Euler and exact amplification factor |
60 | 60 | # 2 = artificially constructed method with exact phase and amplification factor from backward Euler |
61 | | -artificial_coarse = 0 |
| 61 | +artificial_coarse = 2 |
62 | 62 |
|
63 | 63 | artificial_fine = 0 |
64 | 64 |
|
@@ -110,14 +110,14 @@ def run_parareal(uhat, D, k): |
110 | 110 | # stability matrix |
111 | 111 | if not artificial_coarse == 0: |
112 | 112 | stab_tailor = sp.csc_matrix(np.array([stab_tailor], dtype='complex')) |
113 | | - para = parareal(tstart=0.0, tend=tmax, nslices=nproc, fine=intexact, coarse=stab_tailor, nsteps_fine=nfine, nsteps_coarse=ncoarse, tolerance=0.0, iter_max=k, u0 = sol) |
| 113 | + para = parareal(tstart=0.0, tend=tmax, nslices=nproc, fine=intexact, coarse=stab_tailor, nsteps_fine=nfine, nsteps_coarse=1, tolerance=0.0, iter_max=k, u0 = sol) |
114 | 114 |
|
115 | 115 | if artificial_fine==1: |
116 | 116 | assert artificial_coarse==0, "Using artifical coarse and fine propagators together is not implemented and probably not working correctly" |
117 | 117 | stab_fine = abs(stab_ex)*np.exp(1j*np.angle(stab_coarse[0,0])) |
118 | 118 | stab_fine = sp.csc_matrix(np.array([stab_fine], dtype='complex')) |
119 | 119 | # Must use nfine=1 in this case |
120 | | - para = parareal(tstart=0.0, tend=tmax, nslices=nproc, fine=stab_fine, coarse=impeuler, nsteps_fine=nfine, nsteps_coarse=ncoarse, tolerance=0.0, iter_max=k, u0 = sol) |
| 120 | + para = parareal(tstart=0.0, tend=tmax, nslices=nproc, fine=stab_fine, coarse=impeuler, nsteps_fine=1, nsteps_coarse=ncoarse, tolerance=0.0, iter_max=k, u0 = sol) |
121 | 121 |
|
122 | 122 | para.run() |
123 | 123 | temp = para.get_last_end_value() |
|
0 commit comments