[9678] | 1 | %TRANSIENT class definition
|
---|
| 2 | %
|
---|
| 3 | % Usage:
|
---|
| 4 | % transient=transient();
|
---|
| 5 |
|
---|
| 6 | classdef transient
|
---|
| 7 | properties (SetAccess=public)
|
---|
[10969] | 8 | isprognostic = 0;
|
---|
| 9 | isdiagnostic = 0;
|
---|
| 10 | isthermal = 0;
|
---|
| 11 | isgroundingline = 0;
|
---|
| 12 | requested_outputs = NaN;
|
---|
[9678] | 13 | end
|
---|
| 14 | methods
|
---|
| 15 | function obj = transient(varargin) % {{{
|
---|
| 16 | switch nargin
|
---|
| 17 | case 0
|
---|
| 18 | obj=setdefaultparameters(obj);
|
---|
| 19 | otherwise
|
---|
| 20 | error('constructor not supported');
|
---|
| 21 | end
|
---|
| 22 | end % }}}
|
---|
| 23 | function obj = setdefaultparameters(obj) % {{{
|
---|
| 24 |
|
---|
| 25 | %full analysis: Diagnostic, Prognostic and Thermal but no groundingline migration for now
|
---|
| 26 | obj.isprognostic=1;
|
---|
| 27 | obj.isdiagnostic=1;
|
---|
| 28 | obj.isthermal=1;
|
---|
| 29 | obj.isgroundingline=0;
|
---|
| 30 |
|
---|
| 31 | end % }}}
|
---|
[9853] | 32 | function checkconsistency(obj,md,solution,analyses) % {{{
|
---|
[9854] | 33 |
|
---|
| 34 | %Early return
|
---|
| 35 | if solution~=TransientSolutionEnum, return; end
|
---|
| 36 |
|
---|
[9862] | 37 | checkfield(md,'transient.isprognostic','numel',1,'values',[0 1]);
|
---|
| 38 | checkfield(md,'transient.isdiagnostic','numel',1,'values',[0 1]);
|
---|
| 39 | checkfield(md,'transient.isthermal','numel',1,'values',[0 1]);
|
---|
| 40 | checkfield(md,'transient.isgroundingline','numel',1,'values',[0 1]);
|
---|
[9739] | 41 |
|
---|
| 42 | end % }}}
|
---|
[9821] | 43 | function disp(obj) % {{{
|
---|
[10882] | 44 | disp(sprintf(' transient solution parameters:'));
|
---|
[9821] | 45 |
|
---|
| 46 | fielddisplay(obj,'isprognostic','indicates if a prognostic solution is used in the transient');
|
---|
| 47 | fielddisplay(obj,'isthermal','indicates if a thermal solution is used in the transient');
|
---|
| 48 | fielddisplay(obj,'isdiagnostic','indicates if a diagnostic solution is used in the transient');
|
---|
| 49 | fielddisplay(obj,'isgroundingline','indicates if a groundingline migration is used in the transient');
|
---|
[9958] | 50 | fielddisplay(obj,'requested_outputs','list of additional outputs requested');
|
---|
[9821] | 51 |
|
---|
| 52 | end % }}}
|
---|
[10969] | 53 | function marshall(obj,fid) % {{{
|
---|
| 54 | WriteData(fid,'object',obj,'fieldname','isprognostic','format','Boolean');
|
---|
| 55 | WriteData(fid,'object',obj,'fieldname','isdiagnostic','format','Boolean');
|
---|
| 56 | WriteData(fid,'object',obj,'fieldname','isthermal','format','Boolean');
|
---|
| 57 | WriteData(fid,'object',obj,'fieldname','isgroundingline','format','Boolean');
|
---|
| 58 | WriteData(fid,'object',obj,'fieldname','requested_outputs','format','DoubleMat','mattype',3);
|
---|
| 59 | end % }}}
|
---|
[9678] | 60 | end
|
---|
| 61 | end
|
---|