The Elk Code
k_tfsc1.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2025 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 elemental subroutine k_tfsc1(rho,tau,dtdr)
7 implicit none
8 ! arguments
9 real(8), intent(in) :: rho,tau
10 real(8), intent(out) :: dtdr
11 ! local variables
12 real(8), parameter :: pi=3.1415926535897932385d0
13 ! Thomas-Fermi coefficient
14 real(8), parameter :: ctf=(3.d0/10.d0)*(3.d0*pi**2)**(2.d0/3.d0)
15 real(8) ttf
16 if (rho < 1.d-20) then
17  dtdr=0.d0
18  return
19 end if
20 ! Thomas-Fermi τ
21 ttf=ctf*rho**(5.d0/3.d0)
22 ! δτ(r')/δρ(r) scaled by the ratio of the exact τ to the TF τ
23 dtdr=(tau/ttf)*ctf*(5.d0/3.d0)*rho**(2.d0/3.d0)
24 end subroutine
25 
elemental subroutine k_tfsc1(rho, tau, dtdr)
Definition: k_tfsc1.f90:7