Changeset 5299


Ignore:
Timestamp:
08/17/10 07:46:47 (15 years ago)
Author:
Eric.Larour
Message:

tres not working when 2d control method return VxAverage -> fixed.
waitonlock now more robust when waiting for status through an ssh tunnel.

Location:
issm/trunk/src/m/classes/public
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/public/tres.m

    r5190 r5299  
    99
    1010if strcmpi(string,'diagnostic'),
    11         md.vx=PatchToVec(md.results.DiagnosticSolution.Vx);
    12         md.vy=PatchToVec(md.results.DiagnosticSolution.Vy);
    13         if isfield(md.results.DiagnosticSolution,'Vz'),
    14                 md.vz=PatchToVec(md.results.DiagnosticSolution.Vz);
    15         else
    16                 md.vz=zeros(md.numberofgrids,1);
     11        if md.dim==2,
     12                if isfield(md.results.DiagnosticSolution,'VxAverage'),
     13                        md.vx=PatchToVec(md.results.DiagnosticSolution.VxAverage);
     14                else
     15                        md.vx=PatchToVec(md.results.DiagnosticSolution.Vx);
     16                end
     17                if isfield(md.results.DiagnosticSolution,'VyAverage'),
     18                        md.vy=PatchToVec(md.results.DiagnosticSolution.VyAverage);
     19                else
     20                        md.vy=PatchToVec(md.results.DiagnosticSolution.Vy);
     21                end
     22        else
     23                md.vx=PatchToVec(md.results.DiagnosticSolution.Vx);
     24                md.vy=PatchToVec(md.results.DiagnosticSolution.Vy);
     25                if isfield(md.results.DiagnosticSolution,'Vz'),
     26                        md.vz=PatchToVec(md.results.DiagnosticSolution.Vz);
     27                else
     28                        md.vz=zeros(md.numberofgrids,1);
     29                end
     30                md.vel=PatchToVec(md.results.DiagnosticSolution.Vel);
    1731        end
    18         md.vel=PatchToVec(md.results.DiagnosticSolution.Vel);
     32
    1933        if isfield(md.results.DiagnosticSolution,'Pressure'),
    2034                md.pressure=PatchToVec(md.results.DiagnosticSolution.Pressure);
     
    2640        end
    2741        if md.control_analysis==1,
    28                 md.(md.control_type)=PatchToVec(md.results.DiagnosticSolution.(md.results.DiagnosticSolution.ControlType))
     42                md.(md.control_type)=PatchToVec(md.results.DiagnosticSolution.(md.results.DiagnosticSolution.ControlType));
    2943        end
    3044elseif strcmpi(string,'dakota'),
  • issm/trunk/src/m/classes/public/waitonlock.m

    r5264 r5299  
    2323                while (ispresent==0 & time<timelimit)
    2424                        [status, result]=system(['ssh -q -p ' num2str(port) ' ' login '@localhost "if ( -e ' executionpath '/' md.name '.lock ) echo 1"']);
    25                         ispresent=~isempty(result);
     25                        if ~isempty(result),
     26                                if ismember('1',result),
     27                                        ispresent=1;
     28                                else
     29                                        ispresent=0;
     30                                end
     31                        else
     32                                ispresent=0;
     33                        end
    2634                        pause(10); %tunnel can be unstable, let's not use it too much
    2735                        time=time+1/60;
Note: See TracChangeset for help on using the changeset viewer.