The Elk Code
 
Loading...
Searching...
No Matches
stheta_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: stheta_fd
8! !INTERFACE:
9elemental real(8) function stheta_fd(x)
10! !INPUT/OUTPUT PARAMETERS:
11! x : real argument (in,real)
12! !DESCRIPTION:
13! Returns the Fermi-Dirac approximation to the Heaviside step function
14! $$ \tilde\Theta(x)=\frac{1}{1+e^{-x}}. $$
15!
16! !REVISION HISTORY:
17! Created April 2003 (JKD)
18!EOP
19!BOC
20implicit none
21! arguments
22real(8), intent(in) :: x
23if (x > 50.d0) then
24 stheta_fd=1.d0
25else if (x < -50.d0) then
26 stheta_fd=0.d0
27else
28 stheta_fd=1.d0/(1.d0+exp(-x))
29end if
30end function
31!EOC
32
elemental real(8) function stheta_fd(x)
Definition stheta_fd.f90:10