Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | Index | |||
integer, | intent(in) | :: | ListNum | |||
integer, | intent(in) | :: | AirDistUnitNum | |||
integer, | intent(in) | :: | SubCompNum | |||
integer, | intent(in) | :: | SubSubCompNum | |||
integer, | intent(in) | :: | PlantLoopType | |||
integer, | intent(in) | :: | PlantLoop | |||
integer, | intent(in) | :: | PlantBranch | |||
integer, | intent(in) | :: | PlantComp |
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.
SUBROUTINE UpdateZoneSubSubCompPtrArray(Index,ListNum,AirDistUnitNum,SubCompNum,SubSubCompNum,PlantLoopType, &
PlantLoop,PlantBranch,PlantComp)
! SUBROUTINE INFORMATION:
! AUTHOR Dan Fisher
! DATE WRITTEN June 2005
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Update Zone Sub Component Pointer Array
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(OUT) :: Index
INTEGER, INTENT(IN) :: ListNum
INTEGER, INTENT(IN) :: AirDistUnitNum
INTEGER, INTENT(IN) :: SubCompNum
INTEGER, INTENT(IN) :: SubSubCompNum
INTEGER, INTENT(IN) :: PlantLoopType
INTEGER, INTENT(IN) :: PlantLoop
INTEGER, INTENT(IN) :: PlantBranch
INTEGER, INTENT(IN) :: PlantComp
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
LOGICAL, SAVE :: OneTimeFlag = .TRUE.
INTEGER :: OldArrayLimit
INTEGER, SAVE :: ArrayLimit = 100
INTEGER, SAVE :: ArrayCounter = 1
IF (OneTimeFlag)THEN
ALLOCATE(ZoneSubSubCompToPlant(ArrayLimit))
ZoneSubSubCompToPlant%ZoneEqListNum = 0
ZoneSubSubCompToPlant%ZoneEqCompNum = 0
ZoneSubSubCompToPlant%ZoneEqSubCompNum = 0
ZoneSubSubCompToPlant%ZoneEqSubSubCompNum = 0
ZoneSubSubCompToPlant%PlantLoopType = 0
ZoneSubSubCompToPlant%PlantLoopNum = 0
ZoneSubSubCompToPlant%PlantLoopBranch = 0
ZoneSubSubCompToPlant%PlantLoopComp = 0
ZoneSubSubCompToPlant%FirstDemandSidePtr = 0
ZoneSubSubCompToPlant%LastDemandSidePtr = 0
ALLOCATE(TempZoneSubSubCompToPlant(ArrayLimit))
TempZoneSubSubCompToPlant%ZoneEqListNum = 0
TempZoneSubSubCompToPlant%ZoneEqCompNum = 0
TempZoneSubSubCompToPlant%ZoneEqSubCompNum = 0
TempZoneSubSubCompToPlant%ZoneEqSubSubCompNum = 0
TempZoneSubSubCompToPlant%PlantLoopType = 0
TempZoneSubSubCompToPlant%PlantLoopNum = 0
TempZoneSubSubCompToPlant%PlantLoopBranch = 0
TempZoneSubSubCompToPlant%PlantLoopComp = 0
TempZoneSubSubCompToPlant%FirstDemandSidePtr = 0
TempZoneSubSubCompToPlant%LastDemandSidePtr = 0
OneTimeFlag = .FALSE.
END IF
IF(ArrayCounter < ArrayLimit)THEN
Index = ArrayCounter
ZoneSubSubCompToPlant(Index)%ZoneEqListNum = ListNum
ZoneSubSubCompToPlant(Index)%ZoneEqCompNum = AirDistUnitNum
ZoneSubSubCompToPlant(Index)%ZoneEqSubCompNum = SubCompNum
ZoneSubSubCompToPlant(Index)%ZoneEqSubSubCompNum = SubSubCompNum
ZoneSubSubCompToPlant(Index)%PlantLoopType = PlantLoopType
ZoneSubSubCompToPlant(Index)%PlantLoopNum = PlantLoop
ZoneSubSubCompToPlant(Index)%PlantLoopBranch = PlantBranch
ZoneSubSubCompToPlant(Index)%PlantLoopComp = PlantComp
ArrayCounter = ArrayCounter + 1
ELSE
TempZoneSubSubCompToPlant = ZoneSubSubCompToPlant
DEALLOCATE(ZoneSubSubCompToPlant)
OldArrayLimit = ArrayLimit
ArrayLimit = ArrayLimit*2
ALLOCATE(ZoneSubSubCompToPlant(ArrayLimit))
ZoneSubSubCompToPlant%ZoneEqListNum = 0
ZoneSubSubCompToPlant%ZoneEqCompNum = 0
ZoneSubSubCompToPlant%ZoneEqSubCompNum = 0
ZoneSubSubCompToPlant%ZoneEqSubSubCompNum = 0
ZoneSubSubCompToPlant%PlantLoopType = 0
ZoneSubSubCompToPlant%PlantLoopNum = 0
ZoneSubSubCompToPlant%PlantLoopBranch = 0
ZoneSubSubCompToPlant%PlantLoopComp = 0
ZoneSubSubCompToPlant%FirstDemandSidePtr = 0
ZoneSubSubCompToPlant%LastDemandSidePtr = 0
ZoneSubSubCompToPlant(1:OldArrayLimit) = TempZoneSubSubCompToPlant(1:OldArrayLimit)
DEALLOCATE(TempZoneSubSubCompToPlant)
ALLOCATE(TempZoneSubSubCompToPlant(ArrayLimit))
TempZoneSubSubCompToPlant%ZoneEqListNum = 0
TempZoneSubSubCompToPlant%ZoneEqCompNum = 0
TempZoneSubSubCompToPlant%ZoneEqSubCompNum = 0
TempZoneSubSubCompToPlant%ZoneEqSubSubCompNum = 0
TempZoneSubSubCompToPlant%PlantLoopType = 0
TempZoneSubSubCompToPlant%PlantLoopNum = 0
TempZoneSubSubCompToPlant%PlantLoopBranch = 0
TempZoneSubSubCompToPlant%PlantLoopComp = 0
TempZoneSubSubCompToPlant%FirstDemandSidePtr = 0
TempZoneSubSubCompToPlant%LastDemandSidePtr = 0
Index = ArrayCounter
ZoneSubSubCompToPlant(Index)%ZoneEqListNum = ListNum
ZoneSubSubCompToPlant(Index)%ZoneEqCompNum = AirDistUnitNum
ZoneSubSubCompToPlant(Index)%ZoneEqSubCompNum = SubCompNum
ZoneSubSubCompToPlant(Index)%ZoneEqSubSubCompNum = SubSubCompNum
ZoneSubSubCompToPlant(Index)%PlantLoopType = PlantLoopType
ZoneSubSubCompToPlant(Index)%PlantLoopNum = PlantLoop
ZoneSubSubCompToPlant(Index)%PlantLoopBranch = PlantBranch
ZoneSubSubCompToPlant(Index)%PlantLoopComp = PlantComp
ArrayCounter = ArrayCounter + 1
END IF
RETURN
END SUBROUTINE UpdateZoneSubSubCompPtrArray