Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | PTUnitCompIndex | |||
integer, | intent(in) | :: | PTUnitType |
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.
INTEGER FUNCTION GetPTUnitOutAirNode(PTUnitCompIndex, PTUnitType)
! FUNCTION INFORMATION:
! AUTHOR B Griffith
! DATE WRITTEN Dec 2006
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! lookup function for OA inlet node
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
USE DataZoneEquipment, ONLY: PkgTermHPAirToAir_Num, PkgTermHPWaterToAir_Num, PkgTermACAirToAir_Num
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
INTEGER, INTENT (IN) :: PTUnitCompIndex
INTEGER, INTENT (IN) :: PTUnitType
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: PTUnitNum
IF (GetPTUnitInputFlag) THEN
CALL GetPTUnit
GetPTUnitInputFlag = .FALSE.
END IF
GetPTUnitOutAirNode = 0
! PTHP, PTAC and PTWSHP share the same data structure which was allocated to total number of all three
! objects in the input file. Whereas zone availability manager associated with each type (i.e. PTAC, PTHP and PTWSHP)
! is allocated to total number of objects of each type. This led to crash for the case when PTAC, PTHP and PTWSHP
! objects were mixed together. To address this, CompIndex in SimPackagedTerminalUnit is calculated for each object type.
! So ZoneEquipList()%EquipIndex() passed to this subroutine (which is actually CompIndex), is based on each object type
! which was recalculated for total number of all three object type for use in PT data structure.
SELECT CASE (PTUnitType)
CASE (PkgTermHPAirToAir_Num)
PTUnitNum = PTUnitCompIndex
CASE (PkgTermACAirToAir_Num)
PTUnitNum = PTUnitCompIndex + NumPTHP
CASE (PkgTermHPWaterToAir_Num)
PTUnitNum = PTUnitCompIndex + NumPTHP + NumPTAC
CASE DEFAULT
END SELECT
IF (PTUnitNum > 0 .and. PTUnitNum <= NumPTUs) THEN
GetPTUnitOutAirNode = PTUnit(PTUnitNum)%OutsideAirNode
ENDIF
RETURN
END FUNCTION GetPTUnitOutAirNode