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