Changeset 11339


Ignore:
Timestamp:
02/07/12 07:49:15 (13 years ago)
Author:
Mathieu Morlighem
Message:

removed all PatchToVec, not needed anymore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/model/tres.m

    r9762 r11339  
    1010if strcmpi(string,'diagnostic'),
    1111        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;
    2214        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;
    3018        end
    31         md.initialization.vel=PatchToVec(md.results.DiagnosticSolution.Vel);
     19        md.initialization.vel=md.results.DiagnosticSolution.Vel;
    3220
    3321        if isfield(md.results.DiagnosticSolution,'Pressure'),
    34                 md.initialization.pressure=PatchToVec(md.results.DiagnosticSolution.Pressure);
     22                md.initialization.pressure=md.results.DiagnosticSolution.Pressure;
    3523        end
    3624        if md.rifts.numrifts,
     
    4230                for control_parameters=md.inversion.control_parameters
    4331                        %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));
    4533                end
    4634        end
     
    5947        for i=1:length(results),
    6048                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;
    6755                        results2(count).time=md.results.TransientSolution(i).time;
    6856                        results2(count).step=md.results.TransientSolution(i).step;
     
    7664        clear results,results2;
    7765elseif 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;
    8068        if isfield(md.results.SteadystateSolution,'Vz'),
    81                 md.initialization.vz=PatchToVec(md.results.SteadystateSolution.Vz);
     69                md.initialization.vz=md.results.SteadystateSolution.Vz;
    8270        end
    8371
    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;
    8876
    8977        if md.inversion.iscontrol==1,
    9078                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));
    9280                end
    9381        end
    9482
    9583elseif 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;
    9886elseif strcmpi(string,'hydrology'),
    99         md.initialization.watercolumn=PatchToVec(md.results.HydrologySolution.Watercolumn);
     87        md.initialization.watercolumn=md.results.HydrologySolution.Watercolumn;
    10088
    10189else
Note: See TracChangeset for help on using the changeset viewer.