Skip to content

Commit

Permalink
Add INTENT(OUT) attribute and init variables
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrack committed Feb 7, 2019
1 parent 7841132 commit 75b56d4
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/common/whittaker.F
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ MODULE whittaker
SUBROUTINE whittaker_c0a(wc, r, expa, erfa, alpha, l1, l2, n)
INTEGER, INTENT(IN) :: n, l2, l1
REAL(KIND=dp), INTENT(IN) :: alpha
REAL(KIND=dp), DIMENSION(n) :: erfa, expa, r, wc
REAL(KIND=dp), DIMENSION(n), INTENT(IN) :: erfa, expa, r
REAL(KIND=dp), DIMENSION(n), INTENT(OUT) :: wc

CHARACTER(len=*), PARAMETER :: routineN = 'whittaker_c0a', routineP = moduleN//':'//routineN

Expand All @@ -65,6 +66,7 @@ SUBROUTINE whittaker_c0a(wc, r, expa, erfa, alpha, l1, l2, n)
CPABORT("l1 >= l2")
END IF

wc(:) = 0.0_dp
t1 = SQRT(alpha)
y = REAL(l, dp)
DO i = 1, n
Expand Down Expand Up @@ -109,7 +111,8 @@ END SUBROUTINE whittaker_c0a
SUBROUTINE whittaker_c0(wc, r, expa, erfa, alpha, l, n)
INTEGER, INTENT(IN) :: n, l
REAL(KIND=dp), INTENT(IN) :: alpha
REAL(KIND=dp), DIMENSION(n) :: erfa, expa, r, wc
REAL(KIND=dp), DIMENSION(n), INTENT(IN) :: erfa, expa, r
REAL(KIND=dp), DIMENSION(n), INTENT(OUT) :: wc

CHARACTER(len=*), PARAMETER :: routineN = 'whittaker_c0', routineP = moduleN//':'//routineN

Expand All @@ -122,6 +125,8 @@ SUBROUTINE whittaker_c0(wc, r, expa, erfa, alpha, l, n)
CPABORT("Angular momentum has to be even")
END IF

wc(:) = 0.0_dp

SELECT CASE (l)

CASE DEFAULT
Expand Down Expand Up @@ -336,7 +341,8 @@ END SUBROUTINE whittaker_c0
SUBROUTINE whittaker_ci(wc, r, expa, alpha, l, n)
INTEGER, INTENT(IN) :: n, l
REAL(KIND=dp), INTENT(IN) :: alpha
REAL(KIND=dp), DIMENSION(n) :: expa, r, wc
REAL(KIND=dp), DIMENSION(n), INTENT(IN) :: expa, r
REAL(KIND=dp), DIMENSION(n), INTENT(OUT) :: wc

CHARACTER(len=*), PARAMETER :: routineN = 'whittaker_ci', routineP = moduleN//':'//routineN

Expand All @@ -349,6 +355,8 @@ SUBROUTINE whittaker_ci(wc, r, expa, alpha, l, n)
CPABORT("Angular momentum has to be even")
END IF

wc(:) = 0.0_dp

SELECT CASE (l)

CASE DEFAULT
Expand Down

0 comments on commit 75b56d4

Please sign in to comment.