Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(RootFinderDataType), | intent(in) | :: | RootFinderData | |||
real(kind=r64), | intent(in) | :: | X |
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 CheckLowerUpperBracket( RootFinderData, X )
! FUNCTION INFORMATION:
! AUTHOR Dimitri Curtil (LBNL)
! DATE WRITTEN February 2006
! MODIFIED Brent Griffith, March 2010, changed to LowerPoint%X <= X <= UpperPoint%X
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function checks whether the current iterate X lies within the current lower
! and upper points or not (if defined):
! LowerPoint%X < X < UpperPoint%X
!
! Returns TRUE if current iterate lies within the lower/upper bracket.
! Returns FALSE otherwise.
!
! 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
REAL(r64), INTENT(IN) :: X ! X value for current iterate
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
! na
! FLOW:
IF ( RootFinderData%LowerPoint%DefinedFlag ) THEN
IF ( X < RootFinderData%LowerPoint%X ) THEN !DSU3 test with < instead of <=
CheckLowerUpperBracket = .FALSE.
RETURN
END IF
END IF
IF ( RootFinderData%UpperPoint%DefinedFlag ) THEN
IF ( X > RootFinderData%UpperPoint%X ) THEN !DSU3 test with > instead of >=
CheckLowerUpperBracket = .FALSE.
RETURN
END IF
END IF
CheckLowerUpperBracket = .TRUE.
RETURN
END FUNCTION CheckLowerUpperBracket