The Elk Code
 
Loading...
Searching...
No Matches
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
6subroutine writesf
7use modmain
8implicit none
9! local variables
10integer iw
11! width of plotting interval in units of swidth
12real(8), parameter :: swf=10.d0
13real(8) dw,w,x
14! external functions
15real(8), external :: sdelta,stheta
16open(50,file='SDELTA.OUT',form='FORMATTED',action='WRITE')
17open(51,file='STHETA.OUT',form='FORMATTED',action='WRITE')
18dw=(2.d0*swf*swidth)/dble(nwplot-1)
19do 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)
24end do
25close(50)
26close(51)
27write(*,*)
28write(*,'("Info(writesf): smooth Dirac delta and Heaviside functions written")')
29write(*,'(" SDELTA.OUT and STHETA.OUT, respectively")')
30end subroutine
31
integer nwplot
Definition modmain.f90:1070
real(8) swidth
Definition modmain.f90:892
integer stype
Definition modmain.f90:888
real(8) function sdelta(stype, x)
Definition sdelta.f90:10
real(8) function stheta(stype, x)
Definition stheta.f90:10
subroutine writesf
Definition writesf.f90:7