icefront

PURPOSE ^

ICEFRONT - constructor for icefront object

SYNOPSIS ^

function icefront = icefront(varargin)

DESCRIPTION ^

ICEFRONT - constructor for icefront object

   Usage:
      icefront = icefront(varargin)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function icefront = icefront(varargin)
0002 %ICEFRONT - constructor for icefront object
0003 %
0004 %   Usage:
0005 %      icefront = icefront(varargin)
0006 
0007 switch nargin
0008 case 0
0009     % if no input arguments, create a default object
0010     icefront.eid=NaN;
0011     icefront.g=zeros(4,1);
0012     icefront.rho_water=NaN;
0013     icefront.type='segment'; %segment or quad, depending on whether we are running '2d' or '3d'
0014     icefront=class(icefront,'icefront');
0015 case 1
0016     %If single argument of class icefront, we have a copy constructor.
0017     if (isa(varargin{1},'icefront'))
0018         icefront = varargin{1};
0019     else
0020         error('icefront constructor error message: copy constructor called on a non ''icefront'' class object');
0021     end 
0022 otherwise
0023     error('icefront constructor error message: 0 of 1 argument only in input.');
0024 end

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003