1 function gridp = gridpart(grid,eind)
2 %
function gridp = gridpart(grid,eind)
6 % element indices in the vector eind. The neighbour information of
7 % the
new resulting boundaries is set to -10
9 % Bernard Haasdonk 18.6.2010
13 gridp.X = grid.X(eind);
14 gridp.nelements = length(eind);
15 gridp.global_eind = grid.global_eind(eind); % store original element indices
17 % generate elementid translation map: T \mapsto T_{local}
18 new_el_id = zeros(1,grid.nelements);
19 new_el_id(eind) = 1:length(eind);
21 gridp.NBI = grid.NBI(eind,:);
22 i = find(gridp.NBI>0);
23 gridp.NBI(i) = new_el_id(gridp.NBI(i));
24 i = find(gridp.NBI == 0);
A triangular conforming grid in two dimensions.
A cartesian rectangular grid in two dimensions with axis parallel elements.
a one dimensional grid implementation