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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*-
// file plot.cpp
#include "plot.hpp"
namespace plot {
// subroutine sysplt.
void sysplt(void *pLUnit4)
{
// To do.
}
// subroutine rtmplt.
void rtmplt(void)
{
// To do.
}
// subroutine tpplot.
void tpplot(void)
{
// To do.
}
// subroutine pltvar.
void pltvar(void)
{
// To do.
}
// subroutine chrplt.
void chrplt(void)
{
// To do.
}
// subroutine tekplt.
void tekplt(void)
{
// To do.
}
// subroutine tgrid.
void tgrid(int nIX, int nIY, int nNX, int nIDelX, int nNY, int nIDelY, int nLDash)
{
// To do.
}
// subroutine pltfil.
void pltfil(const long int &k)
{
// Installation-dependent module which is called for
// output-vector dumping by "subts3" and "over20" if
// "m4plot" of /blank/ is nonzero. This
// is alternative to conventional in-line dumping on disk.
// Module should be universal for computers using fortran 77
// compilers and real*4 variables which give single precision.
int j;
int ll10;
int n7, n13, n17 = 0;
//
if(blkcom::nM4Plot == 1)
goto a7286;
if(k <= 450)
goto a7273;
(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " ^^^^^^^^^^^^^^^ Error stop in \"pltfil\" ^^^^^^^^^^^^^^\n";
(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " ^^^^^^ too many output variables (\n";
(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw (3) << k;
(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " ) for use real*4 plot file. limit = 450." << std::endl << std::flush;
emtp::stoptp();
a7273:
for (j = 1; j <= k; j++) {
spycom::pForByt[ j - 1 ] = labcom::sVoltI[ j - 1 ];
(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 3 ])) << spycom::pForByt[ j - 1 ];
}
goto a9000;
a7286:
if (blkcom::nIprsUp >= 3) {
(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " Top of \"pltfil\". indub, mflush, k, limbuf, newvec, numcrd = ";
(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw (10) << spycom::nIndBuf << spycom::nMFlush << k << spycom::nLimBuf << spycom::nNewVec << spycom::nNumCRD;
(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << "\n ";
for (std::vector<double>::iterator nI = labcom::sVoltI.begin (); nI != labcom::sVoltI.end (); nI++)
(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw (13) << std::setprecision (4) << *nI;
(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::endl << std::flush;
}
n7 = 0;
if(spycom::nIndBuf > 0)
goto a7308;
spycom::nMFlush = 0;
spycom::nIndBeg = blkcom::pSStat -> m_nTLabl + 51;
spycom::nIndBuf = spycom::nIndBeg;
spycom::nNewVec = spycom::nIndBuf + 1;
a7308:
if((spycom::nIndBuf + k) <= spycom::nLimBuf)
goto a7374;
(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " % % % % % % Suspended simulation; plot data space exhausted; use spy. indbuf, limbuf =";
(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw (8) << spycom::nIndBuf << spycom::nLimBuf << std::endl << std::flush;
(*reinterpret_cast<std::ostream *>(spycom::pMFiles[ 5 ])) << " % % % % % % Suspended simulation; plot data space exhausted; use spy. indbuf, limbuf =";
(*reinterpret_cast<std::ostream *>(spycom::pMFiles[ 5 ])) << std::setw (8) << spycom::nIndBuf << spycom::nLimBuf << std::endl << std::flush;
utilities::window(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ]), \
*reinterpret_cast<std::stringstream *>(spycom::pMFiles[ 5 ]));
(*reinterpret_cast<std::stringstream *>(spycom::pMFiles[ 5 ])) << " % % Time-sharing disabled. Send user-keyed interrupt to silence alarm." << std::endl << std::flush;
utilities::window(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ]), \
*reinterpret_cast<std::stringstream *>(spycom::pMFiles[ 5 ]));
ll10 = 10;
utilities::honker(ll10);
n13 = spycom::nKBreak;
spycom::nLockBR = 1;
blkcom::nLastOV = 9911;
over20::emtspy();
goto a7308;
a7374:
for(j = 1; j <= k; j++) {
++spycom::nIndBuf;
spycom::pPltBuf[ spycom::nIndBuf - 1 ] = labcom::sVoltI[ j - 1 ];
}
++n17;
if(n17 < spycom::nKSlowR)
goto a9000;
n17 = 0;
if(spycom::nMonitR == 0)
goto a7396;
plot::tekplt();
if(spycom::nMonitR != 8765)
goto a7396;
over20::timval();
spycom::nMonitR = 1;
a7396:
if (spycom::nMonitS != 0)
plot::chrplt();
a9000:
if (blkcom::nIprsUp >= 4)
(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " Exit \"pltfil\"." << std::endl << std::flush;
}
// subroutine pltlu2.
void pltlu2(double *d2, std::vector<double> *pVoltI)
{
// called by "tacs2" only, if and only if m4plot .ne. 0
// this module is universal for fortran 77 compilers and
// computers for which real*4 corresponds to single precision.
int j;
int n12;
//
std::vector<double> sForByt(150, 0.0);
//
if(blkcom::nIofgnd > 149)
emtp::stoptp();
n12 = blkcom::nIofgnd + 1;
for(std::vector<double>::iterator nI = sForByt.begin(); nI != sForByt.begin() + n12; nI++)
(*reinterpret_cast<std::fstream *>(blkcom::pLFiles[ 1 ])) >> *nI;
*d2 = sForByt[ 0 ];
for(j = 1; j <= blkcom::nIofgnd; j++)
(*pVoltI)[ j - 1 ] = sForByt[ j ];
if(blkcom::nIprsUp >= 1) {
(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " Exit \"pltlu2\". d2, volti(1, iofgnd) =";
(*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(14) << std::setprecision(5) << *d2 << (*pVoltI)[ 0 ] << (*pVoltI)[ blkcom::nIofgnd - 1 ] << std::endl << std::flush;
}
}
}
// end of file plot.cpp
|