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:
9subroutine rhomagsh
10! !USES:
11use modmain
12use 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
21implicit none
22! local variables
23integer idm,is,ias,nthd
24call 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)
29do ias=1,natmtot
30 is=idxis(ias)
31! convert the density to spherical harmonics
32 call rfshtip(nrcmt(is),nrcmti(is),rhomt(:,ias))
33end do
34!$OMP END DO NOWAIT
35do 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
43end do
44!$OMP END PARALLEL
45call freethd(nthd)
46end subroutine
47!EOC
48
real(8), dimension(:,:,:), pointer, contiguous magmt
Definition modmain.f90:616
integer, dimension(maxspecies) nrcmt
Definition modmain.f90:173
integer, dimension(maxatoms *maxspecies) idxis
Definition modmain.f90:44
integer natmtot
Definition modmain.f90:40
real(8), dimension(:,:), pointer, contiguous rhomt
Definition modmain.f90:614
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
subroutine rfshtip(nr, nri, rfmt)
Definition rfshtip.f90:7
subroutine rhomagsh
Definition rhomagsh.f90:10