Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | Index | |||
integer, | intent(in) | :: | AirLoopNum | |||
integer, | intent(in) | :: | BranchNum | |||
integer, | intent(in) | :: | CompNum | |||
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 UpdateAirSysCompPtrArray(Index,AirLoopNum,BranchNum,CompNum,PlantLoopType,PlantLoop,PlantBranch,PlantComp)
! SUBROUTINE INFORMATION:
! AUTHOR Dan Fisher
! DATE WRITTEN June 2005
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Update Air System 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) :: AirLoopNum
INTEGER, INTENT(IN) :: BranchNum
INTEGER, INTENT(IN) :: CompNum
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, SAVE :: ArrayLimit = 100
INTEGER :: OldArrayLimit
INTEGER, SAVE :: ArrayCounter = 1
IF (OneTimeFlag)THEN
ALLOCATE(AirSysCompToPlant(ArrayLimit))
ALLOCATE(TempAirSysCompToPlant(ArrayLimit))
AirSysCompToPlant%AirLoopNum = 0
AirSysCompToPlant%AirLoopBranch = 0
AirSysCompToPlant%AirLoopComp = 0
AirSysCompToPlant%PlantLoopType = 0
AirSysCompToPlant%PlantLoopNum = 0
AirSysCompToPlant%PlantLoopBranch = 0
AirSysCompToPlant%PlantLoopComp = 0
AirSysCompToPlant%FirstDemandSidePtr = 0
AirSysCompToPlant%LastDemandSidePtr = 0
TempAirSysCompToPlant%AirLoopNum = 0
TempAirSysCompToPlant%AirLoopBranch = 0
TempAirSysCompToPlant%AirLoopComp = 0
TempAirSysCompToPlant%PlantLoopType = 0
TempAirSysCompToPlant%PlantLoopNum = 0
TempAirSysCompToPlant%PlantLoopBranch = 0
TempAirSysCompToPlant%PlantLoopComp = 0
TempAirSysCompToPlant%FirstDemandSidePtr = 0
TempAirSysCompToPlant%LastDemandSidePtr = 0
OneTimeFlag = .FALSE.
END IF
IF(ArrayCounter < ArrayLimit)THEN
Index = ArrayCounter
AirSysCompToPlant(Index)%AirLoopNum = AirLoopNum
AirSysCompToPlant(Index)%AirLoopBranch = BranchNum
AirSysCompToPlant(Index)%AirLoopComp = CompNum
AirSysCompToPlant(Index)%PlantLoopType = PlantLoopType
AirSysCompToPlant(Index)%PlantLoopNum = PlantLoop
AirSysCompToPlant(Index)%PlantLoopBranch = PlantBranch
AirSysCompToPlant(Index)%PlantLoopComp = PlantComp
ArrayCounter = ArrayCounter + 1
ELSE
TempAirSysCompToPlant = AirSysCompToPlant
DEALLOCATE(AirSysCompToPlant)
OldArrayLimit = ArrayLimit
ArrayLimit = ArrayLimit*2
ALLOCATE(AirSysCompToPlant(ArrayLimit))
AirSysCompToPlant%AirLoopNum = 0
AirSysCompToPlant%AirLoopBranch = 0
AirSysCompToPlant%AirLoopComp = 0
AirSysCompToPlant%PlantLoopType = 0
AirSysCompToPlant%PlantLoopNum = 0
AirSysCompToPlant%PlantLoopBranch = 0
AirSysCompToPlant%PlantLoopComp = 0
AirSysCompToPlant%FirstDemandSidePtr = 0
AirSysCompToPlant%LastDemandSidePtr = 0
AirSysCompToPlant(1:OldArrayLimit) = TempAirSysCompToPlant(1:OldArrayLimit)
DEALLOCATE(TempAirSysCompToPlant)
ALLOCATE(TempAirSysCompToPlant(ArrayLimit))
TempAirSysCompToPlant%AirLoopNum = 0
TempAirSysCompToPlant%AirLoopBranch = 0
TempAirSysCompToPlant%AirLoopComp = 0
TempAirSysCompToPlant%PlantLoopType = 0
TempAirSysCompToPlant%PlantLoopNum = 0
TempAirSysCompToPlant%PlantLoopBranch = 0
TempAirSysCompToPlant%PlantLoopComp = 0
TempAirSysCompToPlant%FirstDemandSidePtr = 0
TempAirSysCompToPlant%LastDemandSidePtr = 0
Index = ArrayCounter
AirSysCompToPlant(Index)%AirLoopNum = AirLoopNum
AirSysCompToPlant(Index)%AirLoopBranch = BranchNum
AirSysCompToPlant(Index)%AirLoopComp = CompNum
AirSysCompToPlant(Index)%PlantLoopType = PlantLoopType
AirSysCompToPlant(Index)%PlantLoopNum = PlantLoop
AirSysCompToPlant(Index)%PlantLoopBranch = PlantBranch
AirSysCompToPlant(Index)%PlantLoopComp = PlantComp
ArrayCounter = ArrayCounter + 1
END IF
RETURN
END SUBROUTINE UpdateAirSysCompPtrArray