29 function dphi(ng,csii,csij)
31 implicit real*8 (a-h,o-z)
35 call GET_LEGENDRE_VALUE_2DER(p2der2,p2,p2der,p1,p1der,ng,csii)
36 call GET_LEGENDRE_VALUE_2DER(q2der2,q2,q2der,q1,q1der,ng,csij)
38 if(abs(csij + 1.d0).le. 1.e-8 .and. abs(csii + 1.d0).le. 1.e-8) then
39 dphi = -(ng+1.d0)*ng/4.d0
40 elseif(abs(csij - 1.d0).le. 1.e-8 .and. abs(csii - 1.d0).le. 1.e-8)
then
41 dphi = (ng+1.d0)*ng/4.d0
42 elseif(abs(csii - csij).le. 1.e-8)
then
45 anum = (csij-csii)*ng*(ng+1.d0)*q2 + (1.d0-csij**2.d0)*q2der
46 aden = p2*ng*(ng+1.d0)*(csii - csij)**2.d0
50 if(abs(dphi) .lt. 1.e-10)
then