Changeset 8296
- Timestamp:
- 05/16/11 13:10:11 (14 years ago)
- Location:
- issm/trunk/src/m/model
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/model/process_solve_options.m
r8290 r8296 8 8 9 9 %solution_type: check on this option, error out otherwise 10 solution_type=getfieldvalue(options,'analysis_type'); 11 12 %batch mode for launching jobs. 13 outoptions.batch=getfieldvalue(options,'batch','no'); 14 15 %directory 16 outoptions.directory=getfieldvalue(options,'directory',''); 17 18 %convert to Enum if a string was provided 10 solution_type=getfieldvalue(options,'solution_type'); 19 11 if ischar(solution_type), error(['only Enums are supported as ''solution_type''. For example: md=solve(md,''solution_type'',DiagnosticSolutionEnum); ']); end 20 21 %check solution type is supported22 12 if ~ismember(solution_type,[DiagnosticSolutionEnum,PrognosticSolutionEnum,ThermalSolutionEnum,... 23 13 SteadystateSolutionEnum,ParametersSolutionEnum,Transient2DSolutionEnum,Transient3DSolutionEnum... … … 26 16 end 27 17 outoptions.solution_type=solution_type; 18 28 19 outoptions.upload=getfieldvalue(options,'upload','off'); 20 outoptions.batch=getfieldvalue(options,'batch','no'); 21 outoptions.directory=getfieldvalue(options,'directory',''); 29 22 30 23 % process qmu arguments … … 46 39 outoptions.latsgn=getfieldvalue(options,'latsgn',0); 47 40 outoptions.cmap=getfieldvalue(options,'cmap',[]); 48 -
issm/trunk/src/m/model/solve.m
r7686 r8296 1 function md=solve(md, varargin)1 function md=solve(md,solutionenum,varargin) 2 2 %SOLVE - apply solution sequence for this model 3 3 % 4 4 % Usage: 5 % md=solve(md, varargin)5 % md=solve(md,solutionenum,varargin) 6 6 % where varargin is a lit of paired arguments of string OR enums 7 % arguments can be: 'analysis_type': 'DiagnosticAnalysis','ThermalAnalysis','PrognosticAnalysis','Transient2DAnalysis'8 7 % 9 8 % Examples: 10 % md=solve(md, 'analysis_type',DiagnosticSolutionEnum);9 % md=solve(md,DiagnosticSolutionEnum); 11 10 12 11 %recover options 13 options=pairoptions(varargin{:} );12 options=pairoptions(varargin{:},'solution_type',solutionenum); 14 13 15 14 %add default options … … 62 61 63 62 %Check result is consistent 64 disp('checking result consistency');63 %disp('checking result consistency'); 65 64 %if ~isresultconsistent(md,options.solution_type), 66 65 % disp('!! results not consistent correct the model !!') %it would be very cruel to put an error, it would kill the computed results (even if not consistent...)
Note:
See TracChangeset
for help on using the changeset viewer.