!-----------------------------------------------------------------------
!  fuslis -- provide data on fusion by fusion product
!
!  modified -- jfs  11 feb 94
!   added protons
!
!  fusion reaction indexing is as described in comments of subroutine
!  fusion (***** see fusion.fnb comments *****).
!
!  this routine receives as argument the index to a fast ion species
!  used to model fusion product fast ions.  which species indicates
!  the fusion product and thus one or more fusion reactions involved.
!
!  this routine gives an estimate of the initial energy of the fusion
!  product ** dmc sept 1990 ** this should be consistent with the max
!  energy set in s.r. datchk for the fusion product species' computed
!  distribution function.
!
!  energy data is from the nrl plasma formulary ... dmc sept 1990
!
subroutine fuslis(ident,ilreact,zereact)
  !
  use nbi_com
  !
  implicit none
  integer :: ident                     ! fusion prodict id code
  !
  !  output:
  !
  !  set .true. for reactions that produce a desired fusion product:
  logical ilreact(mireact)
  !
  !  initial energy (ev) of fusion product so produced:
  real(fp) :: zereact(mireact)
  !
  !-------------------------------------------------------------
  integer :: ierr
  !-------------------------------------------------------------
  !
  call fuslis_sub(mireact,ilreact,zereact, &
       ident.eq.nftrit, ident.eq.nfprot,ident.eq.nfprot14, &
       ident.eq.nfhel3,ident.eq.nfhel4, &
       nlfst,nlfhe3,nrfdeut.gt.0,nrftrit.gt.0,nrfhel3.gt.0, &
       ierr)
  !
  if(ierr.eq.1) then
     write(nonlin,*) ' ?fuslis:  catfuslis error.'
     zereact=0.0_fp
     ilreact=.false.

  else if(ierr.ne.0) then
     write(nonlin,*) ' ?fuslis:  improper ident passed: ',ident
     zereact=0.0_fp
     ilreact=.false.
  end if
  !
  return
end subroutine fuslis

!-----------------------------------------------------------------------

subroutine fuslis_mireact(ival)
  !  this routine returns the value of mireact to the caller

  use nbi_com
  implicit none

  integer, intent(out) :: ival

  ival = mireact

  return
end subroutine fuslis_mireact

