The Elk Code
 
Loading...
Searching...
No Matches
readepsw0.f90
Go to the documentation of this file.
1
2! Copyright (C) 2024 J. K. Dewhurst and S. Sharma.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine readepsw0
7use modmain
8use modphonon
9implicit none
10! local variables
11logical exist
12integer i,j
13real(8) w
14character(256) fname
15do j=1,3
16 do i=1,3
17 write(fname,'("EPSILON_",2I1,".OUT")') i,j
18 inquire(file=trim(fname),exist=exist)
19 if (.not.exist) then
20 write(*,*)
21 write(*,'("Error(readepsw0): file not found :")')
22 write(*,'(" ",A)') trim(fname)
23 write(*,*)
24 stop
25 end if
26 open(50,file=trim(fname),status='OLD',form='FORMATTED')
27 read(50,*) w,epsw0(i,j)
28 if (abs(w) > 1.d-8) then
29 write(*,*)
30 write(*,'("Error(readepsw0): first frequency should be zero")')
31 write(*,'(" in file ",A)') trim(fname)
32 write(*,*)
33 stop
34 end if
35 close(50)
36 end do
37end do
38! make dielectric tensor symmetric
39do j=1,3
40 do i=1,j-1
41 epsw0(i,j)=0.5d0*(epsw0(i,j)+epsw0(j,i))
42 epsw0(j,i)=epsw0(i,j)
43 end do
44end do
45end subroutine
46
real(8), dimension(3, 3) epsw0
Definition modphonon.f90:38
subroutine readepsw0
Definition readepsw0.f90:7