1 function [p,e,t]=Ustructmesh_right(x,y,region,sides)
3 % [p,e,t]=Ustructmesh(x,y,region,sides)
7 % SECS2D - A 2-D Drift--Diffusion Semiconductor Device Simulator
8 % -------------------------------------------------------------------
9 % Copyright (C) 2004-2006 Carlo de Falco
13 % SECS2D is free software; you can redistribute it and/or modify
14 % it under the terms of the GNU General Public License as published by
15 % the Free Software Foundation; either version 2 of the License, or
16 % (at your option) any later version.
18 % SECS2D is distributed in the hope that it will be useful,
19 % but WITHOUT ANY WARRANTY; without even the implied warranty of
20 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 % GNU General Public License for more details.
23 % You should have received a copy of the GNU General Public License
24 % along with SECS2D; If not, see <http://www.gnu.org/licenses/>.
31 [XX,YY] = meshgrid(x,y);
38 t = [[iiv;iiv+ny;iiv+ny+1],[iiv;iiv+ny+1;iiv+1] ];
43 l2 = ny*(nx-1)+1:nx*ny;
46 e = [ l1([1:end-1]) l2([1:end-1]) l3([1:end-1]) l4([1:end-1])
47 l1([2:end]) l2([2:end]) l3([2:end]) l4([2:end])
48 [l1([1:end-1]) l2([1:end-1]) l3([1:end-1]) l4([1:end-1])]*0
49 [l1([1:end-1]) l2([1:end-1]) l3([1:end-1]) l4([1:end-1])]*0
50 l1([1:end-1])*0+sides(1) l2([1:end-1])*0+sides(2) l3([1:end-1])*0+sides(3) l4([1:end-1])*0+sides(4)
51 [l1([1:end-1]) l2([1:end-1]) l3([1:end-1]) l4([1:end-1])]*0
52 [l1([1:end-1]) l2([1:end-1]) l3([1:end-1]) l4([1:end-1])]*0+region