SUBROUTINE WriteRootFinderStatus( FileUnit, RootFinderData )
! SUBROUTINE INFORMATION:
! AUTHOR Dimitri Curtil (LBNL)
! DATE WRITTEN May 2006
! MODIFIED
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
!
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: FileUnit ! File unit where to write the status description
TYPE(RootFinderDataType), INTENT(IN) :: RootFinderData ! Data used by root finding algorithm
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! na
! FLOW:
SELECT CASE ( RootFinderData%StatusFlag )
CASE (iStatusOK)
WRITE(FileUnit,'(A)') 'Found unconstrained root'
CASE (iStatusOKMin)
WRITE(FileUnit,'(A)') 'Found min constrained root'
CASE (iStatusOKMax)
WRITE(FileUnit,'(A)') 'Found max constrained root'
CASE (iStatusOKRoundOff )
WRITE(FileUnit,'(A)') 'Detected round-off convergence in bracket'
CASE (iStatusWarningSingular )
WRITE(FileUnit,'(A)') 'Detected singularity warning'
CASE (iStatusWarningNonMonotonic )
WRITE(FileUnit,'(A)') 'Detected non-monotonicity warning'
CASE (iStatusErrorRange)
WRITE(FileUnit,'(A)') 'Detected out-of-range error'
CASE (iStatusErrorBracket)
WRITE(FileUnit,'(A)') 'Detected bracket error'
CASE (iStatusErrorSlope)
WRITE(FileUnit,'(A)') 'Detected slope error'
CASE (iStatusErrorSingular)
WRITE(FileUnit,'(A)') 'Detected singularity error'
CASE DEFAULT
WRITE(FileUnit,'(A)') 'Detected bad root finder status'
END SELECT
RETURN
END SUBROUTINE WriteRootFinderStatus