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.
25 lines
747 B
25 lines
747 B
%--------------------------
|
|
% @Author: Jingqiao Hu
|
|
% @Date: 2021-05-18 22:00:25
|
|
% @LastEditTime: 2021-05-18 22:00:39
|
|
%--------------------------
|
|
function f = elastic_force_nonlinear(F, dNe, alldofs, edofMat, lx, u, l)
|
|
|
|
f = zeros(alldofs, 1);
|
|
jac = lx^3/8;
|
|
eleNum = size(edofMat,1);
|
|
|
|
for gp = 1:8
|
|
dNe_g = dNe{gp}; % 9,24
|
|
dFe = repmat(dNe_g, [1,1,eleNum]); % 9,24,m
|
|
Fe = F{gp, 1}; % 9 * m
|
|
P2(1, :, :) = PK1_fast_nonlinear(u, l, Fe); % 1 * 9 * m
|
|
|
|
fe = squeeze(mtimesx(P2, dFe)) * jac; % 24*m
|
|
|
|
for ele = 1:eleNum
|
|
edof = edofMat(ele, :);
|
|
f(edof) = f(edof) - fe(:, ele); % NOTE: MINUS!
|
|
end
|
|
end
|
|
end
|