source: issm/trunk/src/m/plot/plot_transient_results.m@ 17806

Last change on this file since 17806 was 17806, checked in by Mathieu Morlighem, 11 years ago

merged trunk-jpl and trunk for revision 17804

File size: 3.5 KB
Line 
1function plot_transient_results(md,options,width,i)
2%PLOT_TRANSIENT_RESULTS - plot transient results
3%
4% Usage:
5% plot_transient_results(md,options,width,i);
6%
7% See also: PLOTMODEL
8
9fontsize=getfieldvalue(options,'fontsize',14);
10fontweight=getfieldvalue(options,'fontweight','n');
11
12%Prepare window distribution
13%Get screen geometry
14mp = get(0, 'MonitorPositions');
15%Build window sizes
16if size(mp,1)>=2 %several monitors, use the second one
17 bdwidth=mp(2,1)+5; topbdwidth=mp(2,2)+20; W=mp(2,3)/3; H=mp(2,4)/2;
18else %only one monitor
19 bdwidth=5; topbdwidth=20; W=mp(1,3)/3; H=mp(1,4)/2;
20end
21pos1=[bdwidth H+bdwidth W-2*bdwidth H-bdwidth-topbdwidth];
22pos2=pos1+[W 0 0 0]; pos3=pos1+[2*W 0 0 0]; pos4=pos1+[0 -H 0 0]; pos5=pos1+[W -H 0 0]; pos6=pos1+[2*W -H 0 0];
23%Create windows
24figure(1);close;
25figure('Position',pos1); figure('Position',pos2);figure('Position',pos3);figure('Position',pos4);figure('Position',pos5);figure('Position',pos6);
26
27string='plotmodel(md';
28for i=1:length(md.results.transient),
29 string=[string ',''data'',md.results.transient(' num2str(i) ').thickness,''title'',''Thickness at time ' num2str(md.results.transient(i).time) ' a'''];
30end
31string=[string ',''figure'',1,''colorbar#all'',''on'',''fontsize'',' num2str(fontsize) ',''fontweight'',''' fontweight ''');'];
32eval(string);
33clear string;
34
35string='plotmodel(md';
36for i=1:length(md.results.transient),
37 string=[string ',''data'',md.results.transient(' num2str(i) ').vel,''view'',3,''title'',''Velocity at time ' num2str(md.results.transient(i).time) ' a'''];
38end
39string=[string ',''figure'',2,''colorbar#all'',''on'',''fontsize'',' num2str(fontsize) ',''fontweight'',''' fontweight ''');'];
40eval(string);
41clear string;
42
43if dimension(md.mesh)==3,
44 string='plotmodel(md';
45 for i=1:length(md.results.transient),
46 string=[string ',''data'',md.results.transient(' num2str(i) ').temperature,''view'',3,''title'',''Temperature at time ' num2str(md.results.transient(i).time) ' a'''];
47 end
48 string=[string ',''figure'',3,''colorbar#all'',''on'',''view'',3,''fontsize'',' num2str(fontsize) ',''fontweight'',''' fontweight ''');'];
49 eval(string);
50 clear string;
51end
52
53string='plotmodel(md';
54for i=2:length(md.results.transient),
55 string=[string ',''data'',md.results.transient(' num2str(i) ').thickness-md.results.transient(' num2str(i-1) ').thickness,''title'',''Delta thickness at time ' num2str(md.results.transient(i).time) ' a'''];
56end
57string=[string ',''figure'',4,''colorbar#all'',''on'',''fontsize'',' num2str(fontsize) ',''fontweight'',''' fontweight ''');'];
58eval(string);
59clear string;
60
61string='plotmodel(md';
62for i=2:length(md.results.transient),
63 string=[string ',''data'',md.results.transient(' num2str(i) ').vel-md.results.transient(' num2str(i-1) ').vel,''view'',3,''title'',''Delta velocity at time ' num2str(md.results.transient(i).time) ' a'''];
64end
65string=[string ',''figure'',5,''colorbar#all'',''on'',''fontsize'',' num2str(fontsize) ',''fontweight'',''' fontweight ''');'];
66eval(string);
67clear string;
68
69if dimension(md.mesh)==3,
70 string='plotmodel(md';
71 for i=2:length(md.results.transient),
72 string=[string ',''data'',md.results.transient(' num2str(i) ').temperature-md.results.transient(' num2str(i-1) ').temperature,''view'',3,''title'',''Delta temperature at time ' num2str(md.results.transient(i).time) ' a'''];
73 end
74 string=[string ',''figure'',6,''colorbar#all'',''on'',''fontsize'',' num2str(fontsize) ',''fontweight'',''' fontweight ''');'];
75 eval(string);
76 clear string;
77end
Note: See TracBrowser for help on using the repository browser.