source: PSPA/parmelaPSPA/trunk/sccfc.f @ 315

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

parmela pspa initial

File size: 2.6 KB
Line 
1      subroutine sccfc(betac,fc)
2c     return the 14 fourier coefficients for the side-coupled cavity
3c     with beta=betac. the coefficients were determined from superfish
4c     runs at 1300 mhz.
5c-----------------------------------------------------------------------
6c
7      include 'ucom.h'
8c
9      dimension fc(14),beta(6),fct(6,14),wb(6,14),a(6),b(6),c(6),iop(2)
10      dimension tab(3)
11c-----------------------------------------------------------------------
12      data nte/6/
13      data iflagd/0/
14c     fourier coefficients for side-coupled cavities
15      data beta(1),(fct(1,i),i=1,14)
16     1 / .50,  1.7528799,   .6026982,  .0956489,  -.0007633,
17     2    -.0047612,  -.0012945,  -.0001396,   .0000224,   .0000119,
18     3     .0000021,   .0000001,  -.0000001,  -.0000000,   .0000000/
19      data beta(2),(fct(2,i),i=1,14)
20     1 / .60,  1.7640248,   .6204240,   .0513374,  -.0325247,
21     2    -.0134447,  -.0014003,   .0006422,   .0002947,   .0000346,
22     3    -.0000129,  -.0000063,  -.0000008,   .0000002,   .0000001/
23      data beta(3),(fct(3,i),i=1,14)
24     1 / .70,  1.7541771,   .5444473,  -.0529861,  -.0708168,
25     2    -.0098096,   .0054686,   .0022115,  -.0002226,  -.0002832,
26     3     .0000049,   .0000307,  -.0000010,  -.0000048,   .0000005/
27      data beta(4),(fct(4,i),i=1,14)
28     1 / .80,  1.7389319,   .4496130,  -.1549319,  -.0900213,
29     2     .0094835,   .0149095,   .0006300,  -.0022191,  -.0003900,
30     3     .0002888,   .0000932,  -.0000322,  -.0000169,   .0000029/
31      data beta(5),(fct(5,i),i=1,14)
32     1 / .90,  1.7255494,   .3671034,  -.2342443,  -.0869619,
33     2     .0341585,   .0178781,  -.0047510,  -.0034920,   .0006180,
34     3     .0006624,  -.0000661,  -.0001196,   .0000064,   .0000224/
35      data beta(6),(fct(6,i),i=1,14)
36     1 /1.00,  1.6879765,   .1966623,  -.3083845,  -.0259680,
37     2     .0667456,   .0009515,  -.0142383,   .0009093,   .0029194,
38     3    -.0004541,  -.0005850,   .0001495,   .0001138,  -.0000412/
39      if(iflagd.ne.0)go to 20
40c     fit splines to fct vs beta for each term
41      do 10 i=1,14
42      iop(1)=1
43      iop(2)=1
44      wb(1,i)=0.
45      wb(nte,i)=0.
46      call spl1d1(nte,beta(1),fct(1,i),wb(1,i),iop(1),1,a(1),b(1),c(1))
47   10 continue
48   20 pi=4.*atan(1.)
49      do 30 i=1,14
50      call spl1d2 (nte,beta(1),fct(1,i),wb(1,i),1,betac,tab(1))
51   30 fc(i)=tab(1)
52c     normalize coefficients
53      sum=0.
54      t=1.
55      sgn=1.
56      do 40 l=1,14
57      sum=sum+fc(l)*sgn/t
58      t=t+2.
59   40 sgn=-sgn
60      fac=2.*sum/pi
61      do 50 l=1,14
62   50 fc(l)=fc(l)/fac
63      return
64      end
65c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
Note: See TracBrowser for help on using the repository browser.