The Elk Code
plotu1d.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 
6 subroutine plotu1d(fnum1,fnum2,nf,zfmt,zfir)
7 use modmain
8 implicit none
9 ! arguments
10 integer, intent(in) :: fnum1,fnum2,nf
11 complex(8), intent(in) :: zfmt(npcmtmax,natmtot,nf,nfqrz)
12 complex(8), intent(in) :: zfir(ngtot,nf,nfqrz)
13 ! local variables
14 integer jf,ip,iv
15 real(8) fmin,fmax,t1
16 ! allocatable arrays
17 real(8), allocatable :: fp(:,:)
18 if ((nf < 1).or.(nf > 4)) then
19  write(*,*)
20  write(*,'("Error(plotu1d): invalid number of functions : ",I8)') nf
21  write(*,*)
22  stop
23 end if
24 allocate(fp(npp1d,nf))
25 ! connect the 1D plotting vertices
27 ! evaluate function at each point
28 call plotulr(npp1d,vplp1d,nf,zfmt,zfir,fp)
29 do ip=ip01d,npp1d
30 ! write the point distances and function to file
31  write(fnum1,'(5G18.10)') dpp1d(ip),(fp(ip,jf),jf=1,nf)
32 end do
33 ! write the vertex location lines
34 fmin=minval(fp(:,:))
35 fmax=maxval(fp(:,:))
36 t1=0.5d0*(fmax-fmin)
37 fmin=fmin-t1
38 fmax=fmax+t1
39 do iv=1,nvp1d
40  write(fnum2,'(2G18.10)') dvp1d(iv),fmin
41  write(fnum2,'(2G18.10)') dvp1d(iv),fmax
42  write(fnum2,*)
43 end do
44 deallocate(fp)
45 end subroutine
46 
subroutine plotulr(np, vpl, nf, zfmt, zfir, fp)
Definition: plotulr.f90:7
real(8), dimension(:), allocatable dpp1d
Definition: modmain.f90:1126
real(8), dimension(:), allocatable dvp1d
Definition: modmain.f90:1122
real(8), dimension(3, 3) avec
Definition: modmain.f90:12
subroutine plotpt1d(cvec, nv, np, vvl, vpl, dv, dp)
Definition: plotpt1d.f90:10
integer ip01d
Definition: modmain.f90:1118
real(8), dimension(:,:), allocatable vvlp1d
Definition: modmain.f90:1120
subroutine plotu1d(fnum1, fnum2, nf, zfmt, zfir)
Definition: plotu1d.f90:7
integer nvp1d
Definition: modmain.f90:1114
integer npp1d
Definition: modmain.f90:1116
real(8), dimension(:,:), allocatable vplp1d
Definition: modmain.f90:1124