Changeset 642
- Timestamp:
- 05/29/09 11:05:33 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/solutions/dakota/dakota_out_parse.m
r456 r642 71 71 case {'nond_local_reliability'} 72 72 [dresp]=nond_locrel(fidi); 73 % case {'dace','fsu_quasi_mc','fsu_cvt'} 74 % case {'vector_parameter_study','list_parameter_study',... 75 % 'centered parameter_study','multidim_parameter_study'} 73 case {'dace','fsu_quasi_mc','fsu_cvt'} 74 [dresp]=param_any(fidi); 75 case {'vector_parameter_study','list_parameter_study',... 76 'centered_parameter_study','multidim_parameter_study'} 77 [dresp]=param_any(fidi); 76 78 otherwise 77 79 error('Unrecognized method ''%s'' in file %s.',... … … 735 737 end 736 738 739 %% function to parse any parameter study output file 740 741 function [dresp]=param_any(fidi) 742 743 %% search through the file to find the Dakota output data 744 745 [fline]=findline(fidi,'<<<<< Iterator'); 746 if ~ischar(fline) 747 return 748 end 749 display([' ' deblank(fline)]); 750 751 % loop through the file to find the number of function evaluations 752 753 [nfeval]=nfeval_read(fidi); 754 755 % loop through the file to find the volumetric uniformity measures 756 757 [dresp]=vum_read(fidi,struct([])); 758 759 end 760 761 %% function to find and read the volumetric uniformity measures 762 763 function [dresp]=vum_read(fidi,dresp) 764 765 [fline]=findline(fidi,'The following lists volumetric uniformity measures'); 766 if ~ischar(fline) 767 return 768 end 769 dresp(end+1).vum=[]; 770 771 display('Reading measures for volumetric uniformity.'); 772 773 fline=fgetl(fidi); 774 fline=fgetl(fidi); 775 776 while ischar(fline) && ~isempty(fline) 777 [ntokens,tokens]=fltokens(fline); 778 switch lower(tokens{1}{1}) 779 case 'chi' 780 dresp.vum.chi=tokens{1}{4}; 781 case 'd' 782 dresp.vum.d =tokens{1}{4}; 783 case 'h' 784 dresp.vum.h =tokens{1}{4}; 785 case 'tau' 786 dresp.vum.tau=tokens{1}{4}; 787 end 788 fline=fgetl(fidi); 789 end 790 791 end 792 737 793 %% function to find a file line starting with a specified string 738 794
Note:
See TracChangeset
for help on using the changeset viewer.