The Elk Code
 
Loading...
Searching...
No Matches
putevalfv.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
6subroutine putevalfv(fext,ik,evalfv)
7use modmain
9implicit none
10! arguments
11character(*), intent(in) :: fext
12integer, intent(in) :: ik
13real(8), intent(in) :: evalfv(nstfv,nspnfv)
14! local variables
15integer recl
16character(256) fname
17! construct the filename
18fname='EVALFV'//trim(fext)
19!$OMP CRITICAL(u200)
20! write to RAM disk if required
21if (ramdisk) then
22 call putrd(fname,ik,v1=vkl(1:3,ik),n1=nstfv,n2=nspnfv,nrv=nstfv*nspnfv, &
23 rva=evalfv)
24end if
25! write to disk if required
26if (wrtdsk) then
27! find the record length
28 inquire(iolength=recl) vkl(1:3,ik),nstfv,nspnfv,evalfv
29 open(200,file=fname,form='UNFORMATTED',access='DIRECT',recl=recl)
30 write(200,rec=ik) vkl(1:3,ik),nstfv,nspnfv,evalfv
31 close(200)
32end if
33!$OMP END CRITICAL(u200)
34end subroutine
35
real(8), dimension(:,:), allocatable vkl
Definition modmain.f90:471
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 putevalfv(fext, ik, evalfv)
Definition putevalfv.f90:7