The Elk Code
sfuadd.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2025 Wenhan Chen, J. K. Dewhurst and S. Sharma.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
5 
6 subroutine sfuadd(ik0,w,chkpa,sfu)
7 use modmain
8 use modulr
9 implicit none
10 ! arguments
11 integer, intent(in) :: ik0
12 real(8), intent(in) :: w(nwplot),chkpa(nstulr)
13 real(8), intent(inout) :: sfu(nwplot)
14 ! local variables
15 integer ist,iw
16 real(8) e,x,t0,t1
17 ! external functions
18 real(8), external :: sdelta_lr
19 t0=1.d0/swidth
20 do ist=1,nstulr
21  e=evalu(ist,ik0)-efermi
22  t1=t0*chkpa(ist)
23  do iw=1,nwplot
24  x=(e-w(iw))*t0
25  sfu(iw)=sfu(iw)+t1*sdelta_lr(x)
26  end do
27 end do
28 end subroutine
29 
real(8) efermi
Definition: modmain.f90:907
real(8) swidth
Definition: modmain.f90:895
Definition: modulr.f90:6
real(8), dimension(:,:), allocatable evalu
Definition: modulr.f90:97
subroutine sfuadd(ik0, w, chkpa, sfu)
Definition: sfuadd.f90:7