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.
11 lines
283 B
11 lines
283 B
3 years ago
|
% The whole K is participated in caculation.
|
||
|
% So K(fixeddofs) should be 1 in diag and 0 otherwise
|
||
|
function K = boundaryK(K, fixeddofs)
|
||
|
K(fixeddofs, :) = 0;
|
||
|
K(:, fixeddofs) = 0;
|
||
|
|
||
|
for i = 1:length(fixeddofs)
|
||
|
dof = fixeddofs(i);
|
||
|
K(dof, dof) = 1;
|
||
|
end
|
||
|
end
|