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.
16 lines
493 B
16 lines
493 B
%--------------------------
|
|
% @Author: Jingqiao Hu
|
|
% @Date: 2021-05-03 21:19:15
|
|
% @LastEditTime: 2021-05-03 21:19:16
|
|
%--------------------------
|
|
function [bdofs, idofs] = micro_boundary(microx)
|
|
Num_node = (1+microx)^3;
|
|
nodenrs = reshape(1:Num_node, 1+microx, 1+microx, 1+microx);
|
|
|
|
% extract surface nodes
|
|
inner = nodenrs(2:end-1, 2:end-1, 2:end-1);
|
|
boundarys = setdiff(nodenrs(:), inner(:));
|
|
|
|
bdofs = nodes2dofs(boundarys);
|
|
idofs = nodes2dofs(inner);
|
|
end
|