📄 find_outermost_boundary.m
字号:
function [outermost, inside] = find_outermost_boundary(bnd)% FIND_OUTERMOST_BOUNDARY locates outermost compartment of a BEM model% by looking at the containment of the triangular meshes describing % the surface boundaries%% [outermost] = find_innermost_boundary(bnd)%% with the boundaries described by a struct array bnd with% bnd(i).pnt vertices of boundary i (matrix of size Nx3)% bnd(i).tri triangles of boundary i (matrix of size Mx3)% Copyright (C) 2003, Robert Oostenveld%% $Log: find_outermost_boundary.m,v $% Revision 1.2 2003/03/04 21:46:18 roberto% added CVS log entry and synchronized all copyright labels%ncmp = length(bnd);% try to locate the outermost compartmentfor i=1:ncmpfor j=1:ncmp % determine for a single vertex on each surface if it is inside or outside the other surfaces curpos = bnd(i).pnt(1,:); % any point on the boundary is ok curpnt = bnd(j).pnt; curtri = bnd(j).tri; if i==j inside(i,j) = 0; else inside(i,j) = bounding_mesh(curpos, curpnt, curtri); endendend% assume that the sources are in the innermost compartmenttmp = sum(inside, 2);[i, outermost] = min(tmp);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -