00001 subroutine compute_wme2psi(pot)
00002   use phys_constant,  only : long
00003   use grid_parameter, only : nrg, ntg, npg
00004   use def_metric_pBH, only : index_wme
00005   implicit none
00006   real(long), pointer    :: pot(:,:,:)
00007   real(long) :: index
00008   integer :: irg, itg, ipg
00009 
00010   index = - 1.0d0/dble(index_wme)
00011   do ipg = 0, npg
00012     do itg = 0, ntg
00013       do irg = 0, nrg
00014          if(pot(irg,itg,ipg).le.0.0d0) then
00015             pot(irg,itg,ipg) =  1.0d-14
00016          end if
00017          pot(irg,itg,ipg) = pot(irg, itg, ipg)**index
00018       end do
00019     end do
00020   end do
00021 
00022 end subroutine compute_wme2psi