File: writesf.f90

package info (click to toggle)
elkcode 5.4.24-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 12,840 kB
  • sloc: f90: 48,415; fortran: 22,457; perl: 965; makefile: 384; sh: 369; python: 105; ansic: 67
file content (33 lines) | stat: -rw-r--r-- 903 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

! Copyright (C) 2009 J. K. Dewhurst, S. Sharma and E. K. U. Gross
! This file is distributed under the terms of the GNU Lesser General Public
! License. See the file COPYING for license details.

subroutine writesf
use modmain
implicit none
! local variables
integer iw
! width of plotting interval in units of swidth
real(8), parameter :: swf=10.d0
real(8) dw,w,x
! external functions
real(8) sdelta,stheta
external sdelta,stheta
open(50,file='SDELTA.OUT',form='FORMATTED')
open(51,file='STHETA.OUT',form='FORMATTED')
dw=(2.d0*swf*swidth)/dble(nwplot-1)
do iw=1,nwplot
  w=-swf*swidth+dw*dble(iw-1)
  x=w/swidth
  write(50,'(2G18.10)') w,sdelta(stype,x)/swidth
  write(51,'(2G18.10)') w,stheta(stype,x)
end do
close(50)
close(51)
write(*,*)
write(*,'("Info(writesf): smooth Dirac delta and Heaviside functions written")')
write(*,'(" SDELTA.OUT and STHETA.OUT, respectively")')
return
end subroutine