Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | NodeName | |||
logical, | intent(inout) | :: | errFlag | |||
character(len=*), | intent(in) | :: | NodeObjectType | |||
character(len=*), | intent(in) | :: | NodeObjectName | |||
integer, | intent(in) | :: | NodeFluidType | |||
integer, | intent(in) | :: | NodeConnectionType | |||
integer, | intent(in) | :: | NodeFluidStream | |||
logical, | intent(in) | :: | ObjectIsParent | |||
character(len=*), | intent(in), | optional | :: | InputFieldName |
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.
FUNCTION GetOnlySingleNode(NodeName,errFlag,NodeObjectType,NodeObjectName,NodeFluidType,NodeConnectionType, &
NodeFluidStream,ObjectIsParent,InputFieldName) RESULT (GetSingleNodeResult)
! FUNCTION INFORMATION:
! AUTHOR Linda K. Lawrie; adapted from GasAbsorptionChiller;Jason Glazer
! DATE WRITTEN December 2001
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function gets a single node (or error message results) using the
! node id from the input file.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: NodeName
LOGICAL, INTENT(INOUT) :: errFlag
CHARACTER(len=*), INTENT(IN) :: NodeObjectType ! Node Object Type (i.e. "Chiller:Electric")
CHARACTER(len=*), INTENT(IN) :: NodeObjectName ! Node Object Name (i.e. "MyChiller")
INTEGER, INTENT(IN) :: NodeFluidType ! Fluidtype for checking/setting node FluidType
INTEGER, INTENT(IN) :: NodeConnectionType ! Node Connection Type (see DataLoopNode)
INTEGER, INTENT(IN) :: NodeFluidStream ! Which Fluid Stream (1,2,3,...)
LOGICAL, INTENT(IN) :: ObjectIsParent ! True/False
INTEGER :: GetSingleNodeResult
CHARACTER(len=*), INTENT(IN), OPTIONAL :: InputFieldName ! Input Field Name
! FUNCTION PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: RoutineName='GetOnlySingleNode: '
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: NumNodes
INTEGER, ALLOCATABLE, DIMENSION(:), SAVE :: NodeNums
INTEGER :: FluidType
CHARACTER(len=32) :: ConnectionType
LOGICAL, SAVE :: firsttime=.true.
INTEGER :: NumParams
INTEGER :: NumAlphas
INTEGER :: NumNums
if (firsttime) then
CALL GetObjectDefMaxArgs('NodeList',NumParams,NumAlphas,NumNums)
ALLOCATE(NodeNums(NumParams))
NodeNums=0
firsttime=.false.
endif
FluidType=NodeFluidType
CALL GetNodeNums(NodeName,NumNodes,NodeNums,ErrFlag,FluidType,NodeObjectType,NodeObjectName,NodeConnectionType, &
NodeFluidStream,ObjectIsParent,InputFieldName=InputFieldName)
IF (NumNodes > 1) THEN
CALL ShowSevereError(RoutineName//trim(NodeObjectType)//'="'//trim(NodeObjectName)//'", invalid data.')
IF (PRESENT(InputFieldName)) CALL ShowContinueError('...Ref field='//trim(InputFieldName))
CALL ShowContinueError('Only 1st Node used from NodeList="'//TRIM(NodeName)//'".')
CALL ShowContinueError('...a Nodelist may not be valid in this context.')
errFlag=.true.
ELSEIF (NumNodes == 0) THEN
NodeNums(1)=0
ENDIF
IF (NumNodes > 0) THEN
IF (NodeConnectionType >= 1 .and. NodeConnectionType <= NumValidConnectionTypes) THEN
ConnectionType=ValidConnectionTypes(NodeConnectionType)
ELSE
ConnectionType=trim(TrimSigDigits(NodeConnectionType))//'-unknown'
ENDIF
! CALL RegisterNodeConnection(NodeNums(1),NodeID(NodeNums(1)),NodeObjectType,NodeObjectName, &
! ConnectionType,NodeFluidStream,ObjectIsParent,errFlag)
ENDIF
GetSingleNodeResult = NodeNums(1)
RETURN
END FUNCTION GetOnlySingleNode