Changeset 10969 for issm/trunk-jpl/src/m/classes/prognostic.m
- Timestamp:
- 11/29/11 16:03:56 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/prognostic.m
r9862 r10969 6 6 classdef prognostic 7 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');8 spcthickness = NaN; 9 hydrostatic_adjustment = 0; 10 stabilization = 0; 11 vertex_pairing = NaN; 12 penalty_factor = 0; 13 13 end 14 14 methods … … 29 29 end % }}} 30 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 end38 31 39 32 %Type of stabilization to use 0:nothing 1:artificial_diffusivity 3:Discontinuous Galerkin … … 67 60 68 61 end % }}} 62 function marshall(obj,fid) % {{{ 63 WriteData(fid,'object',obj,'fieldname','spcthickness','format','DoubleMat','mattype',1); 64 WriteData(fid,'data',StringToEnum(obj.hydrostatic_adjustment),'format','Integer','enum',PrognosticHydrostaticAdjustmentEnum); 65 WriteData(fid,'object',obj,'fieldname','stabilization','format','Integer'); 66 WriteData(fid,'object',obj,'fieldname','vertex_pairing','format','DoubleMat','mattype',3); 67 WriteData(fid,'object',obj,'fieldname','penalty_factor','format','Double'); 68 end % }}} 69 69 end 70 70 end
Note:
See TracChangeset
for help on using the changeset viewer.