%
% Function: sedamshl.m
% 
% Usage: sedamshl
% 
% Description:
%    Computes and plots the strain energy
%    damage indicators for shell geometry
%

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

numdiv = str2num(get(onHndlVector(10),'string'));
nu = str2num(get(onHndlVector(17),'string'));
iopt = get(onHndlVector(12),'value');

if iopt==1,
	interpopt='spline';
elseif iopt==2,
	interpopt='cubic';	
end,

%
%  Compute the damage index for each subdivision of each element
%

[DImat,DIloc] = dishls(Nodes,SEMquads,phir_resp_u,phir_resp_d,respDOF_u,interpopt,numdiv,mode_anal,nu);

%
%  Set plot parameters
%

ngrad = numdiv;

inodal = 0;  % DI values are elemental

colormap cool

ptdamshl(Nodes,Bars,Shells,DImat,haxes,inodal,ngrad,DIloc);

%  Plot undeformed geometry

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

damscale(hlegax,DImat);

axes(haxes)
damtitstr = damtitle(['Strain Energy Method - Shell Elements'],pathname_u,filename_u,...
   pathname_d,filename_d,['Number of Divs:',num2str(numdiv),', ','Modes: ',num2str(mode_anal)]);
title(['Strain Energy Method - Shell Elements'])

rotate3d on