You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
546 B
17 lines
546 B
3 years ago
|
%--------------------------
|
||
|
% @Author: Jingqiao Hu
|
||
|
% @Date: 2021-11-01 16:28:21
|
||
|
% @LastEditTime: 2021-11-02 17:09:19
|
||
|
%--------------------------
|
||
|
function [iK, jK, edofMat, EleNodesID, iEner] = forAssemble_trimesh(faces)
|
||
|
m = size(faces, 1);
|
||
|
|
||
|
edofMat0 = [2*faces-1, 2*faces]; % [n,6], arranged as KE, for U(edofMat) * KE
|
||
|
edofMat = edofMat0(:, [1,4,2,5,3,6]);
|
||
|
|
||
|
iK = reshape(kron(edofMat,ones(6,1)).',36*m,1);
|
||
|
jK = reshape(kron(edofMat,ones(1,6)).',36*m,1);
|
||
|
|
||
|
EleNodesID = edofMat(:,2:2:6)./2;
|
||
|
iEner = EleNodesID';
|
||
|
end
|