Trisurf Monte Carlo simulator
Samo Penic
2016-05-13 3d0247677949505858b0b947fc3b216bb2a7bc80
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
        program cod
        double precision  co(10,21),pi
        integer lmax,l,al, am, m
 
        pi=4.*datan(1.d0)
 
        lmax=10
        do 10 l=1,lmax
            al=l
            co(l,l+1)=dsqrt((2.*al+1.)/2./pi)
            do 20 m=1,l-1
                am=m
                co(l,l+1+m)=co(l,l+m)*dsqrt(1.d0/(al-am+1)/(al+am))
                co(l,l+1-m)=co(l,l+1+m)
20          continue
            co(l,2*l+1)=co(l,2*l)*dsqrt(1.d0/(2.*al))
            co(l,1)=co(l,2*l+1)
            co(l,l+1)=dsqrt((2.*al+1.)/4./pi)
10      continue
 
        do 30 l=1,lmax
            do 40 m=1,2*l+1
                print *, 'co(',l,',',m,')=',co(l,m)
40          continue
30      continue
 
        end program cod