Changeset 2102


Ignore:
Timestamp:
09/03/09 11:37:01 (15 years ago)
Author:
Mathieu Morlighem
Message:

no more control solution

File:
1 edited

Legend:

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

    r1901 r2102  
    11function outoptions=process_solve_options(options)
    2 %DEFAULT_SOLVE_OPTIONS - set up default options for solve phase
    3 %
    4 %   Usage:
     2                %DEFAULT_SOLVE_OPTIONS - set up default options for solve phase
     3                %
     4                %   Usage:
    55%      options=process_solve_options(options)
    6 %
    7 %   See also: SOLVE,RECOVER_SOLVE_OPTIONS
     6                %
     7                %   See also: SOLVE,RECOVER_SOLVE_OPTIONS
    88
    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'),
    1313                package=options{i,2};
    14                 found=1;
    15                 break
    16         end
     14found=1;
     15break
     16end
    1717end
    1818if ~found,
    1919        disp('recover_solve_options info message: no ''package'' was provided, defaulting to ''cielo''');
    20         options(end+1,:)={'package' 'cielo'};
    21         package='cielo';
     20options(end+1,:)={'package' 'cielo'};
     21package='cielo';
    2222end
    2323if ~ismemberi(package,{'cielo','ice','macayeal'}),
     
    2828found=0;
    2929for i=1:size(options,1),
    30         if strcmpi(options{i,1},'analysis_type'),
    31                 analysis_type=options{i,2};
    32                 found=1;
    33                 break
    34         end
     30         if strcmpi(options{i,1},'analysis_type'),
     31         analysis_type=options{i,2};
     32found=1;
     33break
     34end
    3535end
    3636if ~found,
     
    4141found=0;
    4242for i=1:size(options,1),
    43         if strcmpi(options{i,1},'sub_analysis_type'),
    44                 sub_analysis_type=options{i,2};
    45                 found=1;
    46                 break
    47         end
     43         if strcmpi(options{i,1},'sub_analysis_type'),
     44         sub_analysis_type=options{i,2};
     45found=1;
     46break
     47end
    4848end
    4949if ~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';
    5651end
    5752
     
    5954found=0;
    6055for i=1:size(options,1),
    61         if strcmpi(options{i,1},'batch'),
    62                 batch=options{i,2};
    63                 found=1;
    64                 break
    65         end
     56         if strcmpi(options{i,1},'batch'),
     57         batch=options{i,2};
     58found=1;
     59break
     60end
    6661end
    6762if ~found
     
    7065
    7166%check solution type is supported
    72 if ~ismemberi(analysis_type,{'control','diagnostic','prognostic','thermal','steadystate','parameters','mesh2grid','transient'}),
     67if ~ismemberi(analysis_type,{'diagnostic','prognostic','thermal','steadystate','parameters','mesh2grid','transient'}),
    7368        error(['process_solve_options error message: analysis_type ' analysis_type ' not supported yet!']);
    7469else
Note: See TracChangeset for help on using the changeset viewer.