161 REAL(KIND=
rp) z(1),w(1), alpha, beta
164 CALL zwgj (z,w,np,alpha,beta)
178 REAL(KIND=
rp) z(1),w(1), alpha, beta
181 CALL zwglj (z,w,np,alpha,beta)
185 SUBROUTINE zwgj (Z,W,NP,ALPHA,BETA)
195 parameter(nzd = nmax)
196 REAL(KIND=
xp) zd(nzd),wd(nzd),alphad,betad
197 REAL(KIND=
rp) z(1),w(1),alpha,beta
200 IF (np.GT.npmax)
THEN
201 WRITE (6,*)
'Too large polynomial degree in ZWGJ'
202 WRITE (6,*)
'Maximum polynomial degree is',nmax
203 WRITE (6,*)
'Here NP=',np
208 CALL zwgjd (zd,wd,np,alphad,betad)
216 SUBROUTINE zwgjd (Z,W,NP,ALPHA,BETA)
225 IMPLICIT REAL(KIND=XP) (a-h,o-z)
226 REAL(KIND=
xp) z(1),w(1),alpha,beta
235 WRITE (6,*)
'ZWGJD: Minimum number of Gauss points is 1',np
238 IF ((alpha.LE.-one).OR.(beta.LE.-one))
THEN
239 WRITE (6,*)
'ZWGJD: Alpha and Beta must be greater than -1'
244 z(1) = (beta-alpha)/(apb+two)
250 CALL jacg (z,np,alpha,beta)
256 fac1 = dnp1+alpha+beta+one
259 fnorm =
pnormj(np1,alpha,beta)
260 rcoef = (fnorm*fac2*fac3)/(two*fac1*dnp2)
262 CALL jacobf (p,pd,pm1,pdm1,pm2,pdm2,np2,alpha,beta,z(i))
263 w(i) = -rcoef/(p*pdm1)
268 SUBROUTINE zwglj (Z,W,NP,ALPHA,BETA)
278 parameter(nzd = nmax)
279 REAL(KIND=
xp) zd(nzd),wd(nzd),alphad,betad
280 REAL(KIND=
rp) z(1),w(1),alpha,beta
283 IF (np.GT.npmax)
THEN
284 WRITE (6,*)
'Too large polynomial degree in ZWGLJ'
285 WRITE (6,*)
'Maximum polynomial degree is',nmax
286 WRITE (6,*)
'Here NP=',np
291 CALL zwgljd (zd,wd,np,alphad,betad)
308 IMPLICIT REAL(KIND=XP) (a-h,o-z)
309 REAL(KIND=
xp) z(np),w(np),alpha,beta
317 WRITE (6,*)
'ZWGLJD: Minimum number of Gauss-Lobatto points is 2'
318 WRITE (6,*)
'ZWGLJD: alpha,beta:',alpha,beta,np
321 IF ((alpha.LE.-one).OR.(beta.LE.-one))
THEN
322 WRITE (6,*)
'ZWGLJD: Alpha and Beta must be greater than -1'
329 CALL zwgjd (z(2),w(2),nm1,alpg,betg)
334 w(i) = w(i)/(one-z(i)**2)
336 CALL jacobf (p,pd,pm1,pdm1,pm2,pdm2,n,alpha,beta,z(1))
337 w(1) =
endw1(n,alpha,beta)/(two*pd)
338 CALL jacobf (p,pd,pm1,pdm1,pm2,pdm2,n,alpha,beta,z(np))
339 w(np) =
endw2(n,alpha,beta)/(two*pd)
345 IMPLICIT REAL(KIND=XP) (a-h,o-z)
346 REAL(kind=
xp) alpha,beta
358 f1 = f1*(apb+two)*two**(apb+two)/two
364 fint1 = fint1*two**(apb+two)
366 fint2 = fint2*two**(apb+three)
367 f2 = (-two*(beta+two)*fint1 + (apb+four)*fint2) &
377 a1 = -(two*(di+alpha)*(di+beta))/(abn*abnn*(abnn+one))
378 a2 = (two*(alpha-beta))/(abnn*(abnn+two))
379 a3 = (two*(abn+one))/((abnn+two)*(abnn+one))
380 f3 = -(a2*f2+a1*f1)/a3
389 IMPLICIT REAL(KIND=XP) (a-h,o-z)
390 REAL(kind=
xp) alpha,beta
402 f1 = f1*(apb+two)*two**(apb+two)/two
408 fint1 = fint1*two**(apb+two)
410 fint2 = fint2*two**(apb+three)
411 f2 = (two*(alpha+two)*fint1 - (apb+four)*fint2) &
421 a1 = -(two*(di+alpha)*(di+beta))/(abn*abnn*(abnn+one))
422 a2 = (two*(alpha-beta))/(abnn*(abnn+two))
423 a3 = (two*(abn+one))/((abnn+two)*(abnn+one))
424 f3 = -(a2*f2+a1*f1)/a3
433 IMPLICIT REAL(KIND=XP) (a-h,o-z)
442 IF (x.EQ.-half)
gammaf = -two*sqrt(pi)
443 IF (x.EQ. half)
gammaf = sqrt(pi)
444 IF (x.EQ. one )
gammaf = one
445 IF (x.EQ. two )
gammaf = one
446 IF (x.EQ. 1.5 )
gammaf = sqrt(pi)/2.
447 IF (x.EQ. 2.5)
gammaf = 1.5*sqrt(pi)/2.
448 IF (x.EQ. 3.5)
gammaf = 0.5*(2.5*(1.5*sqrt(pi)))
449 IF (x.EQ. 3. )
gammaf = 2.
450 IF (x.EQ. 4. )
gammaf = 6.
451 IF (x.EQ. 5. )
gammaf = 24.
452 IF (x.EQ. 6. )
gammaf = 120.
457 IMPLICIT REAL(KIND=XP) (a-h,o-z)
458 REAL(kind=
xp) alpha,beta
462 const = alpha+beta+one
466 pnormj = prod * two**const/(two*dn+const)
470 prod = prod/(two*(one+const)*
gammaf(const+one))
471 prod = prod*(one+alpha)*(two+alpha)
472 prod = prod*(one+beta)*(two+beta)
475 frac = (dindx+alpha)*(dindx+beta)/(dindx*(dindx+alpha+beta))
478 pnormj = prod * two**const/(two*dn+const)
482 SUBROUTINE jacg (XJAC,NP,ALPHA,BETA)
493 IMPLICIT REAL(KIND=XP) (a-h,o-z)
494 REAL(KIND=
xp) xjac(1)
499 dth = 4.*atan(one)/(2.*((n))+2.)
502 x = cos((2.*(((j))-1.)+1.)*dth)
504 x1 = cos((2.*(((j))-1.)+1.)*dth)
509 CALL jacobf (p,pd,pm1,pdm1,pm2,pdm2,np,alpha,beta,x)
513 recsum = recsum+1./(x-xjac(np-i+1))
515 delx = -p/(pd-recsum*p)
517 IF (abs(delx) .LT. eps)
GOTO 31
526 IF (xjac(j).LT.xmin)
THEN
540 SUBROUTINE jacobf (POLY,PDER,POLYM1,PDERM1,POLYM2,PDERM2,N,ALP,BET,X)
547 IMPLICIT REAL(KIND=XP) (a-h,o-z)
554 poly = (alp-bet+(apb+2.)*x)/2.
559 a1 = 2.*dk*(dk+apb)*(2.*dk+apb-2.)
560 a2 = (2.*dk+apb-1.)*(alp**2-bet**2)
562 a3 = b3*(b3+1.)*(b3+2.)
563 a4 = 2.*(dk+alp-1.)*(dk+bet-1.)*(2.*dk+apb)
564 polyn = ((a2+a3*x)*poly-a4*polyl)/a1
565 pdern = ((a2+a3*x)*pder-a4*pderl+a3*poly)/a1
580 REAL(kind=
xp)
FUNCTION hgj (II,Z,ZGJ,NP,ALPHA,BETA)
589 parameter(nzd = nmax)
590 REAL(kind=
xp) zd,zgjd(nzd),alphad,betad
591 REAL(kind=
xp) z,zgj(1),alpha,beta
593 IF (np.GT.npmax)
THEN
594 WRITE (6,*)
'Too large polynomial degree in HGJ'
595 WRITE (6,*)
'Maximum polynomial degree is',nmax
596 WRITE (6,*)
'Here NP=',np
605 hgj =
hgjd(ii,zd,zgjd,np,alphad,betad)
609 REAL(kind=
xp)
FUNCTION hgjd (II,Z,ZGJ,NP,ALPHA,BETA)
617 IMPLICIT REAL(KIND=XP) (a-h,o-z)
618 REAL(kind=
xp) z,zgj(1),alpha,beta
623 IF (abs(dz).LT.eps)
THEN
627 CALL jacobf (pzi,pdzi,pm1,pdm1,pm2,pdm2,np,alpha,beta,zi)
628 CALL jacobf (pz,pdz,pm1,pdm1,pm2,pdm2,np,alpha,beta,z)
629 hgjd = pz/(pdzi*(z-zi))
633 REAL(kind=
xp)
FUNCTION hglj (II,Z,ZGLJ,NP,ALPHA,BETA)
642 parameter(nzd = nmax)
643 REAL(kind=
xp) zd,zgljd(nzd),alphad,betad
644 REAL(kind=
xp) z,zglj(1),alpha,beta
646 IF (np.GT.npmax)
THEN
647 WRITE (6,*)
'Too large polynomial degree in HGLJ'
648 WRITE (6,*)
'Maximum polynomial degree is',nmax
649 WRITE (6,*)
'Here NP=',np
658 hglj =
hgljd(ii,zd,zgljd,np,alphad,betad)
662 REAL(kind=
xp)
FUNCTION hgljd (I,Z,ZGLJ,NP,ALPHA,BETA)
670 IMPLICIT REAL(KIND=XP) (a-h,o-z)
671 REAL(kind=
xp) z,zglj(1),alpha,beta
676 IF (abs(dz).LT.eps)
THEN
682 eigval = -dn*(dn+alpha+beta+one)
683 CALL jacobf (pi,pdi,pm1,pdm1,pm2,pdm2,n,alpha,beta,zi)
684 const = eigval*pi+alpha*(one+zi)*pdi-beta*(one-zi)*pdi
685 CALL jacobf (p,pd,pm1,pdm1,pm2,pdm2,n,alpha,beta,z)
686 hgljd = (one-z**2)*pd/(const*(z-zi))
690 SUBROUTINE dgj (D,DT,Z,NZ,NZD,ALPHA,BETA)
701 parameter(nzdd = nmax)
702 REAL(KIND=
xp) dd(nzdd,nzdd),dtd(nzdd,nzdd),zd(nzdd),alphad,betad
703 REAL(KIND=
xp) d(nzd,nzd),dt(nzd,nzd),z(1),alpha,beta
706 WRITE (6,*)
'DGJ: Minimum number of Gauss points is 1'
709 IF (nz .GT. nmax)
THEN
710 WRITE (6,*)
'Too large polynomial degree in DGJ'
711 WRITE (6,*)
'Maximum polynomial degree is',nmax
712 WRITE (6,*)
'Here Nz=',nz
715 IF ((alpha.LE.-1.).OR.(beta.LE.-1.))
THEN
716 WRITE (6,*)
'DGJ: Alpha and Beta must be greater than -1'
724 CALL dgjd (dd,dtd,zd,nz,nzdd,alphad,betad)
734 SUBROUTINE dgjd (D,DT,Z,NZ,NZD,ALPHA,BETA)
744 IMPLICIT REAL(KIND=XP) (a-h,o-z)
745 REAL(KIND=
xp) d(nzd,nzd),dt(nzd,nzd),z(1),alpha,beta
752 WRITE (6,*)
'DGJD: Minimum number of Gauss-Lobatto points is 2'
755 IF ((alpha.LE.-one).OR.(beta.LE.-one))
THEN
756 WRITE (6,*)
'DGJD: Alpha and Beta must be greater than -1'
762 CALL jacobf (pi,pdi,pm1,pdm1,pm2,pdm2,nz,alpha,beta,z(i))
763 CALL jacobf (pj,pdj,pm1,pdm1,pm2,pdm2,nz,alpha,beta,z(j))
764 IF (i.NE.j) d(i,j) = pdi/(pdj*(z(i)-z(j)))
765 IF (i.EQ.j) d(i,j) = ((alpha+beta+two)*z(i)+alpha-beta)/ &
773 SUBROUTINE dglj (D,DT,Z,NZ,NZD,ALPHA,BETA)
784 parameter(nzdd = nmax)
785 REAL(KIND=
xp) dd(nzdd,nzdd),dtd(nzdd,nzdd),zd(nzdd),alphad,betad
786 REAL(KIND=
xp) d(nzd,nzd),dt(nzd,nzd),z(1),alpha,beta
789 WRITE (6,*)
'DGLJ: Minimum number of Gauss-Lobatto points is 2'
792 IF (nz .GT. nmax)
THEN
793 WRITE (6,*)
'Too large polynomial degree in DGLJ'
794 WRITE (6,*)
'Maximum polynomial degree is',nmax
795 WRITE (6,*)
'Here NZ=',nz
798 IF ((alpha.LE.-1.).OR.(beta.LE.-1.))
THEN
799 WRITE (6,*)
'DGLJ: Alpha and Beta must be greater than -1'
807 CALL dgljd (dd,dtd,zd,nz,nzdd,alphad,betad)
817 SUBROUTINE dgljd (D,DT,Z,NZ,NZD,ALPHA,BETA)
827 IMPLICIT REAL(KIND=XP) (a-h,o-z)
828 REAL(KIND=
xp) d(nzd,nzd),dt(nzd,nzd),z(1),alpha,beta
833 eigval = -dn*(dn+alpha+beta+one)
836 WRITE (6,*)
'DGLJD: Minimum number of Gauss-Lobatto points is 2'
839 IF ((alpha.LE.-one).OR.(beta.LE.-one))
THEN
840 WRITE (6,*)
'DGLJD: Alpha and Beta must be greater than -1'
846 CALL jacobf (pi,pdi,pm1,pdm1,pm2,pdm2,n,alpha,beta,z(i))
847 CALL jacobf (pj,pdj,pm1,pdm1,pm2,pdm2,n,alpha,beta,z(j))
848 ci = eigval*pi-(beta*(one-z(i))-alpha*(one+z(i)))*pdi
849 cj = eigval*pj-(beta*(one-z(j))-alpha*(one+z(j)))*pdj
850 IF (i.NE.j) d(i,j) = ci/(cj*(z(i)-z(j)))
851 IF ((i.EQ.j).AND.(i.NE.1).AND.(i.NE.nz)) &
852 d(i,j) = (alpha*(one+z(i))-beta*(one-z(i)))/ &
854 IF ((i.EQ.j).AND.(i.EQ.1)) &
855 d(i,j) = (eigval+alpha)/(two*(beta+two))
856 IF ((i.EQ.j).AND.(i.EQ.nz)) &
857 d(i,j) = -(eigval+beta)/(two*(alpha+two))
864 SUBROUTINE dgll (D,DT,Z,NZ,NZD)
873 IMPLICIT REAL(KIND=XP) (a-h,o-z)
875 REAL(KIND=
rp) d(nzd,nzd),dt(nzd,nzd),z(1)
877 IF (nz .GT. nmax)
THEN
878 WRITE (6,*)
'Subroutine DGLL'
879 WRITE (6,*)
'Maximum polynomial degree =',nmax
880 WRITE (6,*)
'Polynomial degree =',nz
893 IF ((i.EQ.j).AND.(i.EQ.1)) d(i,j) = -d0
894 IF ((i.EQ.j).AND.(i.EQ.nz)) d(i,j) = d0
901 REAL(kind=
xp)
FUNCTION hgll (I,Z,ZGLL,NZ)
908 IMPLICIT REAL(KIND=XP) (a-h,o-z)
909 REAL(kind=
xp) zgll(1), eps, dz, z
912 IF (abs(dz) .LT. eps)
THEN
919 (alfan*
pnleg(zgll(i),n)*(z-zgll(i)))
923 REAL(kind=
xp)
FUNCTION hgl (I,Z,ZGL,NZ)
930 REAL(kind=
xp) zgl(1), z, eps, dz
933 IF (abs(dz) .LT. eps)
THEN
954 IMPLICIT REAL(KIND=XP) (a-h,o-z)
955 REAL(kind=
xp) z, p1, p2, p3
956 IF(abs(z) .LT. 1.0e-25) z = 0.0
968 p3 = ((2.*fk+1.)*z*p2 - fk*p1)/(fk+1.)
973 if (n.eq.0)
pnleg = 1.
980 real(kind=
rp),
intent(inout):: l(0:n)
989 l(j+1) = ( (2.0_xp *
real(j,
xp) + 1.0_xp) * x * l(j) &
1002 IMPLICIT REAL(KIND=XP) (a-h,o-z)
1003 REAL(kind=
xp) p1, p2, p1d, p2d, p3d, z
1011 p3 = ((2.*fk+1.)*z*p2 - fk*p1)/(fk+1.)
1012 p3d = ((2.*fk+1.)*p2 + (2.*fk+1.)*z*p2d - fk*p1d)/(fk+1.)
1023 SUBROUTINE dgllgl (D,DT,ZM1,ZM2,IM12,NZM1,NZM2,ND1,ND2)
1035 REAL(KIND=
xp) d(nd2,nd1), dt(nd1,nd2), zm1(nd1), zm2(nd2), im12(nd2,nd1)
1036 REAL(KIND=
xp) eps, zp, zq
1048 IF ((abs(zp) .LT. eps).AND.(abs(zq) .LT. eps))
THEN
1052 -im12(ip,jq))/(zp-zq)
1054 dt(jq,ip) = d(ip,jq)
1060 SUBROUTINE dgljgj (D,DT,ZGL,ZG,IGLG,NPGL,NPG,ND1,ND2,ALPHA,BETA)
1073 REAL(KIND=
xp) d(nd2,nd1), dt(nd1,nd2), zgl(nd1), zg(nd2), iglg(nd2,nd1)
1075 parameter(ndd = nmax)
1076 REAL(KIND=
xp) dd(ndd,ndd), dtd(ndd,ndd)
1077 REAL(KIND=
xp) zgd(ndd), zgld(ndd), iglgd(ndd,ndd)
1078 REAL(KIND=
xp) alphad, betad
1081 WRITE(6,*)
'DGLJGJ: Minimum number of Gauss-Lobatto points is 2'
1084 IF (npgl.GT.nmax)
THEN
1085 WRITE(6,*)
'Polynomial degree too high in DGLJGJ'
1086 WRITE(6,*)
'Maximum polynomial degree is',nmax
1087 WRITE(6,*)
'Here NPGL=',npgl
1090 IF ((alpha.LE.-1.).OR.(beta.LE.-1.))
THEN
1091 WRITE(6,*)
'DGLJGJ: Alpha and Beta must be greater than -1'
1100 iglgd(i,j) = iglg(i,j)
1106 CALL dgljgjd (dd,dtd,zgld,zgd,iglgd,npgl,npg,ndd,ndd,alphad,betad)
1116 SUBROUTINE dgljgjd (D,DT,ZGL,ZG,IGLG,NPGL,NPG,ND1,ND2,ALPHA,BETA)
1129 IMPLICIT REAL(KIND=XP) (a-h,o-z)
1130 REAL(KIND=
xp) d(nd2,nd1), dt(nd1,nd2), zgl(nd1), zg(nd2)
1131 REAL(KIND=
xp) iglg(nd2,nd1), alpha, beta
1134 WRITE(6,*)
'DGLJGJD: Minimum number of Gauss-Lobatto points is 2'
1137 IF ((alpha.LE.-1.).OR.(beta.LE.-1.))
THEN
1138 WRITE(6,*)
'DGLJGJD: Alpha and Beta must be greater than -1'
1147 eigval = -dn*(dn+alpha+beta+one)
1151 dz = abs(zg(i)-zgl(j))
1153 d(i,j) = (alpha*(one+zg(i))-beta*(one-zg(i)))/ &
1154 (two*(one-zg(i)**2))
1156 CALL jacobf (pi,pdi,pm1,pdm1,pm2,pdm2,ngl,alpha,beta,zg(i))
1157 CALL jacobf (pj,pdj,pm1,pdm1,pm2,pdm2,ngl,alpha,beta,zgl(j))
1158 faci = alpha*(one+zg(i))-beta*(one-zg(i))
1159 facj = alpha*(one+zgl(j))-beta*(one-zgl(j))
1160 const = eigval*pj+facj*pdj
1161 d(i,j) = ((eigval*pi+faci*pdi)*(zg(i)-zgl(j)) &
1162 -(one-zg(i)**2)*pdi)/(const*(zg(i)-zgl(j))**2)
1170 SUBROUTINE iglm (I12,IT12,Z1,Z2,NZ1,NZ2,ND1,ND2)
1180 REAL(KIND=
xp) i12(nd2,nd1),it12(nd1,nd2),z1(nd1),z2(nd2), zi
1181 IF (nz1 .EQ. 1)
THEN
1189 i12(i,j) =
hgl(j,zi,z1,nz1)
1190 it12(j,i) = i12(i,j)
1196 SUBROUTINE igllm (I12,IT12,Z1,Z2,NZ1,NZ2,ND1,ND2)
1206 REAL(KIND=
xp) i12(nd2,nd1),it12(nd1,nd2),z1(nd1),z2(nd2),zi
1207 IF (nz1 .EQ. 1)
THEN
1215 i12(i,j) =
hgll(j,zi,z1,nz1)
1216 it12(j,i) = i12(i,j)
1220 end subroutine igllm
1222 SUBROUTINE igjm (I12,IT12,Z1,Z2,NZ1,NZ2,ND1,ND2,ALPHA,BETA)
1233 REAL(KIND=
xp) i12(nd2,nd1),it12(nd1,nd2),z1(nd1),z2(nd2),zi,alpha,beta
1234 IF (nz1 .EQ. 1)
THEN
1242 i12(i,j) =
hgj(j,zi,z1,nz1,alpha,beta)
1243 it12(j,i) = i12(i,j)
1249 SUBROUTINE igljm (I12,IT12,Z1,Z2,NZ1,NZ2,ND1,ND2,ALPHA,BETA)
1260 REAL(KIND=
xp) i12(nd2,nd1),it12(nd1,nd2),z1(nd1),z2(nd2),zi,alpha,beta
1261 IF (nz1 .EQ. 1)
THEN
1269 i12(i,j) =
hglj(j,zi,z1,nz1,alpha,beta)
1270 it12(j,i) = i12(i,j)
1274 end subroutine igljm
integer, parameter, public xp
integer, parameter, public rp
Global precision used in computations.
LIBRARY ROUTINES FOR SPECTRAL METHODS.
subroutine dgj(d, dt, z, nz, nzd, alpha, beta)
real(kind=xp) function pndleg(z, n)
subroutine dgll(d, dt, z, nz, nzd)
subroutine igjm(i12, it12, z1, z2, nz1, nz2, nd1, nd2, alpha, beta)
real(kind=xp) function hgj(ii, z, zgj, np, alpha, beta)
subroutine dgllgl(d, dt, zm1, zm2, im12, nzm1, nzm2, nd1, nd2)
subroutine zwgll(z, w, np)
real(kind=xp) function pnormj(n, alpha, beta)
subroutine dgjd(d, dt, z, nz, nzd, alpha, beta)
real(kind=xp) function gammaf(x)
subroutine jacg(xjac, np, alpha, beta)
subroutine zwgljd(z, w, np, alpha, beta)
real(kind=xp) function hglj(ii, z, zglj, np, alpha, beta)
real(kind=xp) function hgljd(i, z, zglj, np, alpha, beta)
subroutine zwglj(z, w, np, alpha, beta)
subroutine zwgj(z, w, np, alpha, beta)
subroutine iglm(i12, it12, z1, z2, nz1, nz2, nd1, nd2)
subroutine jacobf(poly, pder, polym1, pderm1, polym2, pderm2, n, alp, bet, x)
subroutine zwgjd(z, w, np, alpha, beta)
subroutine dglj(d, dt, z, nz, nzd, alpha, beta)
subroutine dgljgj(d, dt, zgl, zg, iglg, npgl, npg, nd1, nd2, alpha, beta)
real(kind=xp) function pnleg(z, n)
real(kind=xp) function hgl(i, z, zgl, nz)
subroutine dgljd(d, dt, z, nz, nzd, alpha, beta)
subroutine legendre_poly(l, x, n)
Evaluate Legendre polynomials of degrees 0-N at point x and store in array L.
real(kind=xp) function endw1(n, alpha, beta)
subroutine igllm(i12, it12, z1, z2, nz1, nz2, nd1, nd2)
subroutine dgljgjd(d, dt, zgl, zg, iglg, npgl, npg, nd1, nd2, alpha, beta)
subroutine zwgl(z, w, np)
Generate NP Gauss Legendre points Z and weights W associated with Jacobi polynomial ....
real(kind=xp) function hgll(i, z, zgll, nz)
real(kind=xp) function hgjd(ii, z, zgj, np, alpha, beta)
real(kind=xp) function endw2(n, alpha, beta)
subroutine igljm(i12, it12, z1, z2, nz1, nz2, nd1, nd2, alpha, beta)