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
448 B

3 years ago
%--------------------------
% @Author: Jingqiao Hu
% @Date: 2021-11-26 09:23:33
% @LastEditTime: 2021-11-28 15:25:27
% sK is [nedofs, nele]
%--------------------------
function [K] = assemble_micro_k_hetero(dofid, rho_e, e0, e1, penal, sK0, iK, jK)
new_iK = dofid(iK);
new_jK = dofid(jK);
sK = sK0 .* (e0 + rho_e(:)'.^penal * (e1 - e0)); % [nedofs, nele]
K = sparse(new_iK, new_jK, sK(:));
K = (K + K') / 2;
end