Add files via upload

This commit is contained in:
Xuesong (Steve)
2018-08-28 00:46:26 -04:00
committed by GitHub
parent e17feeaad3
commit fa691eb0aa
98 changed files with 54210 additions and 0 deletions

16
code/LEGND0.f Normal file
View File

@ -0,0 +1,16 @@
C $Id: LEGND0.f,v 1.1 2009/06/09 21:51:53 daven Exp $
SUBROUTINE LEGND0 (X,PL,N)
C---Calculates ORDINARY LEGENDRE fns of X (real)
C--- from P[0] = PL(1) = 1, P[1] = X, .... P[N-1] = PL(N)
IMPLICIT NONE
INTEGER N,I
REAL*8 X,PL(N),DEN
C---Always does PL(2) = P[1]
PL(1) = 1.D0
PL(2) = X
DO I=3,N
DEN = (I-1)
PL(I) = PL(I-1)*X*(2.d0-1.D0/DEN) - PL(I-2)*(1.d0-1.D0/DEN)
ENDDO
RETURN
END