The Elk Code
 
Loading...
Searching...
No Matches
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
6subroutine rfmtsm(m,nr,nri,rfmt)
7use modmain
8implicit none
9! arguments
10integer, intent(in) :: m,nr,nri
11real(8), intent(inout) :: rfmt(*)
12! local variables
13integer nro,iro,lm
14integer i1,j0,j1
15! automatic arrays
16real(8) fr(nr)
17if (m < 1) return
18nro=nr-nri
19iro=nri+1
20do 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)
29end do
30do 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)
36end do
37end subroutine
38
pure subroutine fsmooth(m, n, f)
Definition fsmooth.f90:10
integer lmmaxi
Definition modmain.f90:207
integer lmmaxo
Definition modmain.f90:203
subroutine rfmtsm(m, nr, nri, rfmt)
Definition rfmtsm.f90:7