The Elk Code
rfmtsm.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2013 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 rfmtsm(m,nr,nri,rfmt)
7 use modmain
8 implicit none
9 ! arguments
10 integer, intent(in) :: m,nr,nri
11 real(8), intent(inout) :: rfmt(*)
12 ! local variables
13 integer nro,iro,lm
14 integer i1,j0,j1
15 ! automatic arrays
16 real(8) fr(nr)
17 if (m < 1) return
18 nro=nr-nri
19 iro=nri+1
20 do lm=1,lmmaxi
21  i1=lmmaxi*(nri-1)+lm
22  j0=i1+lmmaxi
23  j1=lmmaxo*(nr-iro)+j0
24  fr(1:nri)=rfmt(lm:i1:lmmaxi)
25  fr(iro:nr)=rfmt(j0:j1:lmmaxo)
26  call fsmooth(m,nr,fr)
27  rfmt(lm:i1:lmmaxi)=fr(1:nri)
28  rfmt(j0:j1:lmmaxo)=fr(iro:nr)
29 end do
30 do lm=lmmaxi+1,lmmaxo
31  j0=lmmaxi*nri+lm
32  j1=lmmaxo*(nr-iro)+j0
33  fr(iro:nr)=rfmt(j0:j1:lmmaxo)
34  call fsmooth(m,nro,fr(iro))
35  rfmt(j0:j1:lmmaxo)=fr(iro:nr)
36 end do
37 end subroutine
38 
integer lmmaxo
Definition: modmain.f90:203
pure subroutine fsmooth(m, n, f)
Definition: fsmooth.f90:10
subroutine rfmtsm(m, nr, nri, rfmt)
Definition: rfmtsm.f90:7
integer lmmaxi
Definition: modmain.f90:207