Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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.
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 TestInletOutletNodes(ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN November 2001
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine tests the branches to see if a duplicate inlet node
! exists under a different name in the sequence; likewise for outlet.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(INOUT) :: ErrorsFound
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER Count
INTEGER Other
LOGICAL, ALLOCATABLE, DIMENSION(:) :: AlreadyNoted
! Test component sets created by branches
ALLOCATE(AlreadyNoted(NumCompSets))
AlreadyNoted=.false.
DO Count=1,NumCompSets
DO Other=1,NumCompSets
IF (Count == Other) CYCLE
IF (CompSets(Count)%InletNodeName /= CompSets(Other)%InletNodeName) CYCLE
IF (AlreadyNoted(Count)) CYCLE
! All other values must match
IF (CompSets(Count)%CType /= CompSets(Other)%CType .or. &
CompSets(Count)%CName /= CompSets(Other)%CName .or. &
CompSets(Count)%OutletNodeName /= CompSets(Other)%OutletNodeName) THEN
AlreadyNoted(Other)=.true.
CALL ShowWarningError ('Node used as an inlet more than once: '//TRIM(CompSets(Count)%InletNodeName))
CALL ShowContinueError (' Used by : '//TRIM(CompSets(Count)%ParentCType)//', name='//TRIM(CompSets(Count)%ParentCName))
CALL ShowContinueError (' as inlet for: '//TRIM(CompSets(Count)%CType)//', name='//TRIM(CompSets(Count)%CName))
CALL ShowContinueError (' and by : '//TRIM(CompSets(Other)%ParentCType)//', name='//TRIM(CompSets(Other)%ParentCName))
CALL ShowContinueError (' as inlet for: '//TRIM(CompSets(Other)%CType)//', name='//TRIM(CompSets(Other)%CName))
! ErrorsFound=.true.
ENDIF
ENDDO
ENDDO
AlreadyNoted=.false.
DO Count=1,NumCompSets
DO Other=1,NumCompSets
IF (Count == Other) CYCLE
IF (CompSets(Count)%OutletNodeName /= CompSets(Other)%OutletNodeName) CYCLE
IF (AlreadyNoted(Count)) CYCLE
! All other values must match
IF (CompSets(Count)%CType /= CompSets(Other)%CType .or. &
CompSets(Count)%CName /= CompSets(Other)%CName .or. &
CompSets(Count)%InletNodeName /= CompSets(Other)%InletNodeName) THEN
AlreadyNoted(Other)=.true.
CALL ShowWarningError ('Node used as an outlet more than once: '//TRIM(CompSets(Count)%OutletNodeName))
CALL ShowContinueError (' Used by : '//TRIM(CompSets(Count)%ParentCType)// &
', name='//TRIM(CompSets(Count)%ParentCName))
CALL ShowContinueError (' as outlet for: '//TRIM(CompSets(Count)%CType)//', name='//TRIM(CompSets(Count)%CName))
CALL ShowContinueError (' and by : '//TRIM(CompSets(Other)%ParentCType)// &
', name='//TRIM(CompSets(Other)%ParentCName))
CALL ShowContinueError (' as outlet for: '//TRIM(CompSets(Other)%CType)//', name='//TRIM(CompSets(Other)%CName))
! ErrorsFound=.true.
ENDIF
ENDDO
ENDDO
DEALLOCATE(AlreadyNoted)
RETURN
END SUBROUTINE TestInletOutletNodes