c******************************************************* c init_juxta(n,np600) c c np600=0 no monitor of pair distance evolution c np600=1 output the distance vs. time directly c np600=2 output distribution of distance and juxta time subroutine init_juxta(n,np600) implicit double precision(a-h, o-z) parameter(maxpair=100,maxa=500,maxjudge=10,nbucket=100) common /juxtapair/ npair,npairs(maxpair,2),nflag(maxpair,maxjudge) +,njudge, sjuxta_judge(maxjudge),mp(maxpair) common/juxta_distribution/d_min,d_max,d_bucket, + npair_bucket(nbucket,maxpair) if (np600.eq.0) then open(unit=330,file='Init_juxtadistance',status='old') read(330,*) njudge do i=1,njudge read(330,*) sjuxta_judge(i) c write(*,*) i,sjuxta_judge(i) nflag(1,i)=0 enddo close(330) endif if (np600.ge.1) then open(unit=330,file='Init_juxtapair',status='old') read(330,*) npair do i=1,npair read(330,*) npairs(i,1),npairs(i,2) mp(i)=600+min((npairs(i,2)-npairs(i,1)),(n+npairs(i,1) +-npairs(i,2))) c write(*,*) 'mp(',i,')=',mp(i) enddo endif if (np600.eq.2) then read(330,*) njudge do i=1,njudge read(330,*) sjuxta_judge(i) enddo c setup pair_standard c can be changed into nonlinear buckets c now only using the simplest linear on c try other better mapping algorithms later read(330,*) d_min,d_max d_bucket=(d_max-d_min)/nbucket c initialize the distribution box, nflag do j=1,npair do i=1,nbucket npair_bucket(nbucket,maxpair)=0 enddo enddo do i=1,njudge do j=1,npair nflag(j,i)=0 enddo enddo endif return end