setup_id_lm.m

来自「The Finite Element Method Usign MATLAB.p」· M 代码 · 共 27 行

M
27
字号
function  d=setup_ID_LM(d);
include_flags;

count = 0; count1 = 0;   
for i = 1:neq
    if flags(i) == 2            % check if node on essential boundary   
        count   = count + 1;    
        ID(i)   = count;        % arrange essential B.C nodes first
        d(count)= e_bc(i);      % store reordered essential B.C 
    else
        count1 = count1 + 1;
        ID(i) = nd + count1;    
    end
end


for e = 1:nel
    n = 1;
    for j = 1:nen
        blk     = ndof*(IEN(j,e)-1);    
        for k = 1:ndof  
            LM(n,e) = ID( blk + k  );   % create the LM matrix
            n = n + 1;
        end
    end
end

⌨️ 快捷键说明

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