source: PSPA/parmelaPSPA/trunk/interp.f @ 470

Last change on this file since 470 was 12, checked in by lemeur, 12 years ago

parmela pspa initial

File size: 906 bytes
Line 
1      subroutine interp(nt,beta,fct,betac,fc)
2c------------------------------------------------------------------------
3      save
4c
5      include 'constcom.h'
6      include 'ucom.h'
7c
8      dimension beta(nt),fct(nt,14),fc(14)
9c-----------------------------------------------------------------------
10c*
11      j=1
12      mt=nt-1
13      if(mt.lt.2)go to 20
14      do 10 i=2,mt
15      if(betac.le.beta(i))go to 20
16      j=i
17   10 continue
18   20 continue
19      xb=(betac-beta(j))/(beta(j+1)-beta(j))
20      xa=1.-xb
21      do 30 i=1,14
22      fc(i)=xa*fct(j,i)+xb*fct(j+1,i)
23   30 continue
24c     normalize coefficients
25      sum=0.
26      t=1.
27      sgn=1.
28      do 40 l=1,14
29      sum=sum+fc(l)*sgn/t
30      t=t+2.
31      sgn=-sgn
32   40 continue
33      fac=2.*sum/pi
34      do 50 l=1,14
35      fc(l)=fc(l)/fac
36   50 continue
37      return
38      end
39c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
Note: See TracBrowser for help on using the repository browser.