The Elk Code
Loading...
Searching...
No Matches
rhomag.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
rhomag
7
use
modmain
8
use
modmpi
9
use
modomp
10
implicit none
11
! local variables
12
integer
nthd
13
! calculate the valence density and magnetisation
14
call
rhomagv
15
! add the core density and magnetisation to the total
16
call
rhocore
17
call
holdthd
(2,nthd)
18
!$OMP PARALLEL SECTIONS DEFAULT(SHARED) &
19
!$OMP NUM_THREADS(nthd)
20
!$OMP SECTION
21
! calculate the charges
22
call
charge
23
! normalise the density
24
call
rhonorm
25
!$OMP SECTION
26
! calculate the moments
27
if
(
spinpol
)
call
moment
28
!$OMP END PARALLEL SECTIONS
29
call
freethd
(nthd)
30
! synchronise MPI processes
31
call
mpi_barrier(
mpicom
,
ierror
)
32
end subroutine
33
charge
subroutine charge
Definition
charge.f90:10
moment
subroutine moment
Definition
moment.f90:10
modmain
Definition
modmain.f90:6
modmain::spinpol
logical spinpol
Definition
modmain.f90:228
modmpi
Definition
modmpi.f90:6
modmpi::ierror
integer ierror
Definition
modmpi.f90:19
modmpi::mpicom
integer mpicom
Definition
modmpi.f90:11
modomp
Definition
modomp.f90:6
modomp::holdthd
subroutine holdthd(nloop, nthd)
Definition
modomp.f90:78
modomp::freethd
subroutine freethd(nthd)
Definition
modomp.f90:106
rhocore
subroutine rhocore
Definition
rhocore.f90:10
rhomag
subroutine rhomag
Definition
rhomag.f90:7
rhomagv
subroutine rhomagv
Definition
rhomagv.f90:7
rhonorm
subroutine rhonorm
Definition
rhonorm.f90:10
rhomag.f90
Generated by
1.9.8