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 | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | NBS | |||
integer, | intent(in) | :: | NRS |
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 CHKBKS(NBS,NRS)
! SUBROUTINE INFORMATION:
! AUTHOR Legacy Code
! DATE WRITTEN
! MODIFIED Nov 2001, FW: Reverse subroutine arguments NRS and NBS to
! correspond to how CHKBKS is called
! Jan 2002, FW: change error message
! RE-ENGINEERED Lawrie, Oct 2000
! PURPOSE OF THIS SUBROUTINE:
! Determines whether a any vertices of the back surface are in front of the receiving surface;
! if so, gives severe error. Only base heat transfer surfaces are checked.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! BLAST/IBLAST code, original author George Walton
! USE STATEMENTS:
USE Vectors
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: NBS ! Surface Number of the potential back surface
INTEGER, INTENT(IN) :: NRS ! Surface Number of the potential shadow receiving surface
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: ValFmt="(F20.4)"
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER N ! Loop Control (vertex counter)
INTEGER NVRS ! Number of vertices of the receiving surface
INTEGER NVBS ! Number of vertices of the back surface
TYPE (Vector) AVec ! Vector from vertex 2 to vertex 1, both same surface
TYPE (Vector) BVec ! Vector from vertex 2 to vertex 3, both same surface
TYPE (Vector) CVec ! Vector perpendicular to surface at vertex 2
TYPE (Vector) DVec ! Vector from vertex 2 of first surface to vertex 'n' of second surface
REAL(r64) DOTP ! Dot product of C and D
CHARACTER(len=20) CharDotP ! for error messages
CHARACTER(len=4) VTString
NVRS=Surface(NRS)%Sides
NVBS=Surface(NBS)%Sides
! SEE IF ANY VERTICES OF THE back surface ARE IN FRONT OF THE receiving surface
AVec=Surface(NRS)%Vertex(1)-Surface(NRS)%Vertex(2)
BVec=Surface(NRS)%Vertex(3)-Surface(NRS)%Vertex(2)
CVec=BVec*AVec
DO N = 1, NVBS
DVec=Surface(NBS)%Vertex(N)-Surface(NRS)%Vertex(2)
DOTP=CVec.dot.DVec
IF (DOTP > .0009d0) THEN
CALL ShowSevereError('Problem in interior solar distribution calculation (CHKBKS)')
CALL ShowContinueError( &
' Solar Distribution = FullInteriorExterior will not work in Zone='//TRIM(Surface(NRS)%ZoneName))
WRITE(VTString,'(I4)') N
VTString=ADJUSTL(VTString)
CALL ShowContinueError( &
' because vertex '//TRIM(VTString)//' of back surface='//TRIM(Surface(NBS)%Name) &
//' is in front of receiving surface='//TRIM(Surface(NRS)%Name))
WRITE(CharDotP,ValFmt) DOTP
CharDotP=ADJUSTL(CharDotp)
CALL ShowContinueError(' (Dot Product indicator='//TRIM(CharDotP)//')')
CALL ShowContinueError(' Check surface geometry; if OK, use Solar Distribution = FullExterior instead.')
END IF
END DO
RETURN
END SUBROUTINE CHKBKS