Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | DomainNum | |||
integer, | intent(in) | :: | CellType |
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.
REAL(r64) FUNCTION GetAverageTempByType(DomainNum, CellType) RESULT (RetVal)
! FUNCTION INFORMATION:
! AUTHOR Edwin Lee
! DATE WRITTEN Summer 2011
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! <description>
! METHODOLOGY EMPLOYED:
! <description>
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: DomainNum
INTEGER, INTENT(IN) :: CellType
! FUNCTION PARAMETER DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: RunningSummation
INTEGER :: RunningCounter
INTEGER :: X, Y, Z
RunningSummation = 0.0d0
RunningCounter = 0
DO Z = LBOUND(PipingSystemDomains(DomainNum)%Cells,3), UBOUND(PipingSystemDomains(DomainNum)%Cells,3)
DO Y = LBOUND(PipingSystemDomains(DomainNum)%Cells,2), UBOUND(PipingSystemDomains(DomainNum)%Cells,2)
DO X = LBOUND(PipingSystemDomains(DomainNum)%Cells,1), UBOUND(PipingSystemDomains(DomainNum)%Cells,1)
IF (PipingSystemDomains(DomainNum)%Cells(X, Y, Z)%CellType == CellType) THEN
RunningCounter = RunningCounter + 1
RunningSummation = RunningSummation + PipingSystemDomains(DomainNum)%Cells(X, Y, Z)%MyBase%Temperature
END IF
END DO
END DO
END DO
IF (RunningCounter > 0) THEN
RetVal = RunningSummation / REAL(RunningCounter,r64)
ELSE
!ERROR!!!
RetVal = 0.0d0 !Objexx:Return Line added to assure return value is set: Proper error handling needed here!
END IF
RETURN
END FUNCTION GetAverageTempByType