%
%  qa_dibars
%
%  This script runs debug check of 'dibars',
%  which computes the SEM damage index for
%  Beam elements

%  Load the undamaged and damaged modes

load c:\doebling\I40_Results\nominal_modal_sets\dam0_md.mat
phir_resp_u = phir_resp;
respDOF_u = respDOF;


load c:\doebling\I40_Results\nominal_modal_sets\dam4_md.mat
phir_resp_d = phir_resp;
respDOF_d = respDOF;

%  Load the geometry

load c:\data\i40\geom.mat

%  Define the SEMbeams

SEMbeams{1} = [1 2 3 4 5 6 7 8 9 10 11 12 13];
SEMbeams{2} = [101 102 103 104 105 106 107 108 109 110 111 112 113];

%  Define other variables

interpopt = 'spline';
mode_anal = 1;
numdiv = 10;

%  Compute DImat

DImat = dibars(Nodes,SEMbeams,phir_resp_u,phir_resp_d,respDOF_u,interpopt,numdiv,mode_anal);

disp('ALL DONE')
