node

PURPOSE ^

NODE - constructor for node object

SYNOPSIS ^

function node = node(varargin)

DESCRIPTION ^

NODE - constructor for node object

   Usage:
      node = node(varargin)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function node = node(varargin)
0002 %NODE - constructor for node object
0003 %
0004 %   Usage:
0005 %      node = node(varargin)
0006 
0007 switch nargin
0008 case 0
0009     % if no input arguments, create a default object
0010     node.id=NaN;
0011     node.x=NaN;
0012     node.y=NaN;
0013     node.z=NaN;
0014     node.doflist=zeros(6,1); %6 degrees of freedom available per node.
0015     node.gridset='';
0016     node.onbed=NaN;
0017     node.border=0; %border flag: 1 implies this grid belongs to the metis partition borders (See ModelProcessor.m for more details)
0018     node.uppergrid=NaN;
0019     node.lowergrid=NaN;
0020     node=class(node,'node');
0021                 
0022 case 1
0023     %If single argument of class node, we have a copy constructor.
0024     if (isa(varargin{1},'node'))
0025         node = varargin{1};
0026     else
0027         error('node constructor error message: copy constructor called on a non ''node'' class object');
0028     end 
0029 otherwise
0030     error('node constructor error message: 0 of 1 argument only in input.');
0031 end

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