The Elk Code
writesf.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2009 J. K. Dewhurst, S. Sharma and E. K. U. Gross
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 subroutine writesf
7 use modmain
8 implicit none
9 ! local variables
10 integer iw
11 ! width of plotting interval in units of swidth
12 real(8), parameter :: swf=10.d0
13 real(8) dw,w,x
14 ! external functions
15 real(8), external :: sdelta,stheta
16 open(50,file='SDELTA.OUT',form='FORMATTED',action='WRITE')
17 open(51,file='STHETA.OUT',form='FORMATTED',action='WRITE')
18 dw=(2.d0*swf*swidth)/dble(nwplot-1)
19 do iw=1,nwplot
20  w=-swf*swidth+dw*dble(iw-1)
21  x=w/swidth
22  write(50,'(2G18.10)') w,sdelta(stype,x)/swidth
23  write(51,'(2G18.10)') w,stheta(stype,x)
24 end do
25 close(50)
26 close(51)
27 write(*,*)
28 write(*,'("Info(writesf): smooth Dirac delta and Heaviside functions written")')
29 write(*,'(" SDELTA.OUT and STHETA.OUT, respectively")')
30 end subroutine
31 
real(8) swidth
Definition: modmain.f90:895
subroutine writesf
Definition: writesf.f90:7
integer stype
Definition: modmain.f90:891
integer nwplot
Definition: modmain.f90:1073