-
Notifications
You must be signed in to change notification settings - Fork 0
/
nullpgks2.f
146 lines (146 loc) · 6.56 KB
/
nullpgks2.f
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
c Null general 2d parallel gks graphics library
c written by viktor k. decyk, ucla
c copyright 1999, regents of the university of california
c update: april 28, 2004
c-----------------------------------------------------------------------
subroutine PGRCLOSE
c this subroutine deactivates workstation and closes gks
return
end
c-----------------------------------------------------------------------
subroutine PCARPET(f,g,nvp,label,isc,ist,nx,ny,nxv,nypmx,nblok,chr
1,ntc,irc)
c this subroutine displays an array f as a color raster image, for
c distributed data
c a 256 color palette must have been defined prior to this call.
c multiple plots per page can be displayed by dividing the screen into
c n x n subregions, where n*n is the next largest integer >= nplot
c the location (ix,iy) of a plot in the subregions is determined by
c the parameter iplot = ix + iy*n
c f = distributed field array to be plotted
c g = scratch array for receiving messages
c nvp = number of real or virtual processors requested
c label = long character string label for plot
c isc = power of 2 scale of range of values of f
c ist = flag for choosing positive and/or negative values
c the range of values of f are given by fmax and fmin.
c if ist = 0, then fmax = 2**isc and fmin = -2**isc.
c if ist = 1, then fmax = 2**isc and fmin = 0.
c if ist = -1, then fmax = 0 and fmin = -2**isc.
c if ist = 2, then fmax = fmin + 2**ir,
c where fmin/fmax are the function minimum/maximum,
c and ir = power of 2 scale for (fmax - fmin)
c if abs(isc) < 116, then the isc value passed is used for scale.
c if abs(isc) > 116, then the program finds the minimum value of isc
c which will contain the plots, determined by the absolute value of f
c nx/ny = length of field f in x/y direction
c nxv = first dimension of field array f, must be >= nx
c nypmx = maximum size of particle partition, including guard cells
c nblok = number of particle partitions
c chr = additional long character string comment for plot
c ntc = number of valid colors, should be power of 2, <= 256
c irc = return code (0 = normal return)
implicit none
real f, g
integer nvp, isc, ist, nx, ny, nxv, nypmx, nblok, ntc, irc
character*(*) label, chr
dimension f(nxv,nypmx,nblok), g(nxv,nypmx)
irc = 0
return
end
c-----------------------------------------------------------------------
subroutine PCONTUR(f,g,lf,nvp,label,isc,ist,nx,ny,nxv,nypmx,nblok,
1chr,nc,irc)
c this subroutine displays an array f as a contour plot.
c a maximum of ncols colors are used, used in order from lowest to
c highest contour: blue, green, cyan, foreground, yellow, magenta, red
c multiple plots per page can be displayed by dividing the screen into
c n x n subregions, where n*n is the next largest integer >= nplot
c the location (ix,iy) of a plot in the subregions is determined by
c the parameter iplot = ix + iy*n
c f = field array to be plotted
c lf = scratch field array
c g = scratch array for receiving messages
c nvp = number of real or virtual processors requested
c label = long character string label for plot
c isc = power of 2 scale of range of values of f
c ist = flag for choosing positive and/or negative values
c the range of values of f are given by fmax and fmin.
c if ist = 0, then fmax = 2**isc and fmin = -2**isc.
c if ist = 1, then fmax = 2**isc and fmin = 0.
c if ist = -1, then fmax = 0 and fmin = -2**isc.
c if ist = 2, then fmax = fmin + 2**ir,
c where fmin/fmax are the function minimum/maximum,
c and ir = power of 2 scale for (fmax - fmin)
c if abs(isc) < 116, then the isc value passed is used for scale.
c if abs(isc) > 116, then the program finds the minimum value of isc
c which will contain the plots, determined by the absolute value of f
c nx/ny = length of field f in x/y direction
c nxv = first dimension of field array f, must be >= nx
c nypmx = maximum size of particle partition, including guard cells
c nblok = number of particle partitions
c chr = additional long character string comment for plot
c nc = number of contour lines
c irc = return code (0 = normal return)
implicit none
real f, g
integer lf
integer nvp, isc, ist, nx, ny, nxv, nypmx, nblok, nc, irc
character*(*) label, chr
dimension f(nxv,nypmx,nblok), lf(nxv,nypmx,nblok), g(nxv,nypmx)
irc = 0
return
end
c-----------------------------------------------------------------------
subroutine PGRASP23(part,f,npp,label,itime,isc,nx,ny,iyp,ixp,idimp
1,npmax,nblok,irc)
c for 2-1/2d code, this subroutine displays (iyp-ixp) phase space
c part(1,n,l) = position x of particle n in partition l
c part(2,n,l) = position y of particle n in partition l
c part(3,n,l) = velocity vx of particle n in partition l
c part(4,n,l) = velocity vy of particle n in partition l
c part(5,n,l) = velocity vz of particle n in partition l
c f = scratch array for receiving messages
c npp(l) = number of particles in partition l
c label = species label
c itime = current time step
c isc = power of 2 scale of range of values of velocity
c nx/ny = system length in x/y direction
c iyp/ixp = phase space coordinates to be displayed
c idimp = size of phase space = 4 or 5
c npmax = maximum number of particles in each partition
c nblok = number of particle partitions
c irc = return code (0 = normal return)
implicit none
real part, f
integer npp
integer itime, isc, nx, ny, iyp, ixp, idimp, npmax, nblok, irc
character*(*) label
dimension part(idimp,npmax,nblok), f(2*npmax), npp(nblok)
irc = 0
return
end
c-----------------------------------------------------------------------
subroutine GROPEN
c this subroutine opens gks and activates workstation
c colors and maximum size of display surface are also set
c if a string (keyboard) device is available, it is initialized
c if a locator (mouse) device is available, it is initialized
return
end
c-----------------------------------------------------------------------
subroutine SETNPLT(nplt,irc)
c this subroutine resets the maximum number of plots per page
c if requested number is negative, it is set to default (=1)
c the current plot location is also reset to the next available location
c if next available location is iplot = 0 and the old location was not
c 0, then the workstation is updated and a return code can be generated.
irc = 0
return
end
c-----------------------------------------------------------------------
subroutine STPALIT(idpal)
c this subroutine selects one from three available palettes
c idpal = palette id number: 1 = cold/hot, 2 = color wheel, 3 = rainbow
return
end