| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(out) | :: | Index | |||
| integer, | intent(in) | :: | ListNum | |||
| integer, | intent(in) | :: | AirDistUnitNum | |||
| 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 UpdateZoneSubCompPtrArray(Index,ListNum,AirDistUnitNum,SubCompNum,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)         :: 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(ZoneSubCompToPlant(ArrayLimit))
      ZoneSubCompToPlant%ZoneEqListNum = 0
      ZoneSubCompToPlant%ZoneEqCompNum = 0
      ZoneSubCompToPlant%ZoneEqSubCompNum = 0
      ZoneSubCompToPlant%PlantLoopType = 0
      ZoneSubCompToPlant%PlantLoopNum = 0
      ZoneSubCompToPlant%PlantLoopBranch = 0
      ZoneSubCompToPlant%PlantLoopComp = 0
      ZoneSubCompToPlant%FirstDemandSidePtr = 0
      ZoneSubCompToPlant%LastDemandSidePtr = 0
      ALLOCATE(TempZoneSubCompToPlant(ArrayLimit))
      TempZoneSubCompToPlant%ZoneEqListNum = 0
      TempZoneSubCompToPlant%ZoneEqCompNum = 0
      TempZoneSubCompToPlant%ZoneEqSubCompNum = 0
      TempZoneSubCompToPlant%PlantLoopType = 0
      TempZoneSubCompToPlant%PlantLoopNum = 0
      TempZoneSubCompToPlant%PlantLoopBranch = 0
      TempZoneSubCompToPlant%PlantLoopComp = 0
      TempZoneSubCompToPlant%FirstDemandSidePtr = 0
      TempZoneSubCompToPlant%LastDemandSidePtr = 0
      OneTimeFlag = .FALSE.
    END IF
    IF(ArrayCounter < ArrayLimit)THEN
      Index = ArrayCounter
      ZoneSubCompToPlant(Index)%ZoneEqListNum = ListNum
      ZoneSubCompToPlant(Index)%ZoneEqCompNum = AirDistUnitNum
      ZoneSubCompToPlant(Index)%ZoneEqSubCompNum = SubCompNum
      ZoneSubCompToPlant(Index)%PlantLoopType = PlantLoopType
      ZoneSubCompToPlant(Index)%PlantLoopNum = PlantLoop
      ZoneSubCompToPlant(Index)%PlantLoopBranch = PlantBranch
      ZoneSubCompToPlant(Index)%PlantLoopComp = PlantComp
      ArrayCounter = ArrayCounter + 1
    ELSE
      TempZoneSubCompToPlant = ZoneSubCompToPlant
      DEALLOCATE(ZoneSubCompToPlant)
      OldArrayLimit = ArrayLimit
      ArrayLimit = ArrayLimit*2
      ALLOCATE(ZoneSubCompToPlant(ArrayLimit))
      ZoneSubCompToPlant%ZoneEqListNum = 0
      ZoneSubCompToPlant%ZoneEqCompNum = 0
      ZoneSubCompToPlant%ZoneEqSubCompNum = 0
      ZoneSubCompToPlant%PlantLoopType = 0
      ZoneSubCompToPlant%PlantLoopNum = 0
      ZoneSubCompToPlant%PlantLoopBranch = 0
      ZoneSubCompToPlant%PlantLoopComp = 0
      ZoneSubCompToPlant%FirstDemandSidePtr = 0
      ZoneSubCompToPlant%LastDemandSidePtr = 0
      ZoneSubCompToPlant(1:OldArrayLimit) = TempZoneSubCompToPlant(1:OldArrayLimit)
      DEALLOCATE(TempZoneSubCompToPlant)
      ALLOCATE(TempZoneSubCompToPlant(ArrayLimit))
      TempZoneSubCompToPlant%ZoneEqListNum = 0
      TempZoneSubCompToPlant%ZoneEqCompNum = 0
      TempZoneSubCompToPlant%ZoneEqSubCompNum = 0
      TempZoneSubCompToPlant%PlantLoopType = 0
      TempZoneSubCompToPlant%PlantLoopNum = 0
      TempZoneSubCompToPlant%PlantLoopBranch = 0
      TempZoneSubCompToPlant%PlantLoopComp = 0
      TempZoneSubCompToPlant%FirstDemandSidePtr = 0
      TempZoneSubCompToPlant%LastDemandSidePtr = 0
      Index = ArrayCounter
      ZoneSubCompToPlant(Index)%ZoneEqListNum = ListNum
      ZoneSubCompToPlant(Index)%ZoneEqCompNum = AirDistUnitNum
      ZoneSubCompToPlant(Index)%ZoneEqSubCompNum = SubCompNum
      ZoneSubCompToPlant(Index)%PlantLoopType = PlantLoopType
      ZoneSubCompToPlant(Index)%PlantLoopNum = PlantLoop
      ZoneSubCompToPlant(Index)%PlantLoopBranch = PlantBranch
      ZoneSubCompToPlant(Index)%PlantLoopComp = PlantComp
      ArrayCounter = ArrayCounter + 1
    END IF
  RETURN
END SUBROUTINE UpdateZoneSubCompPtrArray