Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(RootFinderDataType), | intent(in) | :: | RootFinderData |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
LOGICAL FUNCTION CheckSlope( RootFinderData )
! FUNCTION INFORMATION:
! AUTHOR Dimitri Curtil (LBNL)
! DATE WRITTEN February 2006
! MODIFIED
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function checks whether the current iterate (X,Y) satisfies the slope
! requirement between the min and max points.
!
! Returns FALSE if the slope requirement is NOT satisfied.
! Returns TRUE if the slope requirement is satisfied.
!
! PRECONDITION:
! - Function assumes that both the min and max points are defined.
!
! POSTCONDITION:
! - RootFinderData is NOT changed by this function.
!
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
TYPE(RootFinderDataType), INTENT(IN) :: RootFinderData ! Data used by root finding algorithm
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
! na
! FLOW:
! Check that the slope requirement is respected at the min and max points
!
! Note that the singularity check takes care of RootFinderData%MinPoint%Y == RootFinderData%MaxPoint%Y
! therefore we use strict comparison operators < and >.
SelectSlope: SELECT CASE ( RootFinderData%Controls%SlopeType )
CASE ( iSlopeIncreasing )
IF ( RootFinderData%MinPoint%Y < RootFinderData%MaxPoint%Y ) THEN
CheckSlope = .TRUE.
RETURN
END IF
CASE ( iSlopeDecreasing )
IF ( RootFinderData%MinPoint%Y > RootFinderData%MaxPoint%Y ) THEN
CheckSlope = .TRUE.
RETURN
END IF
CASE DEFAULT
! Should never happen
CALL ShowSevereError('CheckSlope: Invalid function slope specification. Valid choices are:')
CALL ShowContinueError('CheckSlope: iSlopeIncreasing='//TRIM(TrimSigDigits(iSlopeIncreasing)))
CALL ShowContinueError('CheckSlope: iSlopeDecreasing='//TRIM(TrimSigDigits(iSlopeDecreasing)))
CALL ShowFatalError('CheckSlope: Preceding error causes program termination.')
END SELECT SelectSlope
CheckSlope = .FALSE.
RETURN
END FUNCTION CheckSlope