The Elk Code
 
Loading...
Searching...
No Matches
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:
9elemental 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
20implicit none
21! arguments
22real(8), intent(in) :: x
23! local variables
24real(8) t1
25if (abs(x) > 50.d0) then
26 sdelta_fd=0.d0
27else
28 t1=exp(-x)
29 sdelta_fd=t1/((1.d0+t1)**2)
30end if
31end function
32!EOC
33
elemental real(8) function sdelta_fd(x)
Definition sdelta_fd.f90:10