~daniele-bigoni/pyorthpol/pyorthpol-python3

« back to all changes in this revision

Viewing changes to ORTHPOLxx/src/kern.f

  • Committer: Daniele Bigoni
  • Date: 2014-12-16 10:43:03 UTC
  • Revision ID: dabi@dtu.dk-20141216104303-ba4utrt7ln5g39lq
started with launchpad

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
c
 
2
c
 
3
      subroutine kern(n,nu0,numax,z,eps,a,b,ker,nu,ierr,rold)
 
4
c
 
5
c This routine generates the kernels in the Gauss quadrature remainder
 
6
c term, namely
 
7
c
 
8
c           K(k)(z)=rho(k)(z)/pi(k)(z), k=0,1,2,...,n,
 
9
c
 
10
c where  rho(k)  are the output quantities of the routine  knum, and 
 
11
c pi(k)  the (monic) orthogonal polynomials. The results are returned 
 
12
c in the array  ker  as ker(k)=K(k-1)(z), k=1,2,...,n+1. All the other 
 
13
c input and output parameters have the same meaning as in the routine 
 
14
c knum.
 
15
c
 
16
      complex z,ker,rold,p0,p,pm1
 
17
      dimension a(numax),b(numax),ker(*),rold(*)
 
18
c
 
19
c The arrays  ker,rold  are assumed to have dimension  n+1.
 
20
c
 
21
      call knum(n,nu0,numax,z,eps,a,b,ker,nu,ierr,rold)
 
22
      p0=(0.,0.)
 
23
      p=(1.,0.)
 
24
      do 10 k=1,n
 
25
        pm1=p0
 
26
        p0=p
 
27
        p=(z-a(k))*p0-b(k)*pm1
 
28
        ker(k+1)=ker(k+1)/p
 
29
   10 continue
 
30
      return
 
31
      end
 
32