Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out) | :: | Index | |||
integer, | intent(in) | :: | AirLoopNum | |||
integer, | intent(in) | :: | BranchNum | |||
integer, | intent(in) | :: | CompNum | |||
integer, | intent(in) | :: | SubCompNum | |||
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 UpdateAirSysSubCompPtrArray(Index,AirLoopNum,BranchNum,CompNum,SubCompNum,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 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) :: AirLoopNum
INTEGER, INTENT(IN) :: BranchNum
INTEGER, INTENT(IN) :: CompNum
INTEGER, INTENT(IN) :: SubCompNum
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(AirSysSubCompToPlant(ArrayLimit))
ALLOCATE(TempAirSysSubCompToPlant(ArrayLimit))
AirSysSubCompToPlant%AirLoopNum = 0
AirSysSubCompToPlant%AirLoopBranch = 0
AirSysSubCompToPlant%AirLoopComp = 0
AirSysSubCompToPlant%AirLoopSubComp = 0
AirSysSubCompToPlant%PlantLoopType = 0
AirSysSubCompToPlant%PlantLoopNum = 0
AirSysSubCompToPlant%PlantLoopBranch = 0
AirSysSubCompToPlant%PlantLoopComp = 0
AirSysSubCompToPlant%FirstDemandSidePtr = 0
AirSysSubCompToPlant%LastDemandSidePtr = 0
TempAirSysSubCompToPlant%AirLoopNum = 0
TempAirSysSubCompToPlant%AirLoopBranch = 0
TempAirSysSubCompToPlant%AirLoopComp = 0
TempAirSysSubCompToPlant%AirLoopSubComp = 0
TempAirSysSubCompToPlant%PlantLoopType = 0
TempAirSysSubCompToPlant%PlantLoopNum = 0
TempAirSysSubCompToPlant%PlantLoopBranch = 0
TempAirSysSubCompToPlant%PlantLoopComp = 0
TempAirSysSubCompToPlant%FirstDemandSidePtr = 0
TempAirSysSubCompToPlant%LastDemandSidePtr = 0
OneTimeFlag = .FALSE.
END IF
IF(ArrayCounter < ArrayLimit)THEN
Index = ArrayCounter
AirSysSubCompToPlant(Index)%AirLoopNum = AirLoopNum
AirSysSubCompToPlant(Index)%AirLoopBranch = BranchNum
AirSysSubCompToPlant(Index)%AirLoopComp = CompNum
AirSysSubCompToPlant(Index)%AirLoopSubComp = SubCompNum
AirSysSubCompToPlant(Index)%PlantLoopType = PlantLoopType
AirSysSubCompToPlant(Index)%PlantLoopNum = PlantLoop
AirSysSubCompToPlant(Index)%PlantLoopBranch = PlantBranch
AirSysSubCompToPlant(Index)%PlantLoopComp = PlantComp
ArrayCounter = ArrayCounter + 1
ELSE
TempAirSysSubCompToPlant = AirSysSubCompToPlant
DEALLOCATE(AirSysSubCompToPlant)
OldArrayLimit = ArrayLimit
ArrayLimit = ArrayLimit*2
ALLOCATE(AirSysSubCompToPlant(ArrayLimit))
AirSysSubCompToPlant%AirLoopNum = 0
AirSysSubCompToPlant%AirLoopBranch = 0
AirSysSubCompToPlant%AirLoopComp = 0
AirSysSubCompToPlant%AirLoopSubComp = 0
AirSysSubCompToPlant%PlantLoopType = 0
AirSysSubCompToPlant%PlantLoopNum = 0
AirSysSubCompToPlant%PlantLoopBranch = 0
AirSysSubCompToPlant%PlantLoopComp = 0
AirSysSubCompToPlant%FirstDemandSidePtr = 0
AirSysSubCompToPlant%LastDemandSidePtr = 0
AirSysSubCompToPlant(1:OldArrayLimit) = TempAirSysSubCompToPlant(1:OldArrayLimit)
DEALLOCATE(TempAirSysSubCompToPlant)
ALLOCATE(TempAirSysSubCompToPlant(ArrayLimit))
TempAirSysSubCompToPlant%AirLoopNum = 0
TempAirSysSubCompToPlant%AirLoopBranch = 0
TempAirSysSubCompToPlant%AirLoopComp = 0
TempAirSysSubCompToPlant%AirLoopSubComp = 0
TempAirSysSubCompToPlant%PlantLoopType = 0
TempAirSysSubCompToPlant%PlantLoopNum = 0
TempAirSysSubCompToPlant%PlantLoopBranch = 0
TempAirSysSubCompToPlant%PlantLoopComp = 0
TempAirSysSubCompToPlant%FirstDemandSidePtr = 0
TempAirSysSubCompToPlant%LastDemandSidePtr = 0
Index = ArrayCounter
AirSysSubCompToPlant(Index)%AirLoopNum = AirLoopNum
AirSysSubCompToPlant(Index)%AirLoopBranch = BranchNum
AirSysSubCompToPlant(Index)%AirLoopComp = CompNum
AirSysSubCompToPlant(Index)%AirLoopSubComp = SubCompNum
AirSysSubCompToPlant(Index)%PlantLoopType = PlantLoopType
AirSysSubCompToPlant(Index)%PlantLoopNum = PlantLoop
AirSysSubCompToPlant(Index)%PlantLoopBranch = PlantBranch
AirSysSubCompToPlant(Index)%PlantLoopComp = PlantComp
ArrayCounter = ArrayCounter + 1
END IF
RETURN
END SUBROUTINE UpdateAirSysSubCompPtrArray