|
19 | 19 | ref = 'PFASST_GRAYSCOTT_stats_hf_SPREAD_P32.npz' |
20 | 20 |
|
21 | 21 | # list files, strategy names, colors, markers |
22 | | - # list = [('PFASST_GRAYSCOTT_stats_hf_INTERP_PREDICT_P32.npz','2-sided+corr','green','o')] |
| 22 | + # list = [('PFASST_GRAYSCOTT_stats_hf_NOFAULT_P32.npz','NOFAULT','no fault','green','o')] |
23 | 23 | list = [ ('PFASST_GRAYSCOTT_stats_hf_SPREAD_P32.npz','SPREAD','1-sided','red','s'), |
24 | 24 | ('PFASST_GRAYSCOTT_stats_hf_INTERP_P32.npz','INTERP','2-sided','orange','o'), |
25 | 25 | ('PFASST_GRAYSCOTT_stats_hf_SPREAD_PREDICT_P32.npz','SPREAD_PREDICT','1-sided+corr','blue','^'), |
|
35 | 35 | # minstep = 0 |
36 | 36 | # maxstep = 640 |
37 | 37 |
|
38 | | - # find boundaries |
| 38 | + # find/define boundaries |
39 | 39 | nsteps = 0 |
40 | | - maxiter = 0 |
| 40 | + maxiter = 14 |
| 41 | + vmin = -9 |
| 42 | + vmax = -1 |
| 43 | + |
41 | 44 | for file,strategy,label,color,marker in list: |
42 | 45 |
|
43 | 46 | data = np.load(file) |
44 | 47 |
|
45 | 48 | iter_count = data['iter_count'][minstep:maxstep] |
46 | | - residual = data['residual'][:,minstep:maxstep] |
47 | | - |
48 | | - residual = np.where(residual > 0, np.log10(residual), -99) |
49 | | - vmin = -9 |
50 | | - vmax = int(np.amax(residual)) |
51 | 49 |
|
52 | 50 | maxiter = max(maxiter,int(max(iter_count))) |
53 | 51 | nsteps = max(nsteps,len(iter_count)) |
|
96 | 94 | # generate heatmaps steps vs. iterations with xxx for the faults |
97 | 95 | for file,strategy,label,color,marker in list: |
98 | 96 |
|
| 97 | + residual = np.zeros((maxiter,nsteps)) |
| 98 | + residual[:] = -99 |
| 99 | + |
99 | 100 | data = np.load(file) |
100 | 101 |
|
101 | 102 | iter_count = data['iter_count'][minstep:maxstep] |
102 | | - residual = data['residual'][:,minstep:maxstep] |
| 103 | + input = data['residual'][:,minstep:maxstep] |
103 | 104 | stats = data['hard_stats'] |
104 | 105 |
|
105 | | - residual = np.where(residual > 0, np.log10(residual), -99) |
| 106 | + residual[0:len(input[:,0]),0:len(input[0,:])] = np.where(input > 0, np.log10(input), -99) |
106 | 107 |
|
107 | 108 | fig, ax = plt.subplots(figsize=(20,7)) |
108 | 109 |
|
|
0 commit comments