function mesh = PNDIODE(Lp,Ln,Td);

%  mesh = PNDIODE(Lp,Ln,Td);
%
%                 Ln        Lp
%             |---------|---------|
%    
%         -   ,---------,---------,
%         |   |.........|\\\\\\\\\|
%     Td  |   |.........|\\\\\\\\\|
%         |   |.........|\\\\\\\\\|
%         -   '---------'---------'
%
%       Lengths are in meters



% This file is part of 
%
%            SECS2D - A 2-D Drift--Diffusion Semiconductor Device Simulator
%         -------------------------------------------------------------------
%            Copyright (C) 2004-2006  Carlo de Falco
%
%
%
%  SECS2D is free software; you can redistribute it and/or modify
%  it under the terms of the GNU General Public License as published by
%  the Free Software Foundation; either version 2 of the License, or
%  (at your option) any later version.
%
%  SECS2D is distributed in the hope that it will be useful,
%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%  GNU General Public License for more details.
%
%  You should have received a copy of the GNU General Public License
%  along with SECS2D; if not, write to the Free Software
%  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
%  USA


fx  = 0.8;
fy  = .6;
pow = 1.7;

x1 = linspace(0,1,20*fx);
x1 = Ln*(1-x1.^pow);


x2 = linspace(0,1,20*fx);
x2 =  Ln+Lp*x2.^pow;

y  = linspace(0,Td,10*fy);

[mesh1.p,mesh1.e,mesh1.t]=Ustructmesh(x1,y,1,[1:4]);
[mesh2.p,mesh2.e,mesh2.t]=Ustructmesh(x2,y,1,[1:4]);

side1=2;
side2=4;

mesh=Ujoinmeshes(mesh1,mesh2,side1,side2);

##Udrawedge(mesh);




