The Elk Code
jprplot.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2018 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 jprplot
7 use modmain
8 use modmpi
9 implicit none
10 ! initialise universal variables
11 call init0
12 call init1
13 ! read density and potentials from file
14 call readstate
15 ! generate the core wavefunctions and densities
16 call gencore
17 ! find the new linearisation energies
18 call linengy
19 ! generate the APW radial functions
20 call genapwfr
21 ! generate the local-orbital radial functions
22 call genlofr
23 ! get the occupation numbers from file
24 call readoccsv
25 ! compute the paramagnetic current density
26 call genjpr
27 ! plot the current density (master process only)
28 if (mp_mpi) then
29  write(*,*)
30  write(*,'("Info(jprplot):")')
31  select case(task)
32  case(371)
33  open(50,file='JPR1D.OUT',form='FORMATTED')
34  open(51,file='JPRLINES.OUT',form='FORMATTED')
35  call plot1d(50,51,3,jrmt,jrir)
36  close(50)
37  write(*,'(" 1D paramagnetic current density written to JPR1D.OUT")')
38  write(*,'(" vertex location lines written to JPRLINES.OUT")')
39  case(372)
40  open(50,file='JPR2D.OUT',form='FORMATTED')
41  call plot2d(.true.,50,3,jrmt,jrir)
42  close(50)
43  write(*,'(" 2D paramagnetic current density written to JPR2D.OUT")')
44  write(*,'(" Note that the 3D vector field has been locally projected")')
45  write(*,'(" onto the 2D plotting plane axes")')
46  case(373)
47  open(50,file='JPR3D.OUT',form='FORMATTED')
48  call plot3d(50,3,jrmt,jrir)
49  close(50)
50  write(*,'(" 3D paramagnetic current density written to JPR3D.OUT")')
51  end select
52 end if
53 end subroutine
54 
integer task
Definition: modmain.f90:1299
logical mp_mpi
Definition: modmpi.f90:17
subroutine genlofr
Definition: genlofr.f90:10
subroutine gencore
Definition: gencore.f90:10
subroutine plot3d(fnum, nf, rfmt, rfir)
Definition: plot3d.f90:10
subroutine readoccsv
Definition: readoccsv.f90:7
subroutine plot1d(fnum1, fnum2, nf, rfmt, rfir)
Definition: plot1d.f90:10
subroutine linengy
Definition: linengy.f90:10
subroutine plot2d(tproj, fnum, nf, rfmt, rfir)
Definition: plot2d.f90:10
subroutine init1
Definition: init1.f90:10
subroutine genapwfr
Definition: genapwfr.f90:10
Definition: modmpi.f90:6
subroutine readstate
Definition: readstate.f90:10
real(8), dimension(:,:,:), allocatable jrmt
Definition: modmain.f90:622
subroutine init0
Definition: init0.f90:10
subroutine genjpr
Definition: genjpr.f90:7
real(8), dimension(:,:), allocatable jrir
Definition: modmain.f90:622
subroutine jprplot
Definition: jprplot.f90:7