Changeset 20322
- Timestamp:
- 03/18/16 09:04:47 (9 years ago)
- Location:
- issm/trunk-jpl/src/m/classes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/model.m
r20059 r20322 513 513 514 514 %recreate segments 515 if isa(md1.mesh,'mesh2d') ,515 if isa(md1.mesh,'mesh2d') | isa(md1.mesh','mesh3dsurface'), 516 516 md2.mesh.vertexconnectivity=NodeConnectivity(md2.mesh.elements,md2.mesh.numberofvertices); 517 517 md2.mesh.elementconnectivity=ElementConnectivity(md2.mesh.elements,md2.mesh.vertexconnectivity); -
issm/trunk-jpl/src/m/classes/slr.m
r20281 r20322 56 56 57 57 if ~ismember(SealevelriseAnalysisEnum(),analyses), return; end 58 md = checkfield(md,'fieldname','slr.deltathickness','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices 1]); 58 md = checkfield(md,'fieldname','slr.deltathickness','NaN',1,'Inf',1,'size',[md.mesh.numberofelements 1]); 59 %md = checkfield(md,'fieldname','slr.deltathickness','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices 1]); 59 60 md = checkfield(md,'fieldname','slr.sealevel','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices 1]); 60 61 md = checkfield(md,'fieldname','slr.love_h','NaN',1,'Inf',1); … … 69 70 if (size(self.love_h,1) ~= size(self.love_k,1)), 70 71 error('slr error message: love numbers should be provided at the same level of accuracy'); 72 end 73 74 %cross check that whereever we have an ice load, the mask is <0 on each vertex: 75 pos=find(self.deltathickness); 76 maskpos=md.mask.ice_levelset(md.mesh.elements(pos,:)); 77 [els,vertices]=find(maskpos>0); 78 if length(els), 79 error('slr checkconsistency fail: there are elements with ice loads where some vertices are not on the ice!'); 71 80 end 72 81 … … 94 103 end % }}} 95 104 function marshall(self,md,fid) % {{{ 96 WriteData(fid,'object',self,'class','sealevelrise','fieldname','deltathickness','format','DoubleMat','mattype',1); 105 WriteData(fid,'object',self,'class','sealevelrise','fieldname','deltathickness','format','DoubleMat','mattype',2); 106 %WriteData(fid,'object',self,'class','sealevelrise','fieldname','deltathickness','format','DoubleMat','mattype',1); 97 107 WriteData(fid,'data',self.sealevel,'mattype',1,'format','DoubleMat','enum',SealevelEnum(),'timeserieslength',md.mesh.numberofvertices+1); 98 108 WriteData(fid,'object',self,'class','sealevelrise','fieldname','reltol','format','Double');
Note:
See TracChangeset
for help on using the changeset viewer.