-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfigures.m
80 lines (72 loc) · 1.98 KB
/
figures.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
% Figure 4
data = csvread('data/figure4.csv');
x=reshape(data(:,1),sqrt(size(data,1)),'');
y=reshape(data(:,2),sqrt(size(data,1)),'');
z=reshape(data(:,3),sqrt(size(data,1)),'');
figure;
mesh (x, y, z);
title('Figure 4');
xlabel ('x (m)');
ylabel ('y (m)');
zlabel ('E_z (V/m)');
% Figure 5a
data = csvread('data/figure5a.csv');
x=reshape(data(:,1),sqrt(size(data,1)),'');
y=reshape(data(:,2),sqrt(size(data,1)),'');
z=reshape(data(:,3),sqrt(size(data,1)),'');
figure;
mesh (x, y, z);
title('Figure 5a');
xlabel ('n_x (m)');
ylabel ('n_t (m)');
zlabel ('SMVPs');
zlim([0 5000]);
% Figure 5a
data = csvread('data/figure5b.csv');
x=reshape(data(:,1),sqrt(size(data,1)),'');
y=reshape(data(:,2),sqrt(size(data,1)),'');
z=reshape(data(:,5),sqrt(size(data,1)),'');
figure;
mesh (x, y, z);
title('Figure 5b');
xlabel ('n_x (m)');
ylabel ('n_t (m)');
zlabel ('SMVPs');
zlim([0 5000]);
% Figure 6
data = csvread('data/figure6.csv',2);
figure;
plot(data(:,1),data(:,2),data(:,1),data(:,3));
title('Figure 6');
legend('Ratio of computational costs')
xlabel ('k');
ylabel ('R');
% Figure 7
data = csvread('data/figure7.csv',2);
figure;
semilogy(data(:,1),data(:,4),data(:,1),data(:,2));
title('Figure 7');
legend('Leapfrog (\Delta t_{CFL})','ParaExp (\Delta t_{CFL})')
xlabel ('time (s)');
ylabel ('Energy (J)');
% Figure 8
data = csvread('data/figure8.csv',2);
figure;
semilogy(data(:,1),data(:,2),data(:,1),data(:,3),data(:,1),data(:,4),data(:,1),data(:,5));
title('Figure 8');
legend('Leapfrog (reference)','Leapfrog (\Delta t_{CFL})','ParaExp (\Delta t_{CFL})','ParaExp (\Delta t_{CFL}/5)')
xlabel ('frequency (Hz)');
ylabel ('E (V/m)');
% Figure 9
data = csvread('data/figure9.csv',2);
figure;
plot(data(:,1),data(:,2),data(:,1),data(:,3),data(:,1),data(:,4));
title('Figure 9');
legend('Leapfrog (reference)','Leapfrog (\Delta t_{CFL})','ParaExp (\Delta t_{CFL}/5)')
xlabel ('time (s)');
ylabel ('E (V/m)');
% Figure 11
figure;
barh(categorical({'ParaExp','Leapfrog'}),[21654,34864]);
title('Figure 11');
xlim([0 40000]);