Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(RootFinderDataType), | intent(inout) | :: | RootFinderData | |||
real(kind=r64), | intent(in) | :: | XMin | |||
real(kind=r64), | intent(in) | :: | XMax |
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.
SUBROUTINE ResetRootFinder( RootFinderData, XMin, XMax )
! SUBROUTINE INFORMATION:
! AUTHOR Dimitri Curtil (LBNL)
! DATE WRITTEN February 2006
! MODIFIED
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine initializes the data for the root finder.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
TYPE(RootFinderDataType), INTENT(INOUT) :: RootFinderData ! Data used by root finding algorithm
REAL(r64), INTENT(IN) :: XMin ! Minimum X value allowed
REAL(r64), INTENT(IN) :: XMax ! Maximum X value allowed
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! na
! FLOW:
! Reset min point
RootFinderData%MinPoint%X = XMin
RootFinderData%MinPoint%Y = 0.0d0
RootFinderData%MinPoint%DefinedFlag = .FALSE.
! Reset max point
RootFinderData%MaxPoint%X = XMax
RootFinderData%MaxPoint%Y = 0.0d0
RootFinderData%MaxPoint%DefinedFlag = .FALSE.
! Reset lower point
RootFinderData%LowerPoint%X = 0.0d0
RootFinderData%LowerPoint%Y = 0.0d0
RootFinderData%LowerPoint%DefinedFlag = .FALSE.
! Reset upper point
RootFinderData%UpperPoint%X = 0.0d0
RootFinderData%UpperPoint%Y = 0.0d0
RootFinderData%UpperPoint%DefinedFlag = .FALSE.
! Reset previous point
RootFinderData%CurrentPoint%X = 0.0d0
RootFinderData%CurrentPoint%Y = 0.0d0
RootFinderData%CurrentPoint%DefinedFlag = .FALSE.
! Reset iterate history with last 3 best points
RootFinderData%NumHistory = 0
RootFinderData%History(:)%X = 0.0d0
RootFinderData%History(:)%Y = 0.0d0
RootFinderData%History(:)%DefinedFlag = .FALSE.
! Reset increments over successive iterationes
RootFinderData%Increment%X = 0.0d0
RootFinderData%Increment%Y = 0.0d0
RootFinderData%Increment%DefinedFlag = .FALSE.
RootFinderData%XCandidate = 0.0d0
! Reset default state
RootFinderData%StatusFlag = iStatusNone
RootFinderData%CurrentMethodType = iMethodNone
RootFinderData%ConvergenceRate = -1.0d0
RETURN
END SUBROUTINE ResetRootFinder