Changeset 4962 for issm/trunk/src/m/utils/BC/SetIceShelfBC.m
- Timestamp:
- 08/04/10 08:42:15 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/utils/BC/SetIceShelfBC.m
r3994 r4962 1 function md=SetIceShelfBC(md, icefrontfile)1 function md=SetIceShelfBC(md,varargin) 2 2 %SETICESHELFBC - Create the boundary conditions for diagnostic and thermal models for a Ice Shelf with Ice Front 3 3 % … … 7 7 % 8 8 % Usage: 9 % md=SetIceShelfBC(md, icefrontfile)9 % md=SetIceShelfBC(md,varargin) 10 10 % 11 11 % Example: 12 % md=SetIceShelfBC(md); 12 13 % md=SetIceShelfBC(md,'Front.exp'); 13 14 % … … 15 16 16 17 %grid on Dirichlet (boundary and ~icefront) 17 if ~exist(icefrontfile) 18 error(['SetIceShelfBC error message: ice front file ' icefrontfile ' not found']); 18 if nargin==2, 19 icefrontfile=varargin{1}; 20 if ~exist(icefrontfile), error(['SetIceShelfBC error message: ice front file ' icefrontfile ' not found']); end 21 gridinsideicefront=ContourToMesh(md.elements,md.x,md.y,expread(icefrontfile,1),'node',2); 22 gridonicefront=double(md.gridonboundary & gridinsideicefront); 23 elseif nargin==1, 24 gridonicefront=zeros(md.numberofgrids,1); 25 else 26 help SetIceShelfBC 27 error('bad usage'); 19 28 end 20 gridinsideicefront=ContourToMesh(md.elements,md.x,md.y,expread(icefrontfile,1),'node',2);21 gridonicefront=double(md.gridonboundary & gridinsideicefront);22 29 pos=find(md.gridonboundary & ~gridonicefront); 23 30 md.spcvelocity=zeros(md.numberofgrids,6);
Note:
See TracChangeset
for help on using the changeset viewer.