The Elk Code
Loading...
Searching...
No Matches
rhomagsh.f90
Go to the documentation of this file.
1
2
! Copyright (C) 2009 J. K. Dewhurst, S. Sharma and E. K. U. Gross
3
! This file is distributed under the terms of the GNU Lesser General Public
4
! License. See the file COPYING for license details.
5
6
!BOP
7
! !ROUTINE: rhomagsh
8
! !INTERFACE:
9
subroutine
rhomagsh
10
! !USES:
11
use
modmain
12
use
modomp
13
! !DESCRIPTION:
14
! Converts the muffin-tin density and magnetisation from spherical coordinates
15
! to a spherical harmonic expansion. See {\tt rhomagk}.
16
!
17
! !REVISION HISTORY:
18
! Created January 2009 (JKD)
19
!EOP
20
!BOC
21
implicit none
22
! local variables
23
integer
idm,is,ias,nthd
24
call
holdthd
(2*
natmtot
,nthd)
25
!$OMP PARALLEL DEFAULT(SHARED) &
26
!$OMP PRIVATE(ias,is,idm) &
27
!$OMP NUM_THREADS(nthd)
28
!$OMP DO SCHEDULE(DYNAMIC)
29
do
ias=1,
natmtot
30
is=
idxis
(ias)
31
! convert the density to spherical harmonics
32
call
rfshtip
(
nrcmt
(is),
nrcmti
(is),
rhomt
(:,ias))
33
end do
34
!$OMP END DO NOWAIT
35
do
idm=1,
ndmag
36
!$OMP DO SCHEDULE(DYNAMIC)
37
do
ias=1,
natmtot
38
is=
idxis
(ias)
39
! convert the magnetisation to spherical harmonics
40
call
rfshtip
(
nrcmt
(is),
nrcmti
(is),
magmt
(:,ias,idm))
41
end do
42
!$OMP END DO NOWAIT
43
end do
44
!$OMP END PARALLEL
45
call
freethd
(nthd)
46
end subroutine
47
!EOC
48
modmain
Definition
modmain.f90:6
modmain::magmt
real(8), dimension(:,:,:), pointer, contiguous magmt
Definition
modmain.f90:616
modmain::nrcmt
integer, dimension(maxspecies) nrcmt
Definition
modmain.f90:173
modmain::idxis
integer, dimension(maxatoms *maxspecies) idxis
Definition
modmain.f90:44
modmain::natmtot
integer natmtot
Definition
modmain.f90:40
modmain::rhomt
real(8), dimension(:,:), pointer, contiguous rhomt
Definition
modmain.f90:614
modmain::nrcmti
integer, dimension(maxspecies) nrcmti
Definition
modmain.f90:211
modmain::ndmag
integer ndmag
Definition
modmain.f90:238
modomp
Definition
modomp.f90:6
modomp::holdthd
subroutine holdthd(nloop, nthd)
Definition
modomp.f90:78
modomp::freethd
subroutine freethd(nthd)
Definition
modomp.f90:106
rfshtip
subroutine rfshtip(nr, nri, rfmt)
Definition
rfshtip.f90:7
rhomagsh
subroutine rhomagsh
Definition
rhomagsh.f90:10
rhomagsh.f90
Generated by
1.9.8