Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ScheduleIndex | |||
real(kind=r64), | intent(in) | :: | Value |
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 rCheckScheduleValue(ScheduleIndex,Value)
! FUNCTION INFORMATION:
! AUTHOR Linda K. Lawrie
! DATE WRITTEN November 2004
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function checks the indicated schedule value for validity. Uses the ScheduleIndex
! from (GetScheduleIndex).
! METHODOLOGY EMPLOYED:
! This routine is best used with "discrete" schedules. The routine must traverse all values
! in the schedule and compares by equality.
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: ScheduleIndex ! Which Schedule being tested
REAL(r64), INTENT(IN) :: Value ! Actual desired value
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER Loop ! Loop Control variable
INTEGER DayT ! Day Type Loop control
INTEGER WkSch ! Pointer for WeekSchedule value
rCheckScheduleValue=.false.
IF (ScheduleIndex == -1) THEN
rCheckScheduleValue=(Value == 1.0d0)
ELSEIF (ScheduleIndex == 0) THEN
rCheckScheduleValue=(Value == 0.0d0)
ELSEIF (ScheduleIndex < 1 .or. ScheduleIndex > NumSchedules) THEN
CALL ShowFatalError('CheckScheduleValue called with ScheduleIndex out of range')
ENDIF
IF (ScheduleIndex > 0) THEN
rCheckScheduleValue=.false.
DayLoop: DO Loop=1,366
WkSch=Schedule(ScheduleIndex)%WeekSchedulePointer(Loop)
DO DayT=1,MaxDayTypes
IF (ANY(DaySchedule(WeekSchedule(WkSch)%DaySchedulePointer(DayT))%TSValue == Value)) THEN
rCheckScheduleValue=.true.
EXIT DayLoop
ENDIF
ENDDO
ENDDO DayLoop
ENDIF
RETURN
END FUNCTION rCheckScheduleValue