The Elk Code
 
Loading...
Searching...
No Matches
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
6pure subroutine zfmtpack(tpack,nr,nri,zfmt1,zfmt2)
7use modmain
8implicit none
9! arguments
10logical, intent(in) :: tpack
11integer, intent(in) :: nr,nri
12complex(8), intent(in) :: zfmt1(*)
13complex(8), intent(out) :: zfmt2(*)
14! local variables
15integer ir,i,j,k,n
16n=lmmaxi-1
17i=1
18j=1
19if (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
25else
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
33end if
34n=lmmaxo*(nr-nri)-1
35zfmt2(j:j+n)=zfmt1(i:i+n)
36end subroutine
37
integer lmmaxi
Definition modmain.f90:207
integer lmmaxo
Definition modmain.f90:203
pure subroutine zfmtpack(tpack, nr, nri, zfmt1, zfmt2)
Definition zfmtpack.f90:7