!*********************************************************************** 
!  Read input data for problem 
!*********************************************************************** 
subroutine input(params)
 
implicit none 
 
!  Problem parameters 
real*8,dimension(:)           :: params             !note: this is a real value
integer                       :: nx, ny, nz, nt, nplot
real*8                        :: xmin, xmax, ymin, ymax,zmin, zmax, tol
integer                       :: hdfflag, asciiflag 
real*8                        :: bha(2),bhr(2,3),bhp(2,3),bhs(2,3) 
real*8,parameter              :: UNDEF = -1.0d0
!  Local variables 
integer                       :: nxi, nyi, nzi 
 
   open (unit=11, file='t2.in', status='unknown') 
   read (11,*)       &
                nx, ny, nz, nt, nplot,       &
                xmin, xmax,       &
                ymin, ymax,       &
                zmin, zmax,       &
                hdfflag, asciiflag,tol,       &
                bha(1),       &
                bhr(1,1), bhr(1,2), bhr(1,3),       &
                bhp(1,1), bhp(1,2), bhp(1,3),       &
                bhs(1,1), bhs(1,2), bhs(1,3),       &
                bha(2),       &
                bhr(2,1), bhr(2,2), bhr(2,3),       &
                bhp(2,1), bhp(2,2), bhp(2,3),       &
                bhs(2,1), bhs(2,2), bhs(2,3) 
   close (11) 
 
   write(6,*) 'Problem parameters:' 
   write(6,10) nx, ny, nz 
   write(6,11) nt 
   write(6,12) nplot 
   write(6,13) hdfflag, asciiflag 
   write(6,14) xmin, xmax 
   write(6,15) ymin, ymax 
   write(6,16) zmin, zmax 
   write(6,21) bha(1) 
   write(6,22) bhr(1,1),bhr(1,2),bhr(1,3) 
   write(6,23) bhp(1,1),bhp(1,2),bhp(1,3) 
   write(6,24) bhs(1,1),bhs(1,2),bhs(1,3) 
   write(6,31) bha(2) 
   write(6,32) bhr(2,1),bhr(2,2),bhr(2,3) 
   write(6,33) bhp(2,1),bhp(2,2),bhp(2,3) 
   write(6,34) bhs(2,1),bhs(2,2),bhs(2,3) 
   write(6,*) 

! now set up the parameters .............
	params(1) = nx*1.0d0
	params(2) = ny*1.0d0
	params(3) = nz*1.0d0
	params(4) = 1.0d0                !isotropic schwarzschild coordinates
	params(5) = UNDEF 
	params(6) = UNDEF 
	params(7) = bha(1) 
	params(8) = bha(2) 
	params(9) = bhr(1,1) 
	params(10) = bhr(2,1) 
	params(11) = bhr(3,1) 
	params(12) = bhr(1,2) 
	params(13) = bhr(2,2) 
	params(14) = bhr(3,2) 
	params(15) = xmin
	params(16) = xmax
	params(17) = ymin
	params(18) = ymax
	params(19) = zmin
	params(20) = zmax
	params(21) = 1.0d0
	params(22) = tol 
	params(23) = 1.0d0*nt 

!
10    format('Spatial grid ', 3i6) 
11    format('Time steps', i6) 
12    format('Plot 2d slices every ', i6, ' iterations') 
13    format('hdfoutput=',i3,  'ascii output=',i3) 
14    format('xmin=',f9.5, 'xmax=',f9.5) 
15    format('ymin=',f9.5, 'ymax=',f9.5) 
16    format('zmin=',f9.5, 'zmax=',f9.5) 
21    format('Radius of first hole is ', f9.5) 
22    format('   position is ', 3f9.5) 
23    format('   momentum is ', 3f9.5) 
24    format('       spin is ', 3f9.5) 
31    format('Radius of second hole is ', f9.5) 
32    format('   position is ', 3f9.5) 
33    format('   momentum is ', 3f9.5) 
34    format('       spin is ', 3f9.5) 
 
return 
end 
