The Elk Code
putevecfv.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2007 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
5 
6 subroutine putevecfv(fext,ik,evecfv)
7 use modmain
8 use modramdisk
9 implicit none
10 ! arguments
11 character(*), intent(in) :: fext
12 integer, intent(in) :: ik
13 complex(8), intent(in) :: evecfv(nmatmax,nstfv,nspnfv)
14 ! local variables
15 integer recl
16 character(256) fname
17 ! construct the filename
18 fname=trim(scrpath)//'EVECFV'//trim(fext)
19 !$OMP CRITICAL(u202)
20 ! write to RAM disk if required
21 if (ramdisk) &
22  call putrd(fname,ik,v1=vkl(1:3,ik),n1=nmatmax,n2=nstfv,n3=nspnfv, &
23  nzv=nmatmax*nstfv*nspnfv,zva=evecfv)
24 ! write to disk if required
25 if (wrtdisk) then
26 ! find the record length
27  inquire(iolength=recl) vkl(1:3,ik),nmatmax,nstfv,nspnfv,evecfv
28  open(202,file=fname,form='UNFORMATTED',access='DIRECT',recl=recl)
29  write(202,rec=ik) vkl(1:3,ik),nmatmax,nstfv,nspnfv,evecfv
30  close(202)
31 end if
32 !$OMP END CRITICAL(u202)
33 end subroutine
34 
character(256) scrpath
Definition: modmain.f90:1303
logical ramdisk
Definition: modramdisk.f90:9
logical wrtdisk
Definition: modramdisk.f90:15
subroutine putrd(fname, irec, n1, n2, n3, v1, v2, nrv, rva, nzv, zva)
Definition: modramdisk.f90:120
type(file_t), dimension(:), allocatable, private file
Definition: modramdisk.f90:29
subroutine putevecfv(fext, ik, evecfv)
Definition: putevecfv.f90:7
real(8), dimension(:,:), allocatable vkl
Definition: modmain.f90:474