The Elk Code
sdelta_fd.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2002-2005 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3 ! This file is distributed under the terms of the GNU Lesser General Public
4 ! License. See the file COPYING for license details.
5 
6 !BOP
7 ! !ROUTINE: sdelta_fd
8 ! !INTERFACE:
9 elemental real(8) function sdelta_fd(x)
10 ! !INPUT/OUTPUT PARAMETERS:
11 ! x : real argument (in,real)
12 ! !DESCRIPTION:
13 ! Returns the Fermi-Dirac approximation to the Dirac delta function
14 ! $$ \tilde\delta(x)=\frac{e^{-x}}{(1+e^{-x})^2}. $$
15 !
16 ! !REVISION HISTORY:
17 ! Created April 2003 (JKD)
18 !EOP
19 !BOC
20 implicit none
21 ! arguments
22 real(8), intent(in) :: x
23 ! local variables
24 real(8) t1
25 if (abs(x) > 50.d0) then
26  sdelta_fd=0.d0
27 else
28  t1=exp(-x)
29  sdelta_fd=t1/((1.d0+t1)**2)
30 end if
31 end function
32 !EOC
33 
elemental real(8) function sdelta_fd(x)
Definition: sdelta_fd.f90:10