Routine to print out relevant messages in the case of an unfeasible result from a HYBRD (non-optimisation) run author: P J Knight, CCFE, Culham Science Centre ifail : input integer : error flag This routine prints out relevant messages in the case of an unfeasible result from a HYBRD (non-optimisation) run.
The messages are written to units NOUT and IOTTY, which are by default the output file and screen, respectively.
If IFAIL=1
then a feasible solution has been
found and therefore no error message is required.
!
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ifail |
subroutine herror(ifail)
!! Routine to print out relevant messages in the case of an
!! unfeasible result from a HYBRD (non-optimisation) run
!! author: P J Knight, CCFE, Culham Science Centre
!! ifail : input integer : error flag
!! This routine prints out relevant messages in the case of
!! an unfeasible result from a HYBRD (non-optimisation) run.
!! <P>The messages are written to units NOUT and IOTTY, which are
!! by default the output file and screen, respectively.
!! <P>If <CODE>IFAIL=1</CODE> then a feasible solution has been
!! found and therefore no error message is required.
!! !
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
use constants, only: nout, iotty
use process_output, only: oblnkl, ocmmnt
implicit none
! Arguments
integer, intent(in) :: ifail
! Local variables
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
select case (ifail)
case (:-1)
call ocmmnt(nout, 'User-terminated execution of HYBRD.')
call ocmmnt(iotty,'User-terminated execution of HYBRD.')
case (0)
call ocmmnt(nout, 'Improper input parameters to the HYBRD routine.')
call ocmmnt(nout, 'PROCESS coding must be checked.')
call ocmmnt(iotty,'Improper input parameters to the HYBRD routine.')
call ocmmnt(iotty,'PROCESS coding must be checked.')
case (1)
continue
case (2)
call ocmmnt(nout,'The maximum number of calls has been reached without solution,')
call ocmmnt(nout,'suggesting that the iteration is not making good progress.')
call ocmmnt(nout,'Try changing the variables in IXC.')
call ocmmnt(iotty,'The maximum number of calls has been reached without solution,')
call ocmmnt(iotty,'suggesting that the iteration is not making good progress.')
call ocmmnt(iotty,'Try changing the variables in IXC.')
case (3)
call ocmmnt(nout,'The tolerance is too small: No further improvement in the approximate solution is possible.')
call ocmmnt(nout,'Try raising the value of FTOL.')
call ocmmnt(iotty, 'The tolerance is too small: No further improvement in the approximate solution is possible.')
call ocmmnt(iotty,'in the approximate solution is possible.')
call ocmmnt(iotty,'Try raising the value of FTOL.')
case (4)
call ocmmnt(nout,'The iteration is not making good progress.')
call ocmmnt(nout,'The code may be stuck in a minimum in the residual')
call ocmmnt(nout,'space that is significantly above zero.')
call oblnkl(nout)
call ocmmnt(nout,'There is either no solution possible, or the code')
call ocmmnt(nout,'is failing to escape from a deep local minimum.')
call ocmmnt(nout,'Try changing the variables in IXC, or modify their initial values.')
call ocmmnt(iotty,'The iteration is not making good progress.')
call ocmmnt(iotty,'The code may be stuck in a minimum in the residual')
call ocmmnt(iotty,'space that is significantly above zero.')
call oblnkl(iotty)
call ocmmnt(iotty,'There is either no solution possible, or the code')
call ocmmnt(iotty,'is failing to escape from a deep local minimum.')
call ocmmnt(iotty,'Try changing the variables in IXC, or modify their initial values.')
case default
call ocmmnt(nout,'This value of IFAIL should not be possible...')
call ocmmnt(nout,'See source code for details.')
call ocmmnt(iotty,'This value of IFAIL should not be possible...')
call ocmmnt(iotty,'See source code for details.')
end select
end subroutine herror