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.
 
 
 
 

30 lines
847 B

%--------------------------
% @Author: Jingqiao Hu
% @Date: 2021-02-28 17:01:58
% @LastEditTime: 2021-03-01 18:10:28
%--------------------------
function F = deform_grad_2scale(sort_h, edofMat, dNh, eleNum_mi, U, regulated_matrix)
nele_ma = size(edofMat, 1);
F = cell(8, nele_ma);
I = eye(3);
initF = repmat(I(:), 1, eleNum_mi);
for ele = 1:nele_ma
edof = edofMat(ele, :);
ue = U(edof); % including macro U and control pnts
Re = regulated_matrix{ele};
he = Re * ue;
% reorder micro-displacement to [24 * eleNum_mi]
he_reorder = sparse(sort_h(:,1), sort_h(:,2), he(sort_h(:,3)));
%% 2. compute deform grad
for gp = 1:8
Be = dNh{gp};
F{gp, ele} = Be * he_reorder + initF; % 9 * eleNum_mi
end
end
end