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 | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | ComponentType | |||
character(len=*), | intent(in) | :: | ComponentName | |||
logical, | intent(inout) | :: | IsParent | |||
integer | :: | NumInlets | ||||
character(len=*), | ALLOCATABLE, DIMENSION(:) | :: | InletNodeNames | |||
integer, | ALLOCATABLE, DIMENSION(:) | :: | InletNodeNums | |||
integer, | ALLOCATABLE, DIMENSION(:) | :: | InletFluidStreams | |||
integer | :: | NumOutlets | ||||
character(len=*), | ALLOCATABLE, DIMENSION(:) | :: | OutletNodeNames | |||
integer, | ALLOCATABLE, DIMENSION(:) | :: | OutletNodeNums | |||
integer, | ALLOCATABLE, DIMENSION(:) | :: | OutletFluidStreams | |||
logical, | intent(inout) | :: | ErrorsFound |
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 GetComponentData(ComponentType,ComponentName,IsParent, &
NumInlets,InletNodeNames,InletNodeNums,InletFluidStreams, &
NumOutlets,OutletNodeNames,OutletNodeNums,OutletFluidStreams, &
ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN May 2005
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This routine gets data for a given Component Type and Name Name.
! METHODOLOGY EMPLOYED:
! Traverses CompSet structure.
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: FindItemInList,SameString
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: ComponentType
CHARACTER(len=*), INTENT(IN) :: ComponentName
LOGICAL, INTENT(INOUT) :: IsParent
INTEGER :: NumInlets
CHARACTER(len=*),ALLOCATABLE, DIMENSION(:) :: InletNodeNames
INTEGER, ALLOCATABLE, DIMENSION(:) :: InletNodeNums
INTEGER, ALLOCATABLE, DIMENSION(:) :: InletFluidStreams
CHARACTER(len=*),ALLOCATABLE, DIMENSION(:) :: OutletNodeNames
INTEGER :: NumOutlets
INTEGER, ALLOCATABLE, DIMENSION(:) :: OutletNodeNums
INTEGER, ALLOCATABLE, DIMENSION(:) :: OutletFluidStreams
LOGICAL, INTENT(INOUT) :: ErrorsFound
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
! INTEGER Loop
LOGICAL ErrInObject
INTEGER Which
!unused1109 LOGICAL FoundObject
IF (ALLOCATED(InletNodeNames)) DEALLOCATE(InletNodeNames)
IF (ALLOCATED(InletNodeNums)) DEALLOCATE(InletNodeNums)
IF (ALLOCATED(InletFluidStreams)) DEALLOCATE(InletFluidStreams)
IF (ALLOCATED(OutletNodeNames)) DEALLOCATE(OutletNodeNames)
IF (ALLOCATED(OutletNodeNums)) DEALLOCATE(OutletNodeNums)
IF (ALLOCATED(OutletFluidStreams)) DEALLOCATE(OutletFluidStreams)
NumInlets=0
NumOutlets=0
! FoundObject=.false.
IsParent=.false.
DO Which=1,NumOfNodeConnections
IF (NodeConnections(Which)%ObjectType /= ComponentType .or. NodeConnections(Which)%ObjectName /= ComponentName) CYCLE
! FoundObject=.true.
IF (NodeConnections(Which)%ObjectIsParent) IsParent=.true.
IF (SameString(NodeConnections(Which)%ConnectionType,'Inlet')) NumInlets=NumInlets+1
IF (SameString(NodeConnections(Which)%ConnectionType,'Outlet')) NumOutlets=NumOutlets+1
ENDDO
ALLOCATE(InletNodeNames(NumInlets))
ALLOCATE(InletNodeNums(NumInlets))
ALLOCATE(InletFluidStreams(NumInlets))
ALLOCATE(OutletNodeNames(NumOutlets))
ALLOCATE(OutletNodeNums(NumOutlets))
ALLOCATE(OutletFluidStreams(NumOutlets))
InletNodeNames=Blank
InletNodeNums=0
InletFluidStreams=0
OutletNodeNames=Blank
OutletNodeNums=0
OutletFluidStreams=0
NumInlets=0
NumOutlets=0
ErrInObject=.false.
! IF (IsParentObject(ComponentType,ComponentName)) THEN
! IsParent=.true.
! ENDIF
DO Which=1,NumOfNodeConnections
IF (NodeConnections(Which)%ObjectType /= ComponentType .or. NodeConnections(Which)%ObjectName /= ComponentName) CYCLE
IF (SameString(NodeConnections(Which)%ConnectionType,'Inlet')) THEN
NumInlets=NumInlets+1
InletNodeNames(NumInlets)=NodeConnections(Which)%NodeName
InletNodeNums(NumInlets)=NodeConnections(Which)%NodeNumber
InletFluidStreams(NumInlets)=NodeConnections(Which)%FluidStream
ENDIF
IF (SameString(NodeConnections(Which)%ConnectionType,'Outlet')) THEN
NumOutlets=NumOutlets+1
OutletNodeNames(NumOutlets)=NodeConnections(Which)%NodeName
OutletNodeNums(NumOutlets)=NodeConnections(Which)%NodeNumber
OutletFluidStreams(NumOutlets)=NodeConnections(Which)%FluidStream
ENDIF
ENDDO
IF (ErrInObject) THEN
CALL ShowWarningError('GetComponentData: Component Type='//TRIM(ComponentType)// &
', Component Name='//TRIM(ComponentName)//' not found.')
ENDIF
IF (ErrInObject) ErrorsFound=.true.
RETURN
END SUBROUTINE GetComponentData