Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(out) | :: | X(:) | |||
real(kind=r64), | intent(in) | :: | AP(:) | |||
real(kind=r64), | intent(in) | :: | AE(:) | |||
real(kind=r64), | intent(in) | :: | AW(:) | |||
real(kind=r64), | intent(in) | :: | BP(:) | |||
integer, | intent(in) | :: | N |
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 TDMA_R(X, AP, AE, AW, BP, N)
!
! SUBROUTINE INFORMATION:
! AUTHOR JOHN L. WRIGHT
! DATE WRITTEN unknown
! MODIFIED na
!
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! TDMA solver
!
!
! METHODOLOGY EMPLOYED:
! 1-D TDMA reverse solver. East/West sweep followed by West/East sweep
!
!
! REFERENCES:
! na
!
! USE STATEMENTS:
! na
!
!
IMPLICIT NONE
! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), INTENT(OUT) :: X(:)
REAL(r64), INTENT(IN) :: AP(:)
REAL(r64), INTENT(IN) :: AE(:)
REAL(r64), INTENT(IN) :: AW(:)
REAL(r64), INTENT(IN) :: BP(:)
INTEGER, INTENT(IN) :: N
!
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: J
REAL(r64) :: ALPHA( N), BETA( N)
! Flow
ALPHA(N)=AW(N)/AP(N)
BETA(N) =BP(N)/AP(N)
DO J=N-1,1,-1
ALPHA(J)= AW(J) / ( AP(J)-(ALPHA(J+1)*AE(J)) )
BETA(J) = ((AE(J)*BETA(J+1)) + BP(J)) &
/ ( AP(J)-(ALPHA(J+1)*AE(J)) )
END DO
X(1) = BETA(1)
DO J=2,N
X(J)=( ALPHA(J)*X(J-1) ) + BETA(J)
END DO
RETURN
END SUBROUTINE TDMA_R