[Fortran] 纯文本查看 复制代码
INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(15,14)
INTEGER :: i, j
REAL (KIND=dp), ALLOCATABLE :: ev(:,:)
REAL (KIND=dp) :: fermi
REAL (KIND=dp) :: kb
REAL (KIND=dp) :: te
ei = (ev(i,j) - fermi) * (1.0d0 /(EXP((ev(i,j) - fermi)/kb / te) + 1.0d0))&
+ kb * te * DLOG(1.0d0 + EXP(0.0d0 - (ev(i,j) - fermi) /kb /te))
write (unit=*, fmt=*) 'kb', kb
write (unit=*, fmt=*) 'fermi', fermi
write (unit=*, fmt=*) 'te', te
write (unit=*, fmt=*) 'ev', ev(i,j)
write (unit=*, fmt=*) '(ev(i,j) - fermi)', (ev(i,j) - fermi)
write (unit=*, fmt=*) 'f_function', (1.0d0 /(EXP((ev(i,j) - fermi)/kb / te) + 1.0d0))
write (unit=*, fmt=*) 'EXP(0.0d0 - (ev(i,j) - fermi) /kb /te)', EXP(0.0d0 - (ev(i,j) - fermi) /kb /te)
write (unit=*, fmt=*) 'DLOG_function', DLOG(1.0d0 + EXP(0.0d0 - (ev(i,j) - fermi) /kb /te))
write (unit=*, fmt=*) 'ei=', ei