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) | :: | 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 UpdateAirSysSubSubCompPtrArray(Index,AirLoopNum,BranchNum,CompNum,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 Air System Sub 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) :: 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, SAVE :: ArrayLimit = 100
INTEGER :: OldArrayLimit
INTEGER, SAVE :: ArrayCounter = 1
IF (OneTimeFlag)THEN
ALLOCATE(AirSysSubSubCompToPlant(ArrayLimit))
ALLOCATE(TempAirSysSubSubCompToPlant(ArrayLimit))
AirSysSubSubCompToPlant%AirLoopNum = 0
AirSysSubSubCompToPlant%AirLoopBranch = 0
AirSysSubSubCompToPlant%AirLoopComp = 0
AirSysSubSubCompToPlant%AirLoopSubComp = 0
AirSysSubSubCompToPlant%AirLoopSubSubComp = 0
AirSysSubSubCompToPlant%PlantLoopType = 0
AirSysSubSubCompToPlant%PlantLoopNum = 0
AirSysSubSubCompToPlant%PlantLoopBranch = 0
AirSysSubSubCompToPlant%PlantLoopComp = 0
AirSysSubSubCompToPlant%FirstDemandSidePtr = 0
AirSysSubSubCompToPlant%LastDemandSidePtr = 0
TempAirSysSubSubCompToPlant%AirLoopNum = 0
TempAirSysSubSubCompToPlant%AirLoopBranch = 0
TempAirSysSubSubCompToPlant%AirLoopComp = 0
TempAirSysSubSubCompToPlant%AirLoopSubComp = 0
TempAirSysSubSubCompToPlant%AirLoopSubSubComp = 0
TempAirSysSubSubCompToPlant%PlantLoopType = 0
TempAirSysSubSubCompToPlant%PlantLoopNum = 0
TempAirSysSubSubCompToPlant%PlantLoopBranch = 0
TempAirSysSubSubCompToPlant%PlantLoopComp = 0
TempAirSysSubSubCompToPlant%FirstDemandSidePtr = 0
TempAirSysSubSubCompToPlant%LastDemandSidePtr = 0
OneTimeFlag = .FALSE.
END IF
IF(ArrayCounter < ArrayLimit)THEN
Index = ArrayCounter
AirSysSubSubCompToPlant(Index)%AirLoopNum = AirLoopNum
AirSysSubSubCompToPlant(Index)%AirLoopBranch = BranchNum
AirSysSubSubCompToPlant(Index)%AirLoopComp = CompNum
AirSysSubSubCompToPlant(Index)%AirLoopSubComp = SubCompNum
AirSysSubSubCompToPlant(Index)%AirLoopSubSubComp = SubSubCompNum
AirSysSubSubCompToPlant(Index)%PlantLoopType = PlantLoopType
AirSysSubSubCompToPlant(Index)%PlantLoopNum = PlantLoop
AirSysSubSubCompToPlant(Index)%PlantLoopBranch = PlantBranch
AirSysSubSubCompToPlant(Index)%PlantLoopComp = PlantComp
ArrayCounter = ArrayCounter + 1
ELSE
TempAirSysSubSubCompToPlant = AirSysSubSubCompToPlant
DEALLOCATE(AirSysSubSubCompToPlant)
OldArrayLimit = ArrayLimit
ArrayLimit = ArrayLimit*2
ALLOCATE(AirSysSubSubCompToPlant(ArrayLimit))
AirSysSubSubCompToPlant%AirLoopNum = 0
AirSysSubSubCompToPlant%AirLoopBranch = 0
AirSysSubSubCompToPlant%AirLoopComp = 0
AirSysSubSubCompToPlant%AirLoopSubComp = 0
AirSysSubSubCompToPlant%AirLoopSubSubComp = 0
AirSysSubSubCompToPlant%PlantLoopType = 0
AirSysSubSubCompToPlant%PlantLoopNum = 0
AirSysSubSubCompToPlant%PlantLoopBranch = 0
AirSysSubSubCompToPlant%PlantLoopComp = 0
AirSysSubSubCompToPlant%FirstDemandSidePtr = 0
AirSysSubSubCompToPlant%LastDemandSidePtr = 0
AirSysSubSubCompToPlant(1:OldArrayLimit) = TempAirSysSubSubCompToPlant(1:OldArrayLimit)
DEALLOCATE(TempAirSysSubSubCompToPlant)
ALLOCATE(TempAirSysSubSubCompToPlant(ArrayLimit))
TempAirSysSubSubCompToPlant%AirLoopNum = 0
TempAirSysSubSubCompToPlant%AirLoopBranch = 0
TempAirSysSubSubCompToPlant%AirLoopComp = 0
TempAirSysSubSubCompToPlant%AirLoopSubComp = 0
TempAirSysSubSubCompToPlant%AirLoopSubSubComp = 0
TempAirSysSubSubCompToPlant%PlantLoopType = 0
TempAirSysSubSubCompToPlant%PlantLoopNum = 0
TempAirSysSubSubCompToPlant%PlantLoopBranch = 0
TempAirSysSubSubCompToPlant%PlantLoopComp = 0
TempAirSysSubSubCompToPlant%FirstDemandSidePtr = 0
TempAirSysSubSubCompToPlant%LastDemandSidePtr = 0
Index = ArrayCounter
AirSysSubSubCompToPlant(Index)%AirLoopNum = AirLoopNum
AirSysSubSubCompToPlant(Index)%AirLoopBranch = BranchNum
AirSysSubSubCompToPlant(Index)%AirLoopComp = CompNum
AirSysSubSubCompToPlant(Index)%AirLoopSubComp = SubCompNum
AirSysSubSubCompToPlant(Index)%AirLoopSubSubComp = SubSubCompNum
AirSysSubSubCompToPlant(Index)%PlantLoopType = PlantLoopType
AirSysSubSubCompToPlant(Index)%PlantLoopNum = PlantLoop
AirSysSubSubCompToPlant(Index)%PlantLoopBranch = PlantBranch
AirSysSubSubCompToPlant(Index)%PlantLoopComp = PlantComp
ArrayCounter = ArrayCounter + 1
END IF
RETURN
END SUBROUTINE UpdateAirSysSubSubCompPtrArray