Changeset 22051
- Timestamp:
- 09/06/17 05:04:06 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/frictioncoulomb.m
r21049 r22051 10 10 q = NaN; 11 11 coefficientcoulomb = NaN; 12 coupling = 0; 13 effective_pressure = NaN; 12 14 end 13 15 methods … … 17 19 self.p=project3d(md,'vector',self.p,'type','element'); 18 20 self.q=project3d(md,'vector',self.q,'type','element'); 21 switch self.coupling 22 case 0 23 case 1 24 self.effective_pressure=project3d(md,'vector',self.effective_pressure,'type','node','layer',1); 25 case 2 26 error('not implemented yet'); 27 otherwise 28 error('not supported yet'); 29 end 19 30 end % }}} 20 31 function self = frictioncoulomb(varargin) % {{{ … … 37 48 md = checkfield(md,'fieldname','friction.q','NaN',1,'Inf',1,'size',[md.mesh.numberofelements 1]); 38 49 md = checkfield(md,'fieldname','friction.p','NaN',1,'Inf',1,'size',[md.mesh.numberofelements 1]); 50 md = checkfield(md,'fieldname','friction.coupling','numel',[1],'values',[0 1 2]); 51 switch self.coupling 52 case 0 53 case 1 54 md = checkfield(md,'fieldname','friction.effective_pressure','NaN',1,'Inf',1,'timeseries',1); 55 case 2 56 error('not implemented yet'); 57 otherwise 58 error('not supported yet'); 59 end 39 60 end % }}} 40 61 function disp(self) % {{{ … … 44 65 fielddisplay(self,'p','p exponent'); 45 66 fielddisplay(self,'q','q exponent'); 67 fielddisplay(self,'effective_pressure','Effective Pressure for the forcing if not coupled [Pa]'); 68 fielddisplay(self,'coupling','Coupling flag: 0 for default, 1 for forcing(provide md.friction.effective_pressure) and 2 for coupled(not implemented yet)'); 46 69 end % }}} 47 70 function marshall(self,prefix,md,fid) % {{{ … … 52 75 WriteData(fid,prefix,'object',self,'fieldname','p','format','DoubleMat','mattype',2); 53 76 WriteData(fid,prefix,'object',self,'fieldname','q','format','DoubleMat','mattype',2); 77 WriteData(fid,prefix,'class','friction','object',self,'fieldname','coupling','format','Integer'); 78 switch self.coupling 79 case 0 80 case 1 81 WriteData(fid,prefix,'class','friction','object',self,'fieldname','effective_pressure','format','DoubleMat','mattype',1,'timeserieslength',md.mesh.numberofvertices+1,'yts',md.constants.yts); 82 case 2 83 error('not implemented yet'); 84 otherwise 85 error('not supported yet'); 86 end 54 87 55 88 end % }}}
Note:
See TracChangeset
for help on using the changeset viewer.