⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 get_neighbor.m

📁 hodge decomposition for 2D vector fields.
💻 M
字号:

function [neighbor_triangle,neighbor_point]=get_neighbor(node,triangle) 
%% get the neighboring triangles and neighboring nodes of a node 
%% node: the reference node 
%% triangle: the Grid Table 
%% neighbor_triangle: the neighbor triangles of the reference node 
%% neighbor_point: the neighbor points of the reference node 
M=size(triangle,1); 
neighbor_triangle=[]; 
for i=1:M 
temp=triangle(i,:); 
if find(temp==node)>0 
neighbor_triangle=[neighbor_triangle i]; 
end; 
end; 
neighbor_point=[]; 
N=length(neighbor_triangle); 
for i=1:N 
temp=triangle(neighbor_triangle(i),:); 
for j=1:3 
if find(neighbor_point==temp(j))>0 
continue; 
else 
neighbor_point=[neighbor_point temp(j)]; 
end; 
end; 
end; 
neighbor_point=sort(neighbor_point); 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -