2005-08-12 22:37:55 +08:00
|
|
|
!---------------------------------------------------------------
|
|
|
|
subroutine outward(y,f,g,mesh,imatch,ncross)
|
|
|
|
!---------------------------------------------------------------
|
|
|
|
! outward integration. numerov method.
|
|
|
|
!
|
|
|
|
use kinds, only: DP
|
2007-08-12 08:08:53 +08:00
|
|
|
use radial_grids, only: ndmx
|
2005-08-12 22:37:55 +08:00
|
|
|
implicit none
|
|
|
|
!
|
|
|
|
! I/O variables
|
|
|
|
!
|
|
|
|
integer :: mesh,imatch, ncross
|
2007-08-12 08:08:53 +08:00
|
|
|
real (DP) :: y(ndmx), f(ndmx), g(ndmx)
|
2005-08-12 22:37:55 +08:00
|
|
|
!
|
|
|
|
! local variables
|
|
|
|
!
|
|
|
|
integer :: n
|
2005-08-28 22:09:42 +08:00
|
|
|
real (DP) :: ymx
|
2005-08-12 22:37:55 +08:00
|
|
|
|
2007-08-12 08:08:53 +08:00
|
|
|
if (ndmx.lt.mesh) stop ' outward : ndmx .lt. mesh !!!!'
|
2005-08-12 22:37:55 +08:00
|
|
|
!
|
|
|
|
ncross=0
|
2006-12-03 01:58:50 +08:00
|
|
|
ymx=0.d0
|
2005-08-12 22:37:55 +08:00
|
|
|
do n=2,imatch-1
|
|
|
|
y(n+1)=((12.d0-10.d0*f(n))*y(n)-f(n-1)*y(n-1)+g(n))/f(n+1)
|
|
|
|
if ( y(n) .ne. sign(y(n),y(n+1)) ) ncross=ncross+1
|
|
|
|
ymx=max(ymx,abs(y(n)))
|
|
|
|
end do
|
2006-12-03 01:58:50 +08:00
|
|
|
if(ymx.ge.1.0d10) write (*,*) ' ******** ymx.ge.1.0e10 ********'
|
2005-08-12 22:37:55 +08:00
|
|
|
!
|
|
|
|
return
|
|
|
|
end subroutine outward
|
|
|
|
|