Changeset 356


Ignore:
Timestamp:
05/12/09 12:19:04 (16 years ago)
Author:
Eric.Larour
Message:

dakot_m_write: direct matlab interface now runs with Dakota VOTD, ie: gets current number of the

function evaluation through fnEvalId field of Dakota structure.

qmu.m: commented out readfile for final dakota output files (too big most of the time)
qmuname: now takes md and a variable argument, which is the fnEvalId number. This way,

we handle the direct and indirect matlab interfaces transparently.

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

Legend:

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

    r32 r356  
    8989end
    9090fprintf(fidm,'\tloadmodel(infile);\n\n');
    91 % fprintf(fidm,'\tmd=qmuname(md);\n\n');
     91
     92if strcmpi(params.analysis_driver,'matlab')
     93        fprintf(fidm,'\tmd=qmuname(md,Dakota.fnEvalId);\n\n');
     94else
     95        fprintf(fidm,'\tmd=qmuname(md);\n\n');
     96end
    9297
    9398end
  • issm/trunk/src/m/solutions/dakota/qmu.m

    r349 r356  
    8787
    8888%save input and output files into model
    89 md.dakotain =readfile([qmufile '.in']);
    90 md.dakotaout=readfile([qmufile '.out']);
    91 if exist('dakota_tabular.dat','file')
    92         md.dakotadat=readfile('dakota_tabular.dat');
    93 end
     89%md.dakotain =readfile([qmufile '.in']);
     90%md.dakotaout=readfile([qmufile '.out']);
     91%if exist('dakota_tabular.dat','file')
     92%       md.dakotadat=readfile('dakota_tabular.dat');
     93%end
    9494
    9595system('zip -mq params.in.zip params.in.[1-9]*');
  • issm/trunk/src/m/solutions/dakota/qmuname.m

    r1 r356  
    1 function md=qmuname(md)
     1function md=qmuname(md,varargin)
    22%INPUT function md=qmuname(md)
    3 %Pick up the number file, read it and get the run number. Then modify the name of this
     3%Pick up the number from a file, or get it directly from the Dakota structure. Then modify the name of this
    44%model to reflect this new number.
    55
    6 fid=fopen('number','r');
    7 number=fscanf(fid,'%i',1)
    8 fclose(fid);
     6if nargin==1,
     7        fid=fopen('number','r');
     8        number=fscanf(fid,'%i',1)
     9        fclose(fid);
     10else
     11        number=varargin{1};
     12end
    913
    1014%modify model name by appending number to the name
Note: See TracChangeset for help on using the changeset viewer.