[tsscds] Diff of /trunk/src/kmc.f90
Diff of /trunk/src/kmc.f90
Parent Directory
| Revision Log
| Patch
8 |
! ndd species that dissapear |
! ndd species that dissapear |
9 |
character*80 :: title |
character*80 :: title |
10 |
integer, parameter :: dp = selected_real_kind(15,307) |
integer, parameter :: dp = selected_real_kind(15,307) |
11 |
integer :: m,nran,nr,nesp,inran,i,j,k,l,mu,ndisp,pd,kk,ijk,tcont,tint |
integer :: m,nran,nr,nesp,inran,i,j,k,l,mu,ndisp,pd,kk,ijk,tcont,tint,rep |
12 |
real(dp) :: t,a0,r2a0,suma,ptot |
real(dp) :: t,a0,r2a0,suma,ptot |
13 |
real(dp) :: rnd(2) |
real(dp) :: rnd(2) |
14 |
integer,dimension(:),allocatable :: p,p0,re,pr,n,ndd,cont |
integer,dimension(:),allocatable :: p,p0,re,pr,n,ndd,cont,pp,ppold |
15 |
real (dp) ,dimension(:),allocatable :: a,rate |
real (dp) ,dimension(:),allocatable :: a,rate |
16 |
read(*,"(a80)") title |
read(*,"(a80)") title |
17 |
print "(t3,a80)",title |
print "(t3,a80)",title |
18 |
read(*,*) m,nesp,nran |
read(*,*) m,nesp,nran |
19 |
allocate(re(m),pr(m),a(m),rate(m),p0(nesp),p(nesp),n(nesp),cont(m)) |
allocate(re(m),pr(m),a(m),rate(m),p0(nesp),p(nesp),n(nesp),cont(m),pp(nesp),ppold(nesp)) |
20 |
n=(/ (l,l=1,nesp) /) |
n=(/ (l,l=1,nesp) /) |
21 |
do i=1,m |
do i=1,m |
22 |
read(*,*) rate(I),re(i),pr(i) |
read(*,*) rate(I),re(i),pr(i) |
43 |
big: do inran=1,nran |
big: do inran=1,nran |
44 |
print "(/,t3,a,i4,/,t3,a,9999(i7))","Calculation number",inran,"Time(ps)",n |
print "(/,t3,a,i4,/,t3,a,9999(i7))","Calculation number",inran,"Time(ps)",n |
45 |
p=p0 |
p=p0 |
46 |
|
pp=p0 |
47 |
t=0.d0 |
t=0.d0 |
48 |
tcont=0 |
tcont=0 |
49 |
|
rep=0 |
50 |
print "(e10.4,9999(i7))",t,p |
print "(e10.4,9999(i7))",t,p |
51 |
do j=1,m |
do j=1,m |
52 |
a(j)=rate(j)*p(re(j)) |
a(j)=rate(j)*p(re(j)) |
69 |
a(j)=rate(j)*p(re(j)) |
a(j)=rate(j)*p(re(j)) |
70 |
enddo |
enddo |
71 |
a0=sum(a) |
a0=sum(a) |
72 |
if(mod(tcont,tint)==0.or.a0==0) print "(e10.4,9999(i7))",t,p |
if(mod(tcont,tint)==0.or.a0==0) then |
73 |
|
print "(e10.4,9999(i7))",t,p |
74 |
|
ppold=pp |
75 |
|
pp=p |
76 |
|
do j=1,m |
77 |
|
if(pp(j)==ppold(j).and.ppold(j)>0) then |
78 |
|
rep=rep+1 |
79 |
|
endif |
80 |
|
enddo |
81 |
|
if(rep==1000) exit |
82 |
|
endif |
83 |
enddo |
enddo |
84 |
enddo big |
enddo big |
85 |
print*,"Population of every species" |
print*,"Population of every species" |
|
Legend:
Removed from v.285 |
|
changed lines |
|
Added in v.286 |
|
|
|