The Elk Code
drhomagsh.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2010 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 drhomagsh
7 use modmain
8 use modphonon
9 use modomp
10 implicit none
11 ! local variables
12 integer idm,is,ias,nthd
13 call holdthd(2*natmtot,nthd)
14 !$OMP PARALLEL DEFAULT(SHARED) &
15 !$OMP PRIVATE(is,idm) &
16 !$OMP NUM_THREADS(nthd)
17 !$OMP DO SCHEDULE(DYNAMIC)
18 do ias=1,natmtot
19  is=idxis(ias)
20 ! convert the density derivative to spherical harmonics
21  call zfshtip(nrcmt(is),nrcmti(is),drhomt(:,ias))
22 end do
23 !$OMP END DO NOWAIT
24 do idm=1,ndmag
25 !$OMP DO SCHEDULE(DYNAMIC)
26  do ias=1,natmtot
27  is=idxis(ias)
28 ! convert the magnetisation derivative to spherical harmonics
29  call zfshtip(nrcmt(is),nrcmti(is),dmagmt(:,ias,idm))
30  end do
31 !$OMP END DO
32 end do
33 !$OMP END PARALLEL
34 call freethd(nthd)
35 end subroutine
36 
complex(8), dimension(:,:), pointer, contiguous drhomt
Definition: modphonon.f90:100
integer ndmag
Definition: modmain.f90:238
Definition: modomp.f90:6
complex(8), dimension(:,:,:), pointer, contiguous dmagmt
Definition: modphonon.f90:102
subroutine zfshtip(nr, nri, zfmt)
Definition: zfshtip.f90:7
subroutine drhomagsh
Definition: drhomagsh.f90:7
integer, dimension(maxatoms *maxspecies) idxis
Definition: modmain.f90:44
subroutine freethd(nthd)
Definition: modomp.f90:106
subroutine holdthd(nloop, nthd)
Definition: modomp.f90:78
integer natmtot
Definition: modmain.f90:40
integer, dimension(maxspecies) nrcmt
Definition: modmain.f90:173
integer, dimension(maxspecies) nrcmti
Definition: modmain.f90:211