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

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

parmela pspa initial

File size: 3.2 KB
Line 
1      subroutine out2(ne,nbuffer,outcor,nsize)
2c         output subroutine number 2
3c         plot 2 profiles of all particles on the tty
4c         plot their initial coordinates if indicated
5c         plot the intermediate particle coordinates when indicated
6c         output parameters
7c             1=two initial graph types (defined on first output call)
8c             2=two profile types       (defined on first output call)
9c             3=two current graph types
10c             4=unused
11c         the tens digit of each parameter specifies the left hand
12c         graph type while the units digit specifies the right hand grap
13c         the initial and current graph type codes are%
14c              0=no graph
15c              1=x-xprime space
16c              2=y-yprime space
17c              3=phase-energy space (or z-zprime, if ne not zero)
18c              4=x-y space
19c          the profile type codes are%
20c              0=  no profile
21c              1-6=x,xp,y,yp,phi (or z), w (or zp)
22c          optcon card parameters are graph scales for
23c            x, xp, y, yp, phi, w, z, zp
24c
25c-----------------------------------------------------------------------
26      save
27c
28      include 'param_sz.h'
29      include 'constcom.h'
30      include 'coordcom.h'
31      include 'misccom.h'
32      include 'ncordscom.h'
33      include 'outcom.h'
34      include 'tstepcom.h'
35      include 'syscom.h'
36      include 'var_char.h'
37      include 'ucom.h'
38c
39      common/chars/title
40      common/com1/scale(10),ws,ps,zs,bgs,wts,ntape
41      common/outbuf/tcor(8,imaa*imb)
42      real x(2      ,imaa),y(2,imaa)
43      dimension outcor(8,nsize)
44      equivalence (tcor(1,(imb-1)*imaa+1),x(1,1))
45      equivalence (tcor(1,(imb-1)*imaa+imaa/2),y(1,1))
46c--------------------------------------------------------------------------
47c*
48      data iflagg/0/,i7,i0,i1,i6/7,0,1,6/
49c--------when iflagg = 0, title is printed, and nstart instead of ncell
50c------printed on initial graph. iflagg becomes 1 when current graph is
51c------called, and ncell is printed.  iflag controls print of heading on
52c------profile plots.
53      do 10 n=1,10
54      scale(n)=optcon(n+4)
55   10 continue
56      ntape=nout2
57      if(ne.ne.0)ntape=nout2
58      if (iflagg.gt.0) go to 30
59c         plot initial graphs
60      write(nout2,*) title
61      ws=w0
62      ps=wt0
63      zs=z0
64      bgs=sqrt(ws/erest*(2.+ws/erest))
65      wts=wt
66      option=optcon(2)
67      if (option.eq.0.0) go to 20
68      call ggplot (i0,option,cor,i6,ngood,i1)
69   20 continue
70      iflagg=1
71c         plot profiles
72   30 continue
73      option=optcon(3)
74      opt=optcon(4)
75      zs=cord(5,1)
76      bgs=cord(6,1)
77      wts=wt
78      if(ne.eq.0)go to 35
79      ws=wr(ne)
80      ps=pr(ne)
81      zs=zloc(ne)
82   35 continue
83      if(option.eq.0.)go to 40
84      if(ne.eq.0)call pplot(ne,option,cord,8,ngood)
85      if(ne.ne.0)call pplot(ne,option,outcor,8,nbuffer)
86   40 continue
87c         plot current particle coordinates
88      if (opt.le.0.)go to 50
89      if (ne.eq.0) call ggplot(ne,opt,cord,i7,ngood,i7)
90      if (ne.ne.0) call ggplot(ne,opt,outcor,8,nbuffer,8)
91   50 continue
92      write(nnout,55)
93   55 format(' returning from out2')
94      return
95c
96      end
97c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
Note: See TracBrowser for help on using the repository browser.