function [node, element]=  c2d8(a, ndiv)
% author: Ji Wan, Wuhan University, Email: wanji@whu.edu.cn
% date: 2021-06-25
[node, element] = c2d9(a, ndiv);
e9 = element(:,9);
element = element(:,1:8);
ka= 1:1:size(node,1);
kb = ka;
kb(e9) = NaN;
flag = isnan(kb);
node(flag,:) = []; % 结点删除
kb(~flag) = 1:1:numel(flag)-sum(flag); % 重新编号
element = kb(element); % 编号置换
end