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.
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 ReportNodeConnections
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN February 2004
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine 'reports' the NodeConnection data structure. It groups the
! report/dump by parent, non-parent objects.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: SameString, MakeUPPERCase
USE DataBranchNodeConnections
USE DataGlobals, ONLY: OutputFileBNDetails
USE DataLoopNode, ONLY: NumOfNodes, NodeID
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER Loop
INTEGER Loop1
INTEGER NumParents
INTEGER NumNonParents
INTEGER NumNonConnected
CHARACTER(len=20) ChrOut
LOGICAL, ALLOCATABLE, DIMENSION(:) :: NonConnectedNodes
LOGICAL ParentComponentFound
ALLOCATE(NonConnectedNodes(NumOfNodes))
NonConnectedNodes=.true.
NumParents=0
NumNonParents=0
DO Loop=1,NumOfNodeConnections
IF (NodeConnections(Loop)%ObjectIsParent) CYCLE
NumNonParents=NumNonParents+1
ENDDO
NumParents=NumOfNodeConnections-NumNonParents
ALLOCATE(ParentNodeList(NumParents))
! Do Parent Objects
WRITE(OutputFileBNDetails,701) '! ==============================================================='
WRITE(OutputFileBNDetails,702) 'Parent','Parent'
WRITE(ChrOut,*) NumParents
WRITE(OutputFileBNDetails,701) ' #Parent Node Connections,'//TRIM(ADJUSTL(ChrOut))
WRITE(OutputFileBNDetails,703) 'Parent'
DO Loop=1,NumOfNodeConnections
IF (.not. NodeConnections(Loop)%ObjectIsParent) CYCLE
NonConnectedNodes(NodeConnections(Loop)%NodeNumber)=.false.
WRITE(ChrOut,*) NodeConnections(Loop)%FluidStream
ChrOut=ADJUSTL(ChrOut)
WRITE(OutputFileBNDetails,701) ' Parent Node Connection,'//TRIM(NodeConnections(Loop)%NodeName)//','// &
TRIM(NodeConnections(Loop)%ObjectType)//','//TRIM(NodeConnections(Loop)%ObjectName)//','// &
TRIM(NodeConnections(Loop)%ConnectionType)//','//TRIM(ChrOut)
! Build ParentNodeLists
IF (SameString(NodeConnections(Loop)%ConnectionType,'Inlet') .or. &
SameString(NodeConnections(Loop)%ConnectionType,'Outlet')) THEN
ParentComponentFound=.false.
DO Loop1=1,NumOfActualParents
IF (ParentNodeList(Loop1)%CType /= NodeConnections(Loop)%ObjectType .or. &
ParentNodeList(Loop1)%CName /= NodeConnections(Loop)%ObjectName) CYCLE
ParentComponentFound=.true.
SELECT CASE (MakeUPPERCase(NodeConnections(Loop)%ConnectionType))
CASE('INLET')
ParentNodeList(Loop1)%InletNodeName=NodeConnections(Loop)%NodeName
CASE('OUTLET')
ParentNodeList(Loop1)%OutletNodeName=NodeConnections(Loop)%NodeName
END SELECT
ENDDO
IF (.not. ParentComponentFound) THEN
NumOfActualParents=NumOfActualParents+1
ParentNodeList(NumOfActualParents)%CType=NodeConnections(Loop)%ObjectType
ParentNodeList(NumOfActualParents)%CName=NodeConnections(Loop)%ObjectName
SELECT CASE (MakeUPPERCase(NodeConnections(Loop)%ConnectionType))
CASE('INLET')
ParentNodeList(NumOfActualParents)%InletNodeName=NodeConnections(Loop)%NodeName
CASE('OUTLET')
ParentNodeList(NumOfActualParents)%OutletNodeName=NodeConnections(Loop)%NodeName
END SELECT
ENDIF
ENDIF
ENDDO
! Do non-Parent Objects
WRITE(OutputFileBNDetails,701) '! ==============================================================='
WRITE(OutputFileBNDetails,702) 'Non-Parent','Non-Parent'
WRITE(ChrOut,*) NumNonParents
WRITE(OutputFileBNDetails,701) ' #Non-Parent Node Connections,'//TRIM(ADJUSTL(ChrOut))
WRITE(OutputFileBNDetails,703) 'Non-Parent'
DO Loop=1,NumOfNodeConnections
IF (NodeConnections(Loop)%ObjectIsParent) CYCLE
NonConnectedNodes(NodeConnections(Loop)%NodeNumber)=.false.
WRITE(ChrOut,*) NodeConnections(Loop)%FluidStream
ChrOut=ADJUSTL(ChrOut)
WRITE(OutputFileBNDetails,701) ' Non-Parent Node Connection,'//TRIM(NodeConnections(Loop)%NodeName)//','// &
TRIM(NodeConnections(Loop)%ObjectType)//','//TRIM(NodeConnections(Loop)%ObjectName)//','// &
TRIM(NodeConnections(Loop)%ConnectionType)//','//TRIM(ChrOut)
ENDDO
NumNonConnected=0
DO Loop=1,NumOfNodes
IF (NonConnectedNodes(Loop)) NumNonConnected=NumNonConnected+1
ENDDO
IF (NumNonConnected > 0) THEN
WRITE(OutputFileBNDetails,701) '! ==============================================================='
WRITE(ChrOut,*) NumNonConnected
WRITE(OutputFileBNDetails,705) TRIM(ADJUSTL(ChrOut))
WRITE(OutputFileBNDetails,706)
DO Loop=1,NumOfNodes
IF (.not. NonConnectedNodes(Loop)) CYCLE
WRITE(ChrOut,*) Loop
ChrOut=ADJUSTL(ChrOut)
WRITE(OutputFileBNDetails,701) ' NonConnected Node,'//TRIM(ChrOut)//','//TRIM(NodeID(Loop))
ENDDO
ENDIF
DEALLOCATE(NonConnectedNodes)
701 FORMAT(A)
702 FORMAT('! <#',A,' Node Connections>,<Number of ',A,' Node Connections>')
703 FORMAT('! <',A,' Node Connection>,<Node Name>,<Node ObjectType>,<Node ObjectName>,', &
'<Node ConnectionType>,<Node FluidStream>')
705 FORMAT('! <#NonConnected Nodes>,<Number of NonConnected Nodes>',/,' #NonConnected Nodes,',A)
706 FORMAT('! <NonConnected Node>,<NonConnected Node Number>,<NonConnected Node Name>')
RETURN
END SUBROUTINE ReportNodeConnections