| [9642] | 1 | %PROGNOSTIC class definition
|
|---|
| 2 | %
|
|---|
| 3 | % Usage:
|
|---|
| 4 | % prognostic=prognostic();
|
|---|
| 5 |
|
|---|
| 6 | classdef prognostic
|
|---|
| 7 | properties (SetAccess=public)
|
|---|
| 8 | spcthickness = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
|
|---|
| 9 | hydrostatic_adjustment = modelfield('default',0,'marshall',true,'preprocess','StringToEnum','format','Integer');
|
|---|
| 10 | stabilization = modelfield('default',0,'marshall',true,'format','Integer');
|
|---|
| 11 | vertex_pairing = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
|
|---|
| 12 | penalty_factor = modelfield('default',0,'marshall',true,'format','Double');
|
|---|
| 13 | end
|
|---|
| 14 | methods
|
|---|
| 15 | function obj = prognostic(varargin) % {{{
|
|---|
| 16 | switch nargin
|
|---|
| 17 | case 0
|
|---|
| 18 | obj=setdefaultparameters(obj);
|
|---|
| 19 | case 1
|
|---|
| 20 | in=varargin{1};
|
|---|
| 21 | if (isa(in,'numeric') & in==0),
|
|---|
| 22 | % requesting templates do nothing
|
|---|
| 23 | else
|
|---|
| 24 | error('constructor not supported');
|
|---|
| 25 | end
|
|---|
| 26 | otherwise
|
|---|
| 27 | error('constructor not supported');
|
|---|
| 28 | end
|
|---|
| 29 | end % }}}
|
|---|
| 30 | function obj = setdefaultparameters(obj) % {{{
|
|---|
| 31 |
|
|---|
| 32 | %first, use the defaults provided by the properties definition above.
|
|---|
| 33 | fieldnames=fields(obj);
|
|---|
| 34 | for i=1:length(fieldnames),
|
|---|
| 35 | fieldname=fieldnames{i};
|
|---|
| 36 | obj.(fieldname)=obj.(fieldname).default;
|
|---|
| 37 | end
|
|---|
| 38 |
|
|---|
| 39 | %Type of stabilization to use 0:nothing 1:artificial_diffusivity 3:Discontinuous Galerkin
|
|---|
| 40 | obj.stabilization=1;
|
|---|
| 41 |
|
|---|
| 42 | %Factor applied to compute the penalties kappa=max(stiffness matrix)*10^penalty_factor
|
|---|
| 43 | obj.penalty_factor=3;
|
|---|
| 44 |
|
|---|
| 45 | %Hydrostatic adjustment
|
|---|
| 46 | obj.hydrostatic_adjustment='Absolute';
|
|---|
| 47 | end % }}}
|
|---|
| [9739] | 48 | function checkconsistency(obj,md) % {{{
|
|---|
| 49 |
|
|---|
| 50 | end % }}}
|
|---|
| [9642] | 51 | function disp(obj) % {{{
|
|---|
| 52 | disp(sprintf(' Prognostic solution parameters:'));
|
|---|
| 53 |
|
|---|
| 54 | disp(sprintf('\n transient:'));
|
|---|
| [9646] | 55 | fielddisplay(obj,'stabilization','0->no, 1->artificial_diffusivity, 3->discontinuous Galerkin');
|
|---|
| [9642] | 56 |
|
|---|
| 57 | disp(sprintf('\n boundary conditions:'));
|
|---|
| 58 | fielddisplay(obj,'spcthickness','thickness constraints (NaN means no constraint)');
|
|---|
| 59 |
|
|---|
| 60 | end % }}}
|
|---|
| 61 | end
|
|---|
| 62 | end
|
|---|