Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ControlNum | |||
real(kind=r64), | intent(in) | :: | NextActuatedValue | |||
integer, | intent(in) | :: | Mode | |||
logical, | intent(out) | :: | IsConvergedFlag | |||
logical, | intent(out) | :: | IsUpToDateFlag |
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 ExitCalcController(ControlNum, NextActuatedValue, Mode, IsConvergedFlag, IsUpToDateFlag)
! SUBROUTINE INFORMATION:
! AUTHOR Dimitri Curtil
! DATE WRITTEN February 06
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Only called when controller is considered as "converged", meaning that we do no longer
! need to continue iterating.
!
! METHODOLOGY EMPLOYED:
! Updates:
! - next actuated value
! - controller mode
! - IsConvergedFlag
! - IsUpToDateFlag
!
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: ControlNum
REAL(r64), INTENT(IN) :: NextActuatedValue
INTEGER, INTENT(IN) :: Mode
LOGICAL, INTENT(OUT) :: IsConvergedFlag
LOGICAL, INTENT(OUT) :: IsUpToDateFlag
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! na
ControllerProps(ControlNum)%NextActuatedValue = NextActuatedValue
ControllerProps(ControlNum)%Mode = Mode
IsConvergedFlag = .TRUE.
! Set IsUpToDateFlag upon exiting to indicate caller whether or not the air loop needs to be
! re-simulated with the current candidate value, ie ControllerProps(ControlNum)%NextActuatedValue
IF ( ControllerProps(ControlNum)%ActuatedValue /= ControllerProps(ControlNum)%NextActuatedValue ) THEN
IsUpToDateFlag = .FALSE.
ELSE
IsUpToDateFlag = .TRUE.
END IF
RETURN
END SUBROUTINE ExitCalcController