The Elk Code
 
Loading...
Searching...
No Matches
sdelta_sq.f90
Go to the documentation of this file.
1
2! Copyright (C) 2008 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_sq
8! !INTERFACE:
9elemental real(8) function sdelta_sq(x)
10! !INPUT/OUTPUT PARAMETERS:
11! x : real argument (in,real)
12! !DESCRIPTION:
13! Returns the square-wave pulse approximation to the Dirac delta function
14! $$ \tilde\delta(x)=\left\{\begin{array}{ll}
15! 1 & \quad |x|\le 1/2 \\
16! 0 & \quad |x|>1/2 \end{array}\right. $$
17!
18! !REVISION HISTORY:
19! Created July 2008 (JKD)
20!EOP
21!BOC
22implicit none
23! arguments
24real(8), intent(in) :: x
25if (abs(x) <= 0.5d0) then
26 sdelta_sq=1.d0
27else
28 sdelta_sq=0.d0
29end if
30end function
31!EOC
32
elemental real(8) function sdelta_sq(x)
Definition sdelta_sq.f90:10