Ignore:
Timestamp:
11/29/11 16:03:56 (13 years ago)
Author:
Mathieu Morlighem
Message:

Improvement: marshall is now a method of all model fields, removed unnecessary model fields (numcontrols... etc)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/timestepping.m

    r9862 r10969  
    66classdef timestepping
    77        properties (SetAccess=public)
    8                 time_step       = modelfield('default',0,'marshall',true,'format','Double');
    9                 final_time      = modelfield('default',0,'marshall',true,'format','Double');
    10                 time_adapt      = modelfield('default',0,'marshall',true,'format','Boolean');
    11                 cfl_coefficient = modelfield('default',0,'marshall',true,'format','Double');
     8                time_step       = 0;
     9                final_time      = 0;
     10                time_adapt      = 0;
     11                cfl_coefficient = 0;
    1212        end
    1313        methods
     
    2828                end % }}}
    2929                function obj = setdefaultparameters(obj) % {{{
    30 
    31                         %first, use the defaults provided by the properties definition above.
    32                         fieldnames=fields(obj);
    33                         for i=1:length(fieldnames),
    34                                 fieldname=fieldnames{i};
    35                                 obj.(fieldname)=obj.(fieldname).default;
    36                         end
    3730
    3831                        %time between 2 time steps
     
    6053
    6154                end % }}}
     55                function marshall(obj,fid) % {{{
     56                        WriteData(fid,'object',obj,'fieldname','time_step','format','Double');
     57                        WriteData(fid,'object',obj,'fieldname','final_time','format','Double');
     58                        WriteData(fid,'object',obj,'fieldname','time_adapt','format','Boolean');
     59                        WriteData(fid,'object',obj,'fieldname','cfl_coefficient','format','Double');
     60                end % }}}
    6261        end
    6362end
Note: See TracChangeset for help on using the changeset viewer.