%
% Function: plotmrpt.m
% 
% Usage: plotmrpt
% 
% Description: Creates a color gradient plot of the MRPT
%    damage indicator
%

% Version SWD970405
%
% Author(s): Scott W. Doebling, doebling@lanl.gov
%
% Institution: Los Alamos National Laboratory, ESA-EA
%
% Copyright (c) 1997, The Regents of the University
%     	of California.


axes(haxes)
cla
axis auto



%  Create the DIvec from the perturbation matrix DI

DIvec = -1 * diag(DI);

inodal = 1; % Damage Indicator is Nodal quantity

colormap cool

if ~isempty(Bars),
   ngrad = 30; % Number of increments for color gradient shading
   ptdambar(Nodes,Bars,DIvec,haxes,inodal,ngrad);
elseif ~isempty(Shells),
   ngrad = 4;  % Number of divisions in each direction for shell elements
   ptdamshl(Nodes,Shells,DIvec,haxes,inodal,ngrad);
else
   errordlg('ERROR: No Bar or Shell Geometry Defined')
end

%  Plot undeformed geometry

updtgeom('-',[0 0 0],Nodes,Bars,Shells,haxes,14,[])

damscale(hlegax,DIvec);

axes(haxes)
rotate3d on

title(['Nodal Damage Indicator - MRPT Method',])





