The Elk Code
zfmtpack.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2016 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 pure subroutine zfmtpack(tpack,nr,nri,zfmt1,zfmt2)
7 use modmain
8 implicit none
9 ! arguments
10 logical, intent(in) :: tpack
11 integer, intent(in) :: nr,nri
12 complex(8), intent(in) :: zfmt1(*)
13 complex(8), intent(out) :: zfmt2(*)
14 ! local variables
15 integer ir,i,j,k,n
16 n=lmmaxi-1
17 i=1
18 j=1
19 if (tpack) then
20  do ir=1,nri
21  zfmt2(j:j+n)=zfmt1(i:i+n)
22  i=i+lmmaxo
23  j=j+lmmaxi
24  end do
25 else
26  do ir=1,nri
27  zfmt2(j:j+n)=zfmt1(i:i+n)
28  i=i+lmmaxi
29  k=j+lmmaxi
30  j=j+lmmaxo
31  zfmt2(k:j-1)=0.d0
32  end do
33 end if
34 n=lmmaxo*(nr-nri)-1
35 zfmt2(j:j+n)=zfmt1(i:i+n)
36 end subroutine
37 
integer lmmaxo
Definition: modmain.f90:203
pure subroutine zfmtpack(tpack, nr, nri, zfmt1, zfmt2)
Definition: zfmtpack.f90:7
integer lmmaxi
Definition: modmain.f90:207