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:
9
elemental
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
20
implicit none
21
! arguments
22
real
(8),
intent(in)
:: x
23
if
(x > 50.d0)
then
24
stheta_fd
=1.d0
25
else
if
(x < -50.d0)
then
26
stheta_fd
=0.d0
27
else
28
stheta_fd
=1.d0/(1.d0+exp(-x))
29
end if
30
end function
31
!EOC
32
stheta_fd
elemental real(8) function stheta_fd(x)
Definition
stheta_fd.f90:10
stheta_fd.f90
Generated by
1.9.8