0001 function Ke=CreateKMatrix(singelem,grids,materials,inputs,analysis_type)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 if strcmpi(analysis_type,'diagnostic_hutter'),
0013
0014 Ke=CreateKMatrixHutter(singelem,grids,materials,inputs);
0015
0016 else
0017 error('CreateKMatrix/beam error message: analysis type not supported yet')
0018 end
0019 end
0020
0021 function Ke=CreateKMatrixHutter(singelem,grids,materials,inputs)
0022
0023
0024 numgrids=1;
0025 DOFPERGRID=2;
0026 numdof=numgrids*DOFPERGRID;
0027
0028
0029 Ke=elemmatrix(numdof);
0030
0031
0032 for i=1:numgrids,
0033 doflist=grids(singelem.g(i)).grid.doflist;
0034 for j=1:DOFPERGRID,
0035 dof=doflist(j);
0036 Ke.row_indices((i-1)*DOFPERGRID+j)=dof;
0037 end
0038
0039 dof=doflist(1);
0040 end
0041
0042 Ke.terms=eye(2);
0043
0044 end