C ******************** POTCUT1 ************************ C C MAKE A CUT OF THE POTENTIAL ALONG A GIVEN LATERAL POSITION C (INTERPOLATE BETWEEN SURROUNDING GRID POINTS) C C ICUT=0, INTERPOLATE POTENTIAL AT CENTRAL AXIS C ICUT=1, CUT AT FIRST RADIAL POINT, ETC. C C SUBROUTINE POTCUT1(ICUT,VAC,TIP,SEM,VSINT,NRDIM,NVDIM,NSDIM, &NV,NS,SEP,S,R,DELV,PHI0,BIAS,CHI,DELPHI,BARR,PROF,NBARR1, &NVDIM1,NVDIM2,PMIN,PMAX,IWRIT) C DIMENSION VAC(2,NRDIM,NVDIM),SEM(2,NRDIM,NSDIM),VSINT(2,NRDIM), &S(NSDIM),R(NRDIM),BARR(NVDIM1),PROF(NSDIM),DELV(NRDIM) LOGICAL TIP(NRDIM,NVDIM) real kappa,lambda COMMON/SEMI/EGAP,ED,EA,ACB,AVB,CD,CA,EPSIL,TK,IDEG,IINV C C CONSTRUCT VACUUM BARRIER (FIRST POINT IS THE SURFACE) C IF (ICUT.EQ.0) THEN PHI0=(9.*VSINT(1,1)-VSINT(1,2))/8. ELSE PHI0=VSINT(1,ICUT) END IF NBARR1=0 BARR(1)=chi+egap+PHI0 DO 100 J=1,NV IF (TIP(1,J)) GO TO 110 IF (ICUT.EQ.0) THEN BARR(J+1)=chi+egap+(9.*VAC(1,1,J)-VAC(1,2,J))/8. ELSE Z=SEP*J/FLOAT(NV) JP=Z/DELV(ICUT) F=(Z-JP*DELV(ICUT))/DELV(ICUT) IF (JP.EQ.0) THEN BARR(J+1)=chi+egap+VSINT(1,ICUT)*(1.-F)+VAC(1,ICUT,JP+1)*F ELSE BARR(J+1)=chi+egap+VAC(1,ICUT,JP)*(1.-F)+VAC(1,ICUT,JP+1)*F END IF END IF 100 CONTINUE 110 BARR(J+1)=chi+egap+(BIAS+DELPHI) NBARR1=J+1 c c CONSTRUCT POTENTIAL PROFILE IN SEMICONDUCTOR c pmin=PHI0 pmax=PHI0 DO 500 J=1,NS IF (ICUT.EQ.0) THEN PROF(J)=(9.*SEM(1,1,J)-SEM(1,2,J))/8. ELSE PROF(J)=SEM(1,ICUT,J) END IF if (prof(j).lt.pmin) pmin=prof(j) if (prof(j).gt.pmax) pmax=prof(j) 500 CONTINUE IF (iwrit.eq.4) THEN write(6,*) 'phi0,pmin,pmax=',phi0,pmin,pmax write(16,*)'phi0,pmin,pmax=',phi0,pmin,pmax END IF RETURN END