| 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 CheckMaxConstraint( RootFinderData )
          ! FUNCTION INFORMATION:
          !       AUTHOR         Dimitri Curtil (LBNL)
          !       DATE WRITTEN   February 2006
          !       MODIFIED
          !       RE-ENGINEERED  na
          ! PURPOSE OF THIS FUNCTION:
          ! This function checks whether the max point satisfies the max constraint
          ! condition or not.
          !
          ! PRECONDITION:
          ! - Function assumes that the max point is 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 for max constrained convergence with respect to the new iterate (X,Y)
  SelectSlope: SELECT CASE ( RootFinderData%Controls%SlopeType )
  CASE ( iSlopeIncreasing )
    IF ( RootFinderData%MaxPoint%Y <= 0.0d0 ) THEN
      CheckMaxConstraint = .TRUE.
      RETURN
    END IF
  CASE ( iSlopeDecreasing )
    IF ( RootFinderData%MaxPoint%Y >= 0.0d0 ) THEN
      CheckMaxConstraint = .TRUE.
      RETURN
    END IF
  CASE DEFAULT
    ! Should never happen
    CALL ShowSevereError('CheckMaxConstraint: Invalid function slope specification. Valid choices are:')
    CALL ShowContinueError('CheckMaxConstraint: iSlopeIncreasing='//TRIM(TrimSigDigits(iSlopeIncreasing)))
    CALL ShowContinueError('CheckMaxConstraint: iSlopeDecreasing='//TRIM(TrimSigDigits(iSlopeDecreasing)))
    CALL ShowFatalError('CheckMaxConstraint: Preceding error causes program termination.')
  END SELECT SelectSlope
  CheckMaxConstraint = .FALSE.
  RETURN
END FUNCTION CheckMaxConstraint