| 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 | spcvx=processdata(md,md.stressbalance.spcvx,options);
|
|---|
| 10 | spcvy=processdata(md,md.stressbalance.spcvy,options);
|
|---|
| 11 | spcvz=processdata(md,md.stressbalance.spcvz,options);
|
|---|
| 12 | nbv = numel(x);
|
|---|
| 13 |
|
|---|
| 14 | %plot dirichlets
|
|---|
| 15 | dirichleton=getfieldvalue(options,'dirichlet','on');
|
|---|
| 16 | if 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');
|
|---|
| 32 | end
|
|---|
| 33 |
|
|---|
| 34 | strings = {'Neumann'};
|
|---|
| 35 | if ~isempty(h1), strings{end+1} = 'vx Dirichlet'; end
|
|---|
| 36 | if ~isempty(h2), strings{end+1} = 'vy Dirichlet'; end
|
|---|
| 37 | if ~isempty(h3), strings{end+1} = 'vz Dirichlet'; end
|
|---|
| 38 |
|
|---|
| 39 | legend([h0,h1,h2,h3],strings,'location','NorthEast');
|
|---|
| 40 |
|
|---|
| 41 | hold off
|
|---|
| 42 |
|
|---|
| 43 | %apply options
|
|---|
| 44 | options=addfielddefault(options,'title','Boundary conditions');
|
|---|
| 45 | options=addfielddefault(options,'colorbar',0);
|
|---|
| 46 | applyoptions(md,[],options);
|
|---|