The Elk Code
 
Loading...
Searching...
No Matches
rfmtpack.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 rfmtpack(tpack,nr,nri,rfmt1,rfmt2)
7use modmain
8implicit none
9! arguments
10logical, intent(in) :: tpack
11integer, intent(in) :: nr,nri
12real(8), intent(in) :: rfmt1(*)
13real(8), intent(out) :: rfmt2(*)
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 rfmt2(j:j+n)=rfmt1(i:i+n)
22 i=i+lmmaxo
23 j=j+lmmaxi
24 end do
25else
26 do ir=1,nri
27 rfmt2(j:j+n)=rfmt1(i:i+n)
28 i=i+lmmaxi
29 k=j+lmmaxi
30 j=j+lmmaxo
31 rfmt2(k:j-1)=0.d0
32 end do
33end if
34n=lmmaxo*(nr-nri)-1
35rfmt2(j:j+n)=rfmt1(i:i+n)
36end subroutine
37
integer lmmaxi
Definition modmain.f90:207
integer lmmaxo
Definition modmain.f90:203
pure subroutine rfmtpack(tpack, nr, nri, rfmt1, rfmt2)
Definition rfmtpack.f90:7