Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | NS | |||
integer, | intent(in) | :: | NGRS | |||
integer, | intent(out) | :: | NVT | |||
real(kind=r64), | intent(out), | DIMENSION(:) | :: | XVT | ||
real(kind=r64), | intent(out), | DIMENSION(:) | :: | YVT | ||
real(kind=r64), | intent(out), | DIMENSION(:) | :: | ZVT |
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 CTRANS(NS,NGRS,NVT,XVT,YVT,ZVT)
! SUBROUTINE INFORMATION:
! AUTHOR Legacy Code
! DATE WRITTEN
! MODIFIED na
! RE-ENGINEERED Lawrie, Oct 2000
! PURPOSE OF THIS SUBROUTINE:
! Transforms the general coordinates of the vertices
! of surface NS to coordinates in the plane of the receiving surface NGRS.
! See subroutine 'CalcCoordinateTransformation' SurfaceGeometry Module.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! BLAST/IBLAST code, original author George Walton
! NECAP subroutine 'SHADOW'
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: NS ! Surface number whose vertex coordinates are being transformed
INTEGER, INTENT(IN) :: NGRS ! Base surface number for surface NS
INTEGER, INTENT(OUT) :: NVT ! Number of vertices for surface NS
REAL(r64), INTENT(OUT), DIMENSION(:) :: XVT ! XYZ coordinates of vertices of NS in plane of NGRS
REAL(r64), INTENT(OUT), DIMENSION(:) :: YVT
REAL(r64), INTENT(OUT), DIMENSION(:) :: ZVT
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER N ! Loop Control (vertex number)
REAL(r64) Xdif ! Intermediate Result
REAL(r64) Ydif ! Intermediate Result
REAL(r64) Zdif ! Intermediate Result
! Perform transformation.
NVT=Surface(NS)%Sides
DO N = 1, NVT
Xdif = Surface(NS)%Vertex(N)%X-X0(NGRS)
Ydif = Surface(NS)%Vertex(N)%Y-Y0(NGRS)
Zdif = Surface(NS)%Vertex(N)%Z-Z0(NGRS)
IF (ABS(Xdif) <= 1.D-15) Xdif=0.0D0
IF (ABS(Ydif) <= 1.D-15) Ydif=0.0D0
IF (ABS(Zdif) <= 1.D-15) Zdif=0.0D0
XVT(N)=Surface(NGRS)%lcsx%x*Xdif+Surface(NGRS)%lcsx%y*Ydif+Surface(NGRS)%lcsx%z*Zdif
YVT(N)=Surface(NGRS)%lcsy%x*Xdif+Surface(NGRS)%lcsy%y*Ydif+Surface(NGRS)%lcsy%z*Zdif
ZVT(N)=Surface(NGRS)%lcsz%x*Xdif+Surface(NGRS)%lcsz%y*Ydif+Surface(NGRS)%lcsz%z*Zdif
END DO
RETURN
END SUBROUTINE CTRANS