The Elk Code
putpmat.f90
Go to the documentation of this file.
1
2
! Copyright (C) 2014 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
6
subroutine
putpmat
(ik,pmat)
7
use
modmain
8
use
modramdisk
9
implicit none
10
! arguments
11
integer
,
intent(in)
:: ik
12
complex(8)
,
intent(in)
:: pmat(nstsv,nstsv,3)
13
! local variables
14
integer
recl
15
! write the matrix elements in the second-variational basis
16
!$OMP CRITICAL(u230)
17
! write to RAM disk if required
18
if
(
ramdisk
) &
19
call
putrd
(
'PMAT.OUT'
,ik,v1=
vkl
(1:3,ik),n1=nstsv,nzv=nstsv*nstsv*3,zva=pmat)
20
! write to disk if required
21
if
(
wrtdisk
)
then
22
! determine the record length
23
inquire
(iolength=recl)
vkl
(1:3,1),nstsv,pmat
24
open
(230,
file
=
'PMAT.OUT'
,form=
'UNFORMATTED'
,access=
'DIRECT'
,recl=recl)
25
write
(230,rec=ik)
vkl
(1:3,ik),nstsv,pmat
26
close
(230)
27
end if
28
!$OMP END CRITICAL(u230)
29
end subroutine
30
modramdisk::ramdisk
logical ramdisk
Definition:
modramdisk.f90:9
modramdisk::wrtdisk
logical wrtdisk
Definition:
modramdisk.f90:15
modramdisk::putrd
subroutine putrd(fname, irec, n1, n2, n3, v1, v2, nrv, rva, nzv, zva)
Definition:
modramdisk.f90:120
modramdisk
Definition:
modramdisk.f90:6
modramdisk::file
type(file_t), dimension(:), allocatable, private file
Definition:
modramdisk.f90:29
modmain
Definition:
modmain.f90:6
modmain::vkl
real(8), dimension(:,:), allocatable vkl
Definition:
modmain.f90:474
putpmat
subroutine putpmat(ik, pmat)
Definition:
putpmat.f90:7
putpmat.f90
Generated by
1.8.14