source: issm/branches/trunk-larour-NatGeoScience2016/src/m/plot/plot_BC.m@ 21759

Last change on this file since 21759 was 21759, checked in by Eric.Larour, 8 years ago

CHG: merged branch back to trunk-jpl 21754.

File size: 1.4 KB
Line 
1function plot_BC(md,options,width,i,data)
2
3%plot neuman
4h0 = plot_icefront(md,options,width,i,data);
5
6hold on
7
8[x y z elements is2d isplanet]=processmesh(md,[],options);
9spcvx=processdata(md,md.stressbalance.spcvx,options);
10spcvy=processdata(md,md.stressbalance.spcvy,options);
11spcvz=processdata(md,md.stressbalance.spcvz,options);
12nbv = numel(x);
13
14%plot dirichlets
15dirichleton=getfieldvalue(options,'dirichlet','on');
16if strcmpi(dirichleton,'on'),
17 h1=plot3(...
18 x(find(~isnan(spcvx(1:nbv,1)))),...
19 y(find(~isnan(spcvx(1:nbv,1)))),...
20 z(find(~isnan(spcvx(1:nbv,1)))),...
21 'ro','MarkerSize',14,'MarkerFaceColor','r');
22 h2=plot3(...
23 x(find(~isnan(spcvy(1:nbv,1)))),...
24 y(find(~isnan(spcvy(1:nbv,1)))),...
25 z(find(~isnan(spcvy(1:nbv,1)))),...
26 'bo','MarkerSize',10,'MarkerFaceColor','b');
27 h3=plot3(...
28 x(find(~isnan(spcvz(1:nbv,1)))),...
29 y(find(~isnan(spcvz(1:nbv,1)))),...
30 z(find(~isnan(spcvz(1:nbv,1)))),...
31 'yo','MarkerSize',6 ,'MarkerFaceColor','y');
32end
33
34strings = {'Neumann'};
35if ~isempty(h1), strings{end+1} = 'vx Dirichlet'; end
36if ~isempty(h2), strings{end+1} = 'vy Dirichlet'; end
37if ~isempty(h3), strings{end+1} = 'vz Dirichlet'; end
38
39legend([h0,h1,h2,h3],strings,'location','NorthEast');
40
41hold off
42
43%apply options
44options=addfielddefault(options,'title','Boundary conditions');
45options=addfielddefault(options,'colorbar',0);
46applyoptions(md,[],options);
Note: See TracBrowser for help on using the repository browser.