"Subroutine callspecgeneration(nnode,x,y,eg,generation)" 修訂間的差異

出自 DDCC TCAD TOOL Manual
前往: 導覽搜尋
(已建立頁面,內容為 " subroutine callspecgeneration(nnode,x,y,eg,generation) use nrtype ,only : dp,i4b,i8b use global2d implicit none integer(i8b), intent(in) :: nnode real(dp) , i...")
 
 
行 1: 行 1:
  +
This function is activated by [[$usegenspecfunc]]. It is similar to [[Subroutine callgeneration(x,y,z,generation,ind)]] <br>
  +
However, it is sending the whole x,y, and generation matrix. Not the single value.
  +
  +
 
subroutine callspecgeneration(nnode,x,y,eg,generation)
 
subroutine callspecgeneration(nnode,x,y,eg,generation)
 
use nrtype ,only : dp,i4b,i8b
 
use nrtype ,only : dp,i4b,i8b
 
use global2d
 
use global2d
 
implicit none
 
implicit none
integer(i8b), intent(in) :: nnode
+
integer(i8b), intent(in) :: nnode ! total node number
real(dp) , intent(inout) :: x(nnode),y(nnode),eg(nnode),generation(nnode)
+
real(dp) , intent(inout) :: x(nnode),y(nnode),eg(nnode),generation(nnode) ! matrix x, matrix y, Bandgap, and generation
  +
real(dp) :: xp,yp,bandgap
 
integer :: i,j
 
integer :: i,j
 
do i=1,nnode
 
do i=1,nnode
generation(i)=0.0_dp
+
xp=x(i)
  +
yp=y(i)
  +
bandgap=eg(i)
  +
if(xp>2.0 .and. xp<3.0) then
  +
generation(i)=0.0_dp
  +
end if
 
end do
 
end do
print*, "You should not call 2D-ddcc.exe to run callspecgeneration. You should use 2D-ddcc-dyna.exe to run it."
 
  +
!print*, " This function usually for solar cell application where its generation rate will be related to the bandgap.
stop
 
 
!print*, "You should not call 2D-ddcc.exe to run callspecgeneration. You should use 2D-ddcc-dyna.exe to run it."
 
!stop
 
end subroutine
 
end subroutine

於 2017年8月27日 (日) 23:05 的最新修訂

This function is activated by $usegenspecfunc. It is similar to Subroutine callgeneration(x,y,z,generation,ind)
However, it is sending the whole x,y, and generation matrix. Not the single value.


subroutine callspecgeneration(nnode,x,y,eg,generation) 
use nrtype ,only : dp,i4b,i8b
use global2d
implicit none
integer(i8b), intent(in) :: nnode  ! total node number
real(dp) , intent(inout) :: x(nnode),y(nnode),eg(nnode),generation(nnode)  ! matrix x, matrix y, Bandgap, and generation
real(dp) :: xp,yp,bandgap
integer :: i,j 
do i=1,nnode
   xp=x(i)
   yp=y(i)
   bandgap=eg(i)
   if(xp>2.0 .and. xp<3.0) then
      generation(i)=0.0_dp
   end if
end do
!print*, " This function usually for solar cell application where its generation rate will be related to the bandgap. 
!print*, "You should not call 2D-ddcc.exe  to run callspecgeneration. You should use 2D-ddcc-dyna.exe to run it."
!stop
end subroutine