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 | |||
type(vector) | :: | CompCoordTranslVector |
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 CalcCoordinateTransformation(SurfNum,CompCoordTranslVector)
! SUBROUTINE INFORMATION:
! AUTHOR George Walton, BLAST
! DATE WRITTEN August 1976
! MODIFIED LKL, May 2004 -- >4 sided polygons
! RE-ENGINEERED Yes
! PURPOSE OF THIS SUBROUTINE:
! This subroutine develops a coordinate transformation such that the X-axis goes
! through points 2 and 3 and the Y-axis goes through point 1
! of a plane figure in 3-d space.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! 'NECAP' - NASA'S Energy-Cost Analysis Program
! USE STATEMENTS:
USE Vectors
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: SurfNum ! Surface Number
TYPE(vector) :: CompCoordTranslVector ! Coordinate Translation Vector
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: ErrFmt="(' (',F8.3,',',F8.3,',',F8.3,')')"
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER I ! Loop Control
REAL(r64) GAMMA ! Intermediate Result
REAL(r64) DotSelfX23
CHARACTER(len=132) :: ErrLineOut=Blank ! Character string for producing error messages
TYPE (vector) :: x21
TYPE (vector) :: x23
! Determine Components of the Coordinate Translation Vector.
x21=Surface(SurfNum)%Vertex(2)-Surface(SurfNum)%Vertex(1)
x23=Surface(SurfNum)%Vertex(2)-Surface(SurfNum)%Vertex(3)
DotSelfX23=(x23 .dot. x23)
IF (ABS(DotSelfX23) <= .1d-6) THEN
CALL ShowSevereError('CalcCoordinateTransformation: Invalid dot product, surface="'// &
TRIM(Surface(SurfNum)%Name)//'":')
DO I=1,Surface(SurfNum)%Sides
WRITE(ErrLineOut,ErrFmt) Surface(SurfNum)%Vertex(I)
CALL ShowContinueError(ErrLineOut)
ENDDO
CALL ShowFatalError('CalcCoordinateTransformation: Program terminates due to preceding condition.',OutputFileStandard)
RETURN
END IF
Gamma = (x21 .dot. x23) / (x23 .dot. x23)
CompCoordTranslVector = Surface(SurfNum)%Vertex(2) + Gamma * (Surface(SurfNum)%Vertex(3)-Surface(SurfNum)%Vertex(2))
RETURN
END SUBROUTINE CalcCoordinateTransformation