Changeset 672


Ignore:
Timestamp:
06/01/09 13:47:11 (15 years ago)
Author:
Mathieu Morlighem
Message:

load results in md.solution

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

Legend:

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

    r473 r672  
    3434
    3535%erase the log and output files
    36 system(['rm -rf ' md.name '.outlog ' md.name '.errlog' md.name '.outbin']);
     36system(['rm -rf ' md.name '.outlog ' md.name '.errlog ' md.name '.outbin ' md.name '.lock ']);
     37%erase input files
     38system(['rm -rf ' md.name '.bin ' md.name '.queue ']);
  • issm/trunk/src/m/classes/public/loadresultsfromdisk.m

    r643 r672  
    55%      md=loadresultsfromdisk(md,filename);
    66
    7 %We convert all results to m/a units, from m/s
    8 
     7%check number of inputs/outputs
    98if ((nargin~=2) | (nargout~=1)),
    109        help loadresultsfromdisk;
     
    1211end
    1312
    14 
    15 md.results=parseresultsfromdisk(filename);
     13%load result onto model
     14if isnan(md.results)
     15        md.results=struct();
     16end
     17eval(['md.results.' md.analysis_type '=parseresultsfromdisk(filename);']);
    1618
    1719%Check result is consistent
    1820disp(sprintf('%s\n','checking result consistency'));
    19 
    2021if ~isresultconsistent(md),
    21         disp('!! results not consistent correct the model !!') %it would be very cruel to put an error, it would kill the computed results (even if not consistent...)
     22        %it would be very cruel to put an error, it would kill the computed results (even if not consistent...)
     23        disp('!! results not consistent correct the model !!')
    2224end
  • issm/trunk/src/m/classes/public/parseresultsfromdisk.m

    r643 r672  
    1414
    1515%Read fields until the end of the file.
    16 while 0<1,
     16result=ReadData(fid);
     17while ~isempty(result),
    1718
     19        eval(['results(' num2str(result.step) ').' result.fieldname '=result.field;']);
     20        eval(['results(' num2str(result.step) ').time=result.time;']);
     21        eval(['results(' num2str(result.step) ').step=result.step;']);
    1822        result=ReadData(fid);
    19         if isempty(result),
    20                 break;
    21         else
    22                 eval(['results(' num2str(result.step) ').' result.fieldname '=result.field;']);
    23                 eval(['results(' num2str(result.step) ').time=result.time;']);
    24                 eval(['results(' num2str(result.step) ').step=result.step;']);
    25         end
     23
    2624end
  • issm/trunk/src/m/classes/public/solveparallel.m

    r465 r672  
    2626        %load results
    2727        md=loadresultsfromcluster(md);
    28 else
    29         return;
    3028end
Note: See TracChangeset for help on using the changeset viewer.