1 function R = Ucompconst (nodes,Nnodes,elements,Nelements,D,C)
3 % R = compconst (nodes,Nnodes,elements,Nelements,D,C);
5 ## This file is part of
7 ## SECS1D - A 1-D Drift--Diffusion Semiconductor Device Simulator
8 ## -------------------------------------------------------------------
9 ## Copyright (C) 2004-2007 Carlo de Falco
13 ## SECS1D 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 ## SECS1D 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 SECS1D; If not, see <http://www.gnu.org/licenses/>.
26 h = (nodes(2:end)-nodes(1:end-1)).*C;
27 R = D.*[h(1)/2; (h(1:end-1)+h(2:end))/2; h(end)/2];
32 % $Date: 2008-02-04 16:26:27 +0100 (man, 04 feb 2008) $