1*752c3701SJeremy L Thompson !----------------------------------------------------------------------- 2*752c3701SJeremy L Thompson subroutine setup(ctx,q,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,& 3*752c3701SJeremy L Thompson & u15,u16,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,ierr) 4*752c3701SJeremy L Thompson real*8 ctx 5*752c3701SJeremy L Thompson real*8 u1(1) 6*752c3701SJeremy L Thompson real*8 u2(1) 7*752c3701SJeremy L Thompson real*8 v1(1) 8*752c3701SJeremy L Thompson real*8 w 9*752c3701SJeremy L Thompson integer q,ierr 10*752c3701SJeremy L Thompson 11*752c3701SJeremy L Thompson do i=1,q 12*752c3701SJeremy L Thompson w = u1(i)/(u2(i+0*q)*u2(i+3*q)-u2(i+1*q)*u2(i+2*q)) 13*752c3701SJeremy L Thompson v1(i+0*q)=w*(u2(i+2*q)*u2(i+2*q)+u2(i+3*q)*u2(i+3*q)) 14*752c3701SJeremy L Thompson v1(i+1*q)=w*(u2(i+0*q)*u2(i+0*q)+u2(i+1*q)*u2(i+1*q)) 15*752c3701SJeremy L Thompson v1(i+2*q)=w*(u2(i+0*q)*u2(i+2*q)+u2(i+1*q)*u2(i+3*q)) 16*752c3701SJeremy L Thompson enddo 17*752c3701SJeremy L Thompson 18*752c3701SJeremy L Thompson ierr=0 19*752c3701SJeremy L Thompson end 20*752c3701SJeremy L Thompson !----------------------------------------------------------------------- 21*752c3701SJeremy L Thompson subroutine diff(ctx,q,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,& 22*752c3701SJeremy L Thompson & u15,u16,v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,ierr) 23*752c3701SJeremy L Thompson real*8 ctx 24*752c3701SJeremy L Thompson real*8 u1(1) 25*752c3701SJeremy L Thompson real*8 u2(1) 26*752c3701SJeremy L Thompson real*8 v1(1) 27*752c3701SJeremy L Thompson integer q,ierr 28*752c3701SJeremy L Thompson 29*752c3701SJeremy L Thompson do i=1,q 30*752c3701SJeremy L Thompson v1(i+0*q)=u1(i+0*q)*u2(i+0*q)+u1(i+2*q)*u2(i+1*q) 31*752c3701SJeremy L Thompson v1(i+1*q)=u1(i+2*q)*u2(i+0*q)+u1(i+1*q)*u2(i+1*q) 32*752c3701SJeremy L Thompson enddo 33*752c3701SJeremy L Thompson 34*752c3701SJeremy L Thompson ierr=0 35*752c3701SJeremy L Thompson end 36*752c3701SJeremy L Thompson !----------------------------------------------------------------------- 37