29 SUBROUTINE spgradq(I,M,ENN1,ELONN1,EON,EONTOP,Q,QDX,QDY,QDYTOP)
31 REAL ENN1((M+1)*((I+1)*M+2)/2),ELONN1((M+1)*((I+1)*M+2)/2)
32 REAL EON((M+1)*((I+1)*M+2)/2),EONTOP(M+1)
33 REAL Q((M+1)*((I+1)*M+2))
34 REAL QDX((M+1)*((I+1)*M+2)),QDY((M+1)*((I+1)*M+2))
41 qdy(2*k-1)=eon(k+1)*enn1(k+1)*q(2*k+1)
42 qdy(2*k)=eon(k+1)*enn1(k+1)*q(2*k+2)
43 DO k=2,(m+1)*((i+1)*m+2)/2-1
44 qdx(2*k-1)=-elonn1(k)*enn1(k)*q(2*k)
45 qdx(2*k)=elonn1(k)*enn1(k)*q(2*k-1)
46 qdy(2*k-1)=eon(k+1)*enn1(k+1)*q(2*k+1)-eon(k)*enn1(k-1)*q(2*k-3)
47 qdy(2*k)=eon(k+1)*enn1(k+1)*q(2*k+2)-eon(k)*enn1(k-1)*q(2*k-2)
50 qdx(2*k-1)=-elonn1(k)*enn1(k)*q(2*k)
51 qdx(2*k)=elonn1(k)*enn1(k)*q(2*k-1)
52 qdy(2*k-1)=-eon(k)*enn1(k-1)*q(2*k-3)
53 qdy(2*k)=-eon(k)*enn1(k-1)*q(2*k-2)
57 k=l*(2*m+(i-1)*(l-1))/2+i*l+m+1
58 qdytop(2*l+1)=-eontop(l+1)*enn1(k)*q(2*k-1)
59 qdytop(2*l+2)=-eontop(l+1)*enn1(k)*q(2*k)