The Elk Code
 
Loading...
Searching...
No Matches
rhouplot.f90
Go to the documentation of this file.
1
2! Copyright (C) 2019 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 rhouplot
7use modmain
8use modulr
9use modomp
10implicit none
11! local variables
12integer ifq,nthd
13! allocatable arrays
14complex(8), allocatable :: rhoqir_(:,:)
15! initialise universal variables
16call init0
17call init1
18! initialise the ultra long-range variables
19call initulr
20! read in the density from STATE_ULR.OUT
21call readstulr
22! convert interstitial density from coarse to fine grid
23allocate(rhoqir_(ngtot,nfqrz))
24call holdthd(nfqrz,nthd)
25!$OMP PARALLEL DO DEFAULT(SHARED) &
26!$OMP SCHEDULE(DYNAMIC) &
27!$OMP NUM_THREADS(nthd)
28do ifq=1,nfqrz
29 call zfirctof(rhoqir(:,ifq),rhoqir_(:,ifq))
30end do
31!$OMP END PARALLEL DO
32call freethd(nthd)
33! write the density plot to file
34select case(task)
35case(731)
36 open(50,file='RHOU1D.OUT',form='FORMATTED')
37 open(51,file='RHOULINES.OUT',form='FORMATTED')
38 call plotu1d(50,51,1,rhoqmt,rhoqir_)
39 close(50)
40 close(51)
41 write(*,*)
42 write(*,'("Info(rhouplot):")')
43 write(*,'(" 1D ultra long-range density plot written to RHOU1D.OUT")')
44 write(*,'(" vertex location lines written to RHOULINES.OUT")')
45case(732)
46 open(50,file='RHOU2D.OUT',form='FORMATTED')
47 call plotu2d(.false.,50,1,rhoqmt,rhoqir_)
48 close(50)
49 write(*,*)
50 write(*,'("Info(rhouplot): 2D ultra long-range density plot written to &
51 &RHOU2D.OUT")')
52case(733)
53 open(50,file='RHOU3D.OUT',form='FORMATTED')
54 call plotu3d(50,1,rhoqmt,rhoqir_)
55 close(50)
56 write(*,*)
57 write(*,'("Info(rhouplot): 3D ultra long-range density plot written to &
58 &RHOU3D.OUT")')
59end select
60deallocate(rhoqir_)
61end subroutine
62
subroutine init0
Definition init0.f90:10
subroutine init1
Definition init1.f90:10
subroutine initulr
Definition initulr.f90:7
integer ngtot
Definition modmain.f90:390
integer nfqrz
Definition modmain.f90:539
integer task
Definition modmain.f90:1298
subroutine holdthd(nloop, nthd)
Definition modomp.f90:78
subroutine freethd(nthd)
Definition modomp.f90:106
complex(8), dimension(:,:,:), allocatable rhoqmt
Definition modulr.f90:59
complex(8), dimension(:,:), allocatable rhoqir
Definition modulr.f90:59
subroutine plotu1d(fnum1, fnum2, nf, zfmt, zfir)
Definition plotu1d.f90:7
subroutine plotu2d(tproj, fnum, nf, zfmt, zfir)
Definition plotu2d.f90:7
subroutine plotu3d(fnum, nf, zfmt, zfir)
Definition plotu3d.f90:7
subroutine readstulr
Definition readstulr.f90:7
subroutine rhouplot
Definition rhouplot.f90:7
subroutine zfirctof(zfirc, zfir)
Definition zfirctof.f90:7