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) | :: | SurfNum | |||
integer, | intent(in) | :: | NSides | |||
real(kind=r64), | intent(inout) | :: | SurfAzimuth | |||
real(kind=r64), | intent(inout) | :: | SurfTilt |
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 ReverseAndRecalculate(SurfNum,NSides,SurfAzimuth,SurfTilt)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN February 2011
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This routine reverses the vertices for a surface (needed when roof/floor is upside down)
! and recalculates the azimuth, etc for the surface.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE Vectors
USE General, ONLY: RoundSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: SurfNum ! Surface number for the surface
INTEGER, INTENT(IN) :: NSides ! number of sides to surface
REAL(r64), INTENT(INOUT) :: SurfAzimuth ! Surface Facing angle (will be 0 for roofs/floors)
REAL(r64), INTENT(INOUT) :: SurfTilt ! Surface tilt (
! SUBROUTINE PARAMETER DEFINITIONS:
character(len=*), parameter :: fmt3="(A,I5,A,3(1x,f18.13))"
character(len=*), parameter :: RoutineName='ReverseAndRecalculate: '
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: N ! Loop Control
INTEGER :: RevPtr ! pointer for reversing vertices
TYPE(vector), DIMENSION(NSides) :: Vertices ! Vertices, in specified order
CHARACTER(len=10) :: TiltString
DO N=1,NSides
Vertices(N)=SurfaceTmp(SurfNum)%Vertex(N)
ENDDO
RevPtr=NSides
DO N=1,NSides
SurfaceTmp(SurfNum)%Vertex(N)=Vertices(RevPtr)
RevPtr=RevPtr-1
ENDDO
write(outputfiledebug,*) 'Reversing Surface Name='//trim(surfacetmp(surfnum)%Name)
do N=1,nsides
write(outputfiledebug,fmt3) 'side=',n,' abs coord vertex=',surfacetmp(surfnum)%vertex(n)%x, &
surfacetmp(surfnum)%vertex(n)%y,surfacetmp(surfnum)%vertex(n)%z
enddo
CALL CreateNewellSurfaceNormalVector(SurfaceTmp(SurfNum)%Vertex,SurfaceTmp(SurfNum)%Sides, &
SurfaceTmp(SurfNum)%NewellSurfaceNormalVector)
CALL DetermineAzimuthAndTilt(SurfaceTmp(SurfNum)%Vertex,SurfaceTmp(SurfNum)%Sides,SurfAzimuth,SurfTilt, &
SurfaceTmp(SurfNum)%lcsx,SurfaceTmp(SurfNum)%lcsy,SurfaceTmp(SurfNum)%lcsz, &
SurfaceTmp(SurfNum)%GrossArea,SurfaceTmp(SurfNum)%NewellSurfaceNormalVector)
IF (SurfaceTmp(SurfNum)%Class == SurfaceClass_Roof .and. SurfTilt > 80.0d0) THEN
TiltString=RoundSigDigits(SurfTilt,1)
CALL ShowWarningError(RoutineName//'Roof/Ceiling is still upside down! Tilt angle=['//TRIM(TiltString)// &
'], should be near 0, please fix manually.')
ENDIF
IF (SurfaceTmp(SurfNum)%Class == SurfaceClass_Floor .and. SurfTilt < 158.2d0) THEN ! 40% grade!
CALL ShowWarningError(RoutineName//'Floor is still upside down! Tilt angle=['//TRIM(TiltString)// &
'], should be near 180, please fix manually.')
ENDIF
RETURN
END SUBROUTINE ReverseAndRecalculate