%
%  Name: updtnode
% 
%  Usage: updtnode
% 
%   Description:
%	Updates the Node list from the 
%	interactive geometry function
%	'editgeom'
% 

%  Version SWD960321
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This matlab source code was originally     %
% developed as part of "DIAMOND" at          %
% Los Alamos National Laboratory. It may     %
% be copied, modified, and distributed in    %
% any form, provided:                        %
%  a) This notice accompanies the files and  %
%     appears near the top of all source     %
%     code files.                            %
%  b) No payment or commercial services are  %
%     received in exchange for the code.     %
%                                            %
% Original copyright is reserved by the      %
% Regents of the University of California,   %
% in addition to Scott W. Doebling, Phillip  %
% J. Cornwell, Erik G. Straser, and Charles  %
% R. Farrar.                                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
disp('in update nodes')
inode = str2num(get(hinode,'string'));
ixnode = str2num(get(hixnode,'string'));
iynode = str2num(get(hiynode,'string'));
iznode = str2num(get(hiznode,'string'));

if inodedel == 1,
   inod = find(Nodes(:,1) == inode);
   if ~isempty(inod),
      Nodes(inod,:) = [];
      disp(['Node #',num2str(inode),' deleted']);
   else
      disp(['Node #',num2str(inode),' not in list -- cannot delete']);
   end
   set(hnodedel,'Value',0);
   inodedel=0;
else
   Nodes = addnodes(Nodes,inode,ixnode,iynode,iznode);
end

return
