The Elk Code
 
Loading...
Searching...
No Matches
putdevecfv.f90
Go to the documentation of this file.
1
2! Copyright (C) 2013 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine putdevecfv(ik,devecfv)
7use modmain
8use modphonon
10implicit none
11! arguments
12integer, intent(in) :: ik
13complex(8), intent(in) :: devecfv(nmatmax,nstfv,nspnfv)
14! local variables
15integer recl
16character(256) fext,fname
17! construct the dynamical matrix file extension
18call dynfext(iqph,isph,iaph,ipph,fext)
19! construct filename
20fname=trim(scrpath)//'DEVECFV'//trim(fext)
21!$OMP CRITICAL(u222)
22! write to RAM disk if required
23if (ramdisk) then
24 call putrd(fname,ik,v1=vkl(1:3,ik),n1=nmatmax,n2=nstfv,n3=nspnfv, &
25 nzv=nmatmax*nstfv*nspnfv,zva=devecfv)
26end if
27! write to disk if required
28if (wrtdsk) then
29! find the record length
30 inquire(iolength=recl) vkl(1:3,ik),nmatmax,nstfv,nspnfv,devecfv
31 open(222,file=fname,form='UNFORMATTED',access='DIRECT',recl=recl)
32 write(222,rec=ik) vkl(1:3,ik),nmatmax,nstfv,nspnfv,devecfv
33 close(222)
34end if
35!$OMP END CRITICAL(u222)
36end subroutine
37
subroutine dynfext(iq, is, ia, ip, fext)
Definition dynfext.f90:7
character(256) scrpath
Definition modmain.f90:1302
real(8), dimension(:,:), allocatable vkl
Definition modmain.f90:471
integer iaph
Definition modphonon.f90:15
integer ipph
Definition modphonon.f90:15
integer iqph
Definition modphonon.f90:15
integer isph
Definition modphonon.f90:15
type(file_t), dimension(:), allocatable, private file
subroutine putrd(fname, irec, n1, n2, n3, v1, v2, nrv, rva, nzv, zva)
logical wrtdsk
logical ramdisk
Definition modramdisk.f90:9
subroutine putdevecfv(ik, devecfv)
Definition putdevecfv.f90:7