Changeset 22230
- Timestamp:
- 11/03/17 19:37:33 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/branches/trunk-larour-NatGeoScience2016/src/m/classes/sealevelmodel.m
r22157 r22230 18 18 settings = 0; 19 19 private = 0; 20 range = 0; 20 range = 0; 21 mergedcaps = 0; 21 22 %}}} 22 23 end … … 96 97 disp(sprintf('%19s: %-22s -- %s','range' ,['[1x1 ' class(self.range) ']'],'ranges')); 97 98 end % }}} 99 function self=mergeresults(self) % {{{ 100 champs=fields(self.icecaps{1}.results.TransientSolution); 101 for i=1:length(self.mergedcaps)/2, 102 md=self.mergedcaps{2*(i-1)+1}; trans=self.mergedcaps{2*(i-1)+2}; 103 icecaps=self.icecaps(self.range{2*(i-1)+2}); 104 for j=1:length(self.icecaps{1}.results.TransientSolution), 105 for k=1:length(champs), 106 if strcmpi(class(icecaps{1}.results.TransientSolution(j).(champs{k})),'double'), 107 %vertex or element? 108 if length(icecaps{1}.results.TransientSolution(j).(champs{k}))==icecaps{1}.mesh.numberofvertices, 109 md.results.TransientSolution(j).(champs{k})=zeros(md.mesh.numberofvertices,1); 110 else 111 continue; 112 end 113 elseif strcmpi(class(icecaps{1}.results.TransientSolution(j).(champs{k})),'char'), 114 switch champs{k}, 115 case 'IceVolume' 116 error('IceVolume mergeresults not implemented yet!'); 117 otherwise continue; 118 end 119 else 120 continue; 121 end 122 for l=1:length(trans), 123 resultcap=icecaps{l}.results.TransientSolution(j).(champs{k}); 124 md.results.TransientSolution(j).(champs{k})(trans{l})=resultcap; 125 end 126 end 127 end 128 self.mergedcaps{2*(i-1)+1}=md; 129 end 130 end % }}} 98 131 end 99 132 end
Note:
See TracChangeset
for help on using the changeset viewer.