Changeset 20500 for issm/trunk/src/m/classes/friction.m
- Timestamp:
- 04/12/16 21:32:01 (9 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:ignore
-
old new 1 build-js 2 build-esmf 3 build-gcm 1 4 build-fw 2 5 build-ad
-
- Property svn:mergeinfo changed
/issm/trunk-jpl merged: 19104,19106-19126,19128-19134,19136-19170,19172-19299,19302,19306-19405,19407-19604,19606-19668,19670-20496
- Property svn:ignore
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/m/classes/friction.m
r19105 r20500 11 11 end 12 12 methods 13 function createxml(self,fid) % {{{14 fprintf(fid, '\n\n');15 fprintf(fid, '%s\n', '<!-- Friction: Sigma= drag^2 * Neff ^r * u ^s, with Neff=rho_ice*g*thickness+rho_water*g*bed, r=q/p and s=1/p -->');16 fprintf(fid,'%s\n%s\n%s\n','<frame key="1" label="Friction: Sigma= drag^2 * Neff ^r * u ^s, with Neff=rho_ice*g*thickness+rho_water*g*bed, r=q/p and s=1/p">','<section name="friction" />');17 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="coefficient" type="', class(self.coefficient),'" default="', convert2str(self.coefficient),'">', ' <section name="friction" />',' <help> friction coefficient [SI] </help>','</parameter>');18 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n', '<parameter key ="p" type="', class(self.p),'" default="', convert2str(self.p),'">', ' <section name="friction" />',' <help> p exponent </help>','</parameter>');19 fprintf(fid,'%s%s%s%s%s\n%s\n%s\n', '<parameter key ="q" type="', class(self.q),'" default="', convert2str(self.q),'">', ' <section name="friction" />',' <help> q exponent </help>','</parameter>');20 fprintf(fid,'%s\n%s\n','</frame>');21 end % }}}22 13 function self = extrude(self,md) % {{{ 23 14 self.coefficient=project3d(md,'vector',self.coefficient,'type','node','layer',1); … … 40 31 %Early return 41 32 if ~ismember(StressbalanceAnalysisEnum(),analyses) & ~ismember(ThermalAnalysisEnum(),analyses), return; end 42 md = checkfield(md,'fieldname','friction.coefficient','timeseries',1,'NaN',1); 43 md = checkfield(md,'fieldname','friction.q','NaN',1,'size',[md.mesh.numberofelements 1]); 44 md = checkfield(md,'fieldname','friction.p','NaN',1,'size',[md.mesh.numberofelements 1]); 33 if (solution==TransientSolutionEnum() & md.transient.isstressbalance ==0 & md.transient.isthermal == 0), return; end 34 35 md = checkfield(md,'fieldname','friction.coefficient','timeseries',1,'NaN',1,'Inf',1); 36 md = checkfield(md,'fieldname','friction.q','NaN',1,'Inf',1,'size',[md.mesh.numberofelements 1]); 37 md = checkfield(md,'fieldname','friction.p','NaN',1,'Inf',1,'size',[md.mesh.numberofelements 1]); 45 38 end % }}} 46 39 function disp(self) % {{{ … … 61 54 62 55 end % }}} 56 function savemodeljs(self,fid,modelname) % {{{ 57 58 writejs1Darray(fid,[modelname '.friction.coefficient'],self.coefficient); 59 writejs1Darray(fid,[modelname '.friction.p'],self.p); 60 writejs1Darray(fid,[modelname '.friction.q'],self.q); 61 62 end % }}} 63 63 end 64 64 end
Note:
See TracChangeset
for help on using the changeset viewer.