Changeset 11339
- Timestamp:
- 02/07/12 07:49:15 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/model/tres.m
r9762 r11339 10 10 if strcmpi(string,'diagnostic'), 11 11 if md.mesh.dimension==2, 12 if isfield(md.results.DiagnosticSolution,'VxAverage'), 13 md.initialization.vx=PatchToVec(md.results.DiagnosticSolution.VxAverage); 14 else 15 md.initialization.vx=PatchToVec(md.results.DiagnosticSolution.Vx); 16 end 17 if isfield(md.results.DiagnosticSolution,'VyAverage'), 18 md.initialization.vy=PatchToVec(md.results.DiagnosticSolution.VyAverage); 19 else 20 md.initialization.vy=PatchToVec(md.results.DiagnosticSolution.Vy); 21 end 12 md.initialization.vx=md.results.DiagnosticSolution.Vx; 13 md.initialization.vy=md.results.DiagnosticSolution.Vy; 22 14 else 23 md.initialization.vx=PatchToVec(md.results.DiagnosticSolution.Vx); 24 md.initialization.vy=PatchToVec(md.results.DiagnosticSolution.Vy); 25 if isfield(md.results.DiagnosticSolution,'Vz'), 26 md.initialization.vz=PatchToVec(md.results.DiagnosticSolution.Vz); 27 else 28 md.initialization.vz=zeros(md.mesh.numberofvertices,1); 29 end 15 md.initialization.vx=md.results.DiagnosticSolution.Vx; 16 md.initialization.vy=md.results.DiagnosticSolution.Vy; 17 md.initialization.vz=md.results.DiagnosticSolution.Vz; 30 18 end 31 md.initialization.vel= PatchToVec(md.results.DiagnosticSolution.Vel);19 md.initialization.vel=md.results.DiagnosticSolution.Vel; 32 20 33 21 if isfield(md.results.DiagnosticSolution,'Pressure'), 34 md.initialization.pressure= PatchToVec(md.results.DiagnosticSolution.Pressure);22 md.initialization.pressure=md.results.DiagnosticSolution.Pressure; 35 23 end 36 24 if md.rifts.numrifts, … … 42 30 for control_parameters=md.inversion.control_parameters 43 31 %Will need to be updated... good luck ;) 44 md.(EnumToModelField(control_parameters))= PatchToVec(md.results.DiagnosticSolution.(EnumToString(control_parameters)));32 md.(EnumToModelField(control_parameters))=md.results.DiagnosticSolution.(EnumToString(control_parameters)); 45 33 end 46 34 end … … 59 47 for i=1:length(results), 60 48 if ~isempty(md.results.TransientSolution(i).Vel), 61 results2(count).Vel= PatchToVec(md.results.TransientSolution(i).Vel);62 results2(count).Surface= PatchToVec(md.results.TransientSolution(i).Surface);63 results2(count).Thickness= PatchToVec(md.results.TransientSolution(i).Thickness);64 results2(count).Bed= PatchToVec(md.results.TransientSolution(i).Bed);65 results2(count).Vx= PatchToVec(md.results.TransientSolution(i).Vx);66 results2(count).Vy= PatchToVec(md.results.TransientSolution(i).Vy);49 results2(count).Vel=md.results.TransientSolution(i).Vel; 50 results2(count).Surface=md.results.TransientSolution(i).Surface; 51 results2(count).Thickness=md.results.TransientSolution(i).Thickness; 52 results2(count).Bed=md.results.TransientSolution(i).Bed; 53 results2(count).Vx=md.results.TransientSolution(i).Vx; 54 results2(count).Vy=md.results.TransientSolution(i).Vy; 67 55 results2(count).time=md.results.TransientSolution(i).time; 68 56 results2(count).step=md.results.TransientSolution(i).step; … … 76 64 clear results,results2; 77 65 elseif strcmpi(string,'steadystate'), 78 md.initialization.vx= PatchToVec(md.results.SteadystateSolution.Vx);79 md.initialization.vy= PatchToVec(md.results.SteadystateSolution.Vy);66 md.initialization.vx=md.results.SteadystateSolution.Vx; 67 md.initialization.vy=md.results.SteadystateSolution.Vy; 80 68 if isfield(md.results.SteadystateSolution,'Vz'), 81 md.initialization.vz= PatchToVec(md.results.SteadystateSolution.Vz);69 md.initialization.vz=md.results.SteadystateSolution.Vz; 82 70 end 83 71 84 md.initialization.vel= PatchToVec(md.results.SteadystateSolution.Vel);85 md.initialization.pressure= PatchToVec(md.results.SteadystateSolution.Pressure);86 md.initialization.temperature= PatchToVec(md.results.SteadystateSolution.Temperature);87 md.basalforcings.melting_rate= PatchToVec(md.results.SteadystateSolution.BasalforcingsMeltingRate);72 md.initialization.vel=md.results.SteadystateSolution.Vel; 73 md.initialization.pressure=md.results.SteadystateSolution.Pressure; 74 md.initialization.temperature=md.results.SteadystateSolution.Temperature; 75 md.basalforcings.melting_rate=md.results.SteadystateSolution.BasalforcingsMeltingRate; 88 76 89 77 if md.inversion.iscontrol==1, 90 78 for control_parameters=md.inversion.control_parameters 91 md.(EnumToModelField(control_parameters))= PatchToVec(md.results.SteadystateSolution.(EnumToString(control_parameters)));79 md.(EnumToModelField(control_parameters))=md.results.SteadystateSolution.(EnumToString(control_parameters)); 92 80 end 93 81 end 94 82 95 83 elseif strcmpi(string,'thermal'), 96 md.initialization.temperature= PatchToVec(md.results.ThermalSolution.Temperature);97 md.basalforcings.melting_rate= PatchToVec(md.results.ThermalSolution.BasalMeltingRate);84 md.initialization.temperature=md.results.ThermalSolution.Temperature; 85 md.basalforcings.melting_rate=md.results.ThermalSolution.BasalMeltingRate; 98 86 elseif strcmpi(string,'hydrology'), 99 md.initialization.watercolumn= PatchToVec(md.results.HydrologySolution.Watercolumn);87 md.initialization.watercolumn=md.results.HydrologySolution.Watercolumn; 100 88 101 89 else
Note:
See TracChangeset
for help on using the changeset viewer.