The Elk Code
 
Loading...
Searching...
No Matches
plot1d.f90
Go to the documentation of this file.
1
2! Copyright (C) 2002-2005 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6!BOP
7! !ROUTINE: plot1d
8! !INTERFACE:
9subroutine plot1d(fnum1,fnum2,nf,rfmt,rfir)
10! !USES:
11use modmain
12! !INPUT/OUTPUT PARAMETERS:
13! fnum1 : plot file number (in,integer)
14! fnum2 : vertex location file number (in,integer)
15! nf : number of functions (in,integer)
16! rfmt : real muffin-tin function (in,real(npmtmax,natmtot,nf))
17! rfir : real intersitial function (in,real(ngtot,nf))
18! !DESCRIPTION:
19! Produces a 1D plot of the real functions contained in arrays {\tt rfmt} and
20! {\tt rfir} along the lines connecting the vertices in the global array
21! {\tt vvlp1d}. See routine {\tt rfpts}.
22!
23! !REVISION HISTORY:
24! Created June 2003 (JKD)
25!EOP
26!BOC
27implicit none
28! arguments
29integer, intent(in) :: fnum1,fnum2,nf
30real(8), intent(in) :: rfmt(npmtmax,natmtot,nf),rfir(ngtot,nf)
31! local variables
32integer jf,ip,iv
33real(8) fmin,fmax,t1
34! allocatable arrays
35real(8), allocatable :: fp(:,:)
36if ((nf < 1).or.(nf > 4)) then
37 write(*,*)
38 write(*,'("Error(plot1d): invalid number of functions : ",I8)') nf
39 write(*,*)
40 stop
41end if
42allocate(fp(npp1d,nf))
43! connect the 1D plotting vertices
45do jf=1,nf
46! evaluate real function at each point
47 call rfpts(npp1d,vplp1d,rfmt(:,:,jf),rfir(:,jf),fp(:,jf))
48end do
49do ip=ip01d,npp1d
50! write the point distances and function to file
51 write(fnum1,'(5G18.10)') dpp1d(ip),(fp(ip,jf),jf=1,nf)
52end do
53! write the vertex location lines
54fmin=minval(fp(:,:))
55fmax=maxval(fp(:,:))
56t1=0.5d0*(fmax-fmin)
57fmin=fmin-t1
58fmax=fmax+t1
59do iv=1,nvp1d
60 write(fnum2,'(2G18.10)') dvp1d(iv),fmin
61 write(fnum2,'(2G18.10)') dvp1d(iv),fmax
62 write(fnum2,*)
63end do
64deallocate(fp)
65end subroutine
66!EOC
67
integer npp1d
Definition modmain.f90:1113
integer nvp1d
Definition modmain.f90:1111
real(8), dimension(:,:), allocatable vvlp1d
Definition modmain.f90:1117
integer ip01d
Definition modmain.f90:1115
real(8), dimension(3, 3) avec
Definition modmain.f90:12
real(8), dimension(:,:), allocatable vplp1d
Definition modmain.f90:1121
real(8), dimension(:), allocatable dvp1d
Definition modmain.f90:1119
real(8), dimension(:), allocatable dpp1d
Definition modmain.f90:1123
subroutine plot1d(fnum1, fnum2, nf, rfmt, rfir)
Definition plot1d.f90:10
subroutine plotpt1d(cvec, nv, np, vvl, vpl, dv, dp)
Definition plotpt1d.f90:10
subroutine rfpts(np, vpl, rfmt, rfir, fp)
Definition rfpts.f90:7