feasmbl2.m

来自「The Finite Element Method Using MATLAB」· M 代码 · 共 29 行

M
29
字号
function [kk,ff]=feasmbl2(kk,ff,k,f,index)
%----------------------------------------------------------
%  Purpose:
%     Assembly of element matrices into the system matrix &
%     Assembly of element vectors into the system vector
%
%  Synopsis:
%     [kk,ff]=feasmbl2(kk,ff,k,f,index)
%
%  Variable Description:
%     kk - system matrix
%     ff - system vector
%     k  - element matrix
%     f  - element vector
%     index - d.o.f. vector associated with an element
%-----------------------------------------------------------

 
 edof = length(index);
 for i=1:edof
   ii=index(i);
     ff(ii)=ff(ii)+f(i);
     for j=1:edof
       jj=index(j);
         kk(ii,jj)=kk(ii,jj)+k(i,j);
     end
 end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?