
! Copyright (C) 2023 J. K. Dewhurst and S. Sharma.
! This file is distributed under the terms of the GNU General Public License.
! See the file COPYING for license details.

subroutine rmtavrg
use modmain
implicit none
! local variables
integer i
real(8) ra
if (nspecies <= 1) return
do i=1,mrmtav
! average muffin-tin radius
  ra=sum(rmt(1:nspecies))/nspecies
! replace each muffin-tin radius with half itself plus the average
  rmt(1:nspecies)=0.5d0*(rmt(1:nspecies)+ra)
end do
end subroutine

