Changeset 3564


Ignore:
Timestamp:
04/16/10 15:51:59 (15 years ago)
Author:
jschierm
Message:

QMU with Dakota: small bug fixes.

Location:
issm/trunk/src/m/solutions/dakota
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/solutions/dakota/dakota_in_data.m

    r2161 r3564  
    133133
    134134%Write in file
    135 dakota_in_write(dmeth.method,dmeth,dvar,dresp,params,filei,varargin{:});
     135dakota_in_write(dmeth,dvar,dresp,params,filei,varargin{:});
    136136
    137137end
  • issm/trunk/src/m/solutions/dakota/dakota_out_parse.m

    r3092 r3564  
    6666fline=fgetl(fidi);
    6767if ~ischar(fline)
    68     ieof=1;
    6968    error('File ''%s'' is empty.',filei);
    7069end
     
    366365display('Reading CDF''s for response functions:');
    367366
    368 while ~isempty(fline)
     367while ischar(fline) && ~isempty(fline)
    369368    fline=fgetl(fidi);
    370369    if ~ischar(fline)
     
    374373%  process header line of cdf
    375374
    376     while ~isempty(fline)
     375    while ischar(fline) && ~isempty(fline)
    377376        [ntokens,tokens]=fltokens(fline);
    378377
     
    401400        fline=fgetl(fidi);
    402401        icdf=0;
    403         while ~isempty(fline) && ...
     402        while ischar(fline) && ~isempty(fline) && ...
    404403              ~strncmpi(fline,'Cumulative Distribution Function',32)
    405404            [ntokens,tokens]=fltokens(fline);
     
    493492end
    494493
    495 ieof=0;
    496494display('Reading MV statistics for response functions:');
    497495ndresp=0;
    498496
    499 while ~ieof && ~isempty(fline) && ...
     497while ischar(fline) && ~isempty(fline) && ...
    500498        strncmpi(fline,'MV Statistics for ',18)
    501499
     
    517515    fline=fgetl(fidi);
    518516    if ~ischar(fline)
    519         ieof=1;
    520517        break;
    521518    end
    522519
    523     while ~ieof && ~isempty(fline) && ...
     520    while ischar(fline) && ~isempty(fline) && ...
    524521            strncmpi(fline,'  Importance Factor for variable ',33)
    525522        [ntokens,tokens]=fltokens(fline);
     
    529526
    530527        fline=fgetl(fidi);
    531         if ~ischar(fline)
    532             ieof=1;
    533             break;
    534         end
    535528    end
    536529
     
    541534        dresp(end).var   ={};
    542535        dresp(end).impfac=[];
    543         while ~ieof && ...
     536        while ischar(fline) && ...
    544537                ~strncmpi(fline,'Cumulative Distribution Function',32) && ...
    545538                ~strncmpi(fline,'MV Statistics for ',18) && ...
    546539                ~strncmp (fline,'-',1)
    547540            fline=fgetl(fidi);
    548             if ~ischar(fline)
    549                 ieof=1;
    550                 break;
    551             end
    552541        end
    553542    end
     
    557546    icdf=0;
    558547
    559     while ~ieof && ~isempty(fline) && ...
     548    while ischar(fline) && ~isempty(fline) && ...
    560549            strncmpi(fline,'Cumulative Distribution Function',32)
    561550        [ntokens,tokens]=fltokens(fline);
     
    607596        display('    Cumulative Distribution Function not available.');
    608597        dresp(ndresp).cdf=[];
    609         while ~ieof && ...
     598        while ischar(fline) && ...
    610599                ~strncmpi(fline,'MV Statistics for ',18) && ...
    611600                ~strncmp (fline,'-',1)
    612601            fline=fgetl(fidi);
    613             if ~ischar(fline)
    614                 ieof=1;
    615                 break;
    616             end
    617602        end
    618603    end
Note: See TracChangeset for help on using the changeset viewer.