7 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8 ! Heuman's function (KP!!2 = 1-K!!2) !
10 ! (PI/2)* LAMBDA0(PSI,K) = !
12 ! = E(K)*F(PSI,KP) + K(K)*( E(PSI,KP) - F(PSI,KP) ) !
14 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16 DOUBLE PRECISION FUNCTION LAMBDA0(PSI
,K
)
18 !!!!! variables 'dummy' y variables internas !!!!!!!!!!!!!!!!!!!!!!!!!!!
21 PSI
,K
,KFUN
,EFUN
,KP
,FINTEL
,EINTEL
,PI
,DPI
23 !!!!! COMMON variables !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29 CALL ELIPT0(K
,KFUN
,EFUN
)
33 CALL ELIPT(PSI
,KP
,FINTEL
,EINTEL
)
35 LAMBDA0
= (2.D0
/PI
)*( EFUN
*FINTEL
+ KFUN
*( EINTEL
-FINTEL
) )
40 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
41 ! Incomplete elliptic integrals
42 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
44 SUBROUTINE ELIPT(PSI
,K
,FINTEL
,EINTEL
)
46 !!!!! variables 'dummy' y variables internas !!!!!!!!!!!!!!!!!!!!!!!!!!!
48 DOUBLE PRECISION PSI
,K
,FINTEL
,EINTEL
,S
,C
51 !!!!! function names !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
53 DOUBLE PRECISION DRF
,DRD
55 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
60 FINTEL
= S
*DRF(C
**2,1.D0
-(K
*S
)**2,1.D0
,IERR
)
63 WRITE(6,*) 'STOP EN FINTEL','IERR =',IERR
68 - (K
**2/3.D0
)*S
**3*DRD(C
**2,1.D0
-(K
*S
)**2,1.D0
,IERR
)
71 WRITE(6,*) 'STOP EN EINTEL','IERR =',IERR
78 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
79 ! Complete elliptic integrals
80 ! poner los limites en K = 0
81 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
83 SUBROUTINE ELIPT0(K
,KFUN
,EFUN
)
85 !!!!! variables 'dummy' y variables internas !!!!!!!!!!!!!!!!!!!!!!!!!!!
87 DOUBLE PRECISION K
,KFUN
,EFUN
90 !!!!! function names !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
92 DOUBLE PRECISION DRF
,DRD
94 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
96 KFUN
= DRF(0.D0
,1.D0
-K
**2,1.D0
,IERR
)
99 WRITE(6,*) 'STOP IN KFUN','IERR =',IERR
104 - (K
**2/3.D0
)*DRD(0.D0
,1.D0
-K
**2,1.D0
,IERR
)
107 WRITE(6,*) 'STOP IN EFUN','IERR =',IERR
112 END SUBROUTINE ELIPT0
114 SUBROUTINE ELIPTK0(K
,KFUN
)
116 !!!!! variables 'dummy' y variables internas !!!!!!!!!!!!!!!!!!!!!!!!!!!
118 DOUBLE PRECISION K
,KFUN
121 !!!!! function names !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
125 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
127 KFUN
= DRF(0.D0
,1.D0
-K
**2,1.D0
,IERR
)
130 WRITE(6,*) 'STOP IN KFUN','IERR =',IERR
135 END SUBROUTINE ELIPTK0