-
Notifications
You must be signed in to change notification settings - Fork 0
/
PlotPartitionBestNoPer.m
59 lines (50 loc) · 1.14 KB
/
PlotPartitionBestNoPer.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
function[U,Phi] = PlotPartition(k)
Phi_filename=strcat('Partition_Phi_Best-000.txt');
tmp=load(Phi_filename);
[nx,ny]=size(tmp);
U=zeros(nx,ny,k);
Phi=zeros(nx,ny,k);
for i=1:k,
U_filename=strcat('Partition_U_Best-', num2str(i-1, '%.3d'),'.txt');
Phi_filename=strcat('Partition_Phi_Best-', num2str(i-1, '%.3d'),'.txt');
U(:,:,i) = load(U_filename);
Phi(:,:,i) = load(Phi_filename);
end
U_all = zeros(nx,ny);
Phi_all = zeros(nx, ny);
for i=1:k,
U_all = U_all + U(:,:,i);
Phi_all = Phi_all + i * Phi(:,:,i);
end
linecolor = 0.55*ones(1,3);
%----------------------------------------------------------
% les U
try
close(1);
end
figure(1);
hold off;
n = nx;
x = linspace(-1,2,n);
y = linspace(-1,2,n);
[X,Y] = meshgrid(x,y);
hold on;
surf(X,Y,U_all/max(abs(U_all(:))));
title('U');
axis equal;axis off
shading interp;
colorbar;
%----------------------------------------------------------
% Les Phi
try
close(2);
end
figure(2)
surf(X,Y,Phi_all/max(abs(Phi_all(:))))
view(2)
hold on
title('Phi');
axis equal;axis off
shading interp;
colorbar;
daspect([ 1 1 1]);