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