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.
15 lines
503 B
15 lines
503 B
3 years ago
|
%--------------------------
|
||
|
% @Author: Jingqiao Hu
|
||
|
% @Date: 2022-01-27 13:04:55
|
||
|
% @LastEditTime: 2022-01-27 14:58:42
|
||
|
%--------------------------
|
||
|
function [iK, jK, edofMat] = forAssemble_tetmesh(tets)
|
||
|
|
||
|
nele = size(tets, 1);
|
||
|
|
||
|
edofMat0 = [3*tets-2, 3*tets-1, 3*tets]; % 12 cols [x1,x2,x3,x4,y1,y2,y3,y4,z1,z2,z3,z4]
|
||
|
edofMat = edofMat0(:, [1,5,9,2,6,10,3,7,11,4,8,12]);
|
||
|
|
||
|
iK = reshape(kron(edofMat,ones(12,1))',12*12*nele,1);
|
||
|
jK = reshape(kron(edofMat,ones(1,12))',12*12*nele,1);
|
||
|
end
|