File: hmlfv.f90

package info (click to toggle)
elkcode 5.4.24-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 12,840 kB
  • sloc: f90: 48,415; fortran: 22,457; perl: 965; makefile: 384; sh: 369; python: 105; ansic: 67
file content (47 lines) | stat: -rw-r--r-- 1,192 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

! Copyright (C) 2018 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
! This file is distributed under the terms of the GNU General Public License.
! See the file COPYING for license details.

subroutine hmlfv(nmatp,ngp,igpig,vgpc,apwalm,h)
use modmain
use modomp
implicit none
! arguments
integer, intent(in) :: nmatp,ngp,igpig(ngkmax)
real(8), intent(in) :: vgpc(3,ngkmax)
complex(8), intent(in) :: apwalm(ngkmax,apwordmax,lmmaxapw,natmtot)
complex(8), intent(out) :: h(nmatp,nmatp)
! local variables
integer ias,i
integer nthd1,nthd2
! zero the upper triangular part of the matrix
do i=1,nmatp
  h(1:i,i)=0.d0
end do
call omp_hold(2,nthd1)
!$OMP PARALLEL SECTIONS DEFAULT(SHARED) &
!$OMP PRIVATE(ias) &
!$OMP NUM_THREADS(nthd1)
!$OMP SECTION
do ias=1,natmtot
  call hmlaa(ias,ngp,apwalm(:,:,:,ias),nmatp,h)
end do
call hmlistl(ngp,igpig,vgpc,nmatp,h)
!$OMP SECTION
call omp_hold(natmtot,nthd2)
!$OMP PARALLEL DEFAULT(SHARED) &
!$OMP NUM_THREADS(nthd2)
!$OMP DO
do ias=1,natmtot
  call hmlalo(ias,ngp,apwalm(:,:,:,ias),nmatp,h)
  call hmllolo(ias,ngp,nmatp,h)
end do
!$OMP END DO
!$OMP END PARALLEL
call omp_free(nthd2)
!$OMP END PARALLEL SECTIONS
call omp_free(nthd1)
return
end subroutine