1 function einds_ext = index_ext(grid, einds, neigh_steps)
2 %
function einds_ext = index_ext(grid, einds, neigh_steps)
4 %
function computing the sorted list of element indicés, which are
5 % given by the neigh_steps number of neighbours of the elements with
6 % indices einds in grid.
7 % e.g.
for neigh_steps = 0: einds_ext = einds
8 % e.g.
for neigh_steps = 1: einds_ext = einds plus all edge-neighbours
10 % e.g. for neigh_steps = 2: einds_ext = einds plus all edge-neighbours
11 % of elements plus all edge neighbours of these.
13 % Bernard Haasdonk 18.6.2010
15 mask = zeros(1,grid.nelements);
19 nbi = grid.NBI(einds_ext,:);
22 einds_ext = find(mask>0);