Changeset 2102
- Timestamp:
- 09/03/09 11:37:01 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/public/process_solve_options.m
r1901 r2102 1 1 function outoptions=process_solve_options(options) 2 %DEFAULT_SOLVE_OPTIONS - set up default options for solve phase3 %4 % Usage:2 %DEFAULT_SOLVE_OPTIONS - set up default options for solve phase 3 % 4 % Usage: 5 5 % options=process_solve_options(options) 6 %7 % See also: SOLVE,RECOVER_SOLVE_OPTIONS6 % 7 % See also: SOLVE,RECOVER_SOLVE_OPTIONS 8 8 9 %package: is there one? check to ''cielo''10 found=0;11 for i=1:size(options,1),12 if strcmpi(options{i,1},'package'),9 %package: is there one? check to ''cielo'' 10 found=0; 11 for i=1:size(options,1), 12 if strcmpi(options{i,1},'package'), 13 13 package=options{i,2}; 14 15 16 14 found=1; 15 break 16 end 17 17 end 18 18 if ~found, 19 19 disp('recover_solve_options info message: no ''package'' was provided, defaulting to ''cielo'''); 20 21 20 options(end+1,:)={'package' 'cielo'}; 21 package='cielo'; 22 22 end 23 23 if ~ismemberi(package,{'cielo','ice','macayeal'}), … … 28 28 found=0; 29 29 for i=1:size(options,1), 30 if strcmpi(options{i,1},'analysis_type'),31 32 33 34 30 if strcmpi(options{i,1},'analysis_type'), 31 analysis_type=options{i,2}; 32 found=1; 33 break 34 end 35 35 end 36 36 if ~found, … … 41 41 found=0; 42 42 for i=1:size(options,1), 43 if strcmpi(options{i,1},'sub_analysis_type'),44 45 46 47 43 if strcmpi(options{i,1},'sub_analysis_type'), 44 sub_analysis_type=options{i,2}; 45 found=1; 46 break 47 end 48 48 end 49 49 if ~found 50 if strcmpi(analysis_type,'control'), 51 disp('recover_solve_options info message: no ''sub_analysis_type'' was provided, defaulting to ''inverse'''); 52 sub_analysis_type='inverse'; 53 else 54 sub_analysis_type='none'; 55 end 50 sub_analysis_type='none'; 56 51 end 57 52 … … 59 54 found=0; 60 55 for i=1:size(options,1), 61 if strcmpi(options{i,1},'batch'),62 63 64 65 56 if strcmpi(options{i,1},'batch'), 57 batch=options{i,2}; 58 found=1; 59 break 60 end 66 61 end 67 62 if ~found … … 70 65 71 66 %check solution type is supported 72 if ~ismemberi(analysis_type,{' control','diagnostic','prognostic','thermal','steadystate','parameters','mesh2grid','transient'}),67 if ~ismemberi(analysis_type,{'diagnostic','prognostic','thermal','steadystate','parameters','mesh2grid','transient'}), 73 68 error(['process_solve_options error message: analysis_type ' analysis_type ' not supported yet!']); 74 69 else
Note:
See TracChangeset
for help on using the changeset viewer.