diff options
Diffstat (limited to 'sources/over1.cpp')
-rw-r--r-- | sources/over1.cpp | 767 |
1 files changed, 767 insertions, 0 deletions
diff --git a/sources/over1.cpp b/sources/over1.cpp new file mode 100644 index 0000000..35b6ced --- /dev/null +++ b/sources/over1.cpp @@ -0,0 +1,767 @@ +//-*- mode: c++; indent-tabs-mode: t; coding: utf-8; show-trailing-whitespace: t -*- + +// file over1.cpp + +#include "over1.hpp" + +namespace over1 { + + // subroutine over1. + void over1(void) + { + long int i; + long int j; + long int ll1, ll8, ll80; + long int n1, n5, n6, n7, n9; + long int nIAdQQ; + long int nIDA; + long int nIFKC; + long int nIP; + long int nIsWent; + long int nIY; + long int nNFDBR; + long int nNFDHST; + long int nNFDPH; + long int nNFDPol; + long int nNGroup; + long int nNK; + long int nNMAuto; + long int nNTLin; + long int nNTurn; + long int nNumBCO; + long int nNumNam; + long int pLSTACS[] = { 20, 90, 100, 20, 30, 250, 350, 60 }; + double d1, d2, d3, d13; + double nPU; + double nZNVRef; + void *pLU2 = nullptr; + void *pLU6 = nullptr; + std::string sBus; + std::string sDiskFileName; + std::string sText2("name "); + std::string sText6("copy "); + std::string sText1("tacs o"); + std::string sText3("tacs h"); + std::string sText4("tacs s"); + std::string sText5("4 "); + std::string sText7("tacs "); + // + auto start_again = [ & ](void) + { + long int j; + // + blkcom::pIAlter = blkcom::pLFiles[ 1 ]; + if(blkcom::nNOutPR == 0) + (*reinterpret_cast<std::ostream *>(blkcom::pKFile6)) << "+Continue partially-completed data case." << std::endl; + if(blkcom::sTexCol[ 12 ] == sText5[ 0 ]) + goto a2861; + blkcom::sABuff >> sDiskFileName; + for(j = 1; j <= 2; j++) { + n7 = sDiskFileName.find(','); + sDiskFileName.replace(0, n7, " "); + } + for(j = n7; j <= 80; j++) + if(sDiskFileName[ j - 1 ] != ' ') + break; + std::cout << " name of old pl4 file disk_file(j : 80) = " << sDiskFileName.substr(j, 80) << std::endl; + blkcom::pLFiles[ 76 ] = nullptr; + blkcom::pLFiles[ 76 ] = (void *) new std::ifstream; + if(blkcom::pLFiles[ 76 ]) { + reinterpret_cast<std::ifstream *>(blkcom::pLFiles[ 76 ]) -> open(sDiskFileName.substr(j, 80).c_str(), std::ios::in); + } + std::cout << " 1st record. numnam, numnvo, numbco, numbrn =" << nNumNam << dekplt::nNumNVO << nNumBCO << dekplt::nNumBrn << std::endl; + if(((blkcom::nLBus + blkcom::pSStat -> m_nSize7) >= nNumNam) && \ + (blkcom::pSStat -> m_nSize12 >= dekplt::nNumNVO) && \ + (blkcom::nLBranch >= dekplt::nNumBrn)) + goto a2859; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " Temporary error stop in \"over1\". Program dimensioning is inadequate. numnam, numnvo, numbrn =" << std::setfill(' ') << std::setw(8) << blkcom::nNumName << blkcom::nNumNVO << blkcom::nNumBRN << std::endl; + if(blkcom::pLFiles[ 76 ]) { + reinterpret_cast<std::ifstream *>(blkcom::pLFiles) -> close(); + delete blkcom::pLFiles[ 76 ]; + } + stoptp(); + + a2859: + reinterpret_cast<std::ifstream *>(blkcom::pLFiles[ 76 ]) -> seekg(0, std::ios::beg); + n8 = blkcom::nLBus; + if(blkcom::nLBus >= blkcom::nNumNam) + n8 = blkcom::nNumNam - 1; + std::cout << " New name logic. n8, numnam, lbus =" << n8 << blkcom::nNumNam << blkcom::nLBus << std::endl; + (*reinterpret_cast<std::ifstream *>(blkcom::pLFiles[ 76 ])) << datexx << tcloxx << blkcom::nNumNam << blkcom << nNumNVO << blkcom::nNumBCO << blkcom::nNumBRN; + for(j = 1; j <= n8; j++) + (*reinterpret_cast<std::ifstream *>(blkcom::pLFiles[ 76 ])) >> blkcom::sBus[ j - 1 ]; + std::cout << " bus(1 : n8) ="; + for(j = 1; j <= n8; j++) + std::cout << blkcom::sBus[ j - 1 ] << " "; + std::cout << std::endl; + + a2859: + reinterpret_cast<std::ifstream *>(blkcom::pLFiles[ 76 ]) -> seekg(0, std::ios::beg); + blkcom::nNum888 = blkcom::nNumNam - n8; + std::cout << " Ready for final, full read with num888 =" << blkcom::nNum888 << std::endl; + (*reinterpret_cast<std::ifstream *>(blkcom::pLFiles[ 76 ])) >> datexx >> tcloxx >> blkcom::nNumNam >> blckom::nNumNVO >> blkcom::nNumBCO >> blkcom::nNumBRN; + for(j = 1; j <= n8; j++) + (*reinterpret_cast<std::ifstream *>(blkcom::pLFiles[ 76 ])) >> blkcom::sBus[ j - 1 ]; + for(j = 1; j <= blkcom::nNum888; j++) + (*reinterpret_cast<std::ifstream *>(blkcom::pLFiles[ 76 ])) >> blkcom::pTexVec[ j - 1 ]; + std::cout << " After all named are read. Next, ibsout." << std::endl; + if(blkcom::nNumNVO > 0) + for(j = 1; j <= blkcom::nNumNVO) + (*reinterpret_cast<std::ifstream *>(blkcom::pLFiles[ 76 ])) >> blkcom::pIBSOut[ j - 1 ]; + std::cout << " After ibsout. Next, ...." << std::endl; + if(blkcom::nNumBRN > 0) + for(j = 1; j <= blkcom::nNumBRN) + (*reinterpret_cast<std::ifstream *>(blkcom::pLFiles[ 76 ])) >> blkcom::sMBus[ j - 1 ]; + std::cout << " After kbus, mbus." << std::endl; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 3 ])) << blkcom::sDate1 << blkcom::sTClock << blkcom::nNumNam << blkcom::nNumNVO << blkcom::nNumBCO << blkcom::nNumBRN; + for(j = 1; j <= n8; j++) + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 3 ])) << blkcom::sBus[ j - 1 ]; + for(j = 1; j <= blkcom::nNum888; j++) + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 3 ])) << blkcom::sTexVec[ j - 1 ]; + std::cout << " over1, lunit4 date and time =" << blkcom::pDate1[ 0 ] << blkcom::pDate1[ 1 ] << " " << blkcom::pTClock[ 0 ] << blkcom::pTClock[ 1 ] << std::endl; + if(blkcom::nNumNVO > 0) + for(j = 1; j <= blkcom::nNumNVO; j++) + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 3 ])) << blkcom::pIBSOut[ j - 1 ]; + if(blkcom::nNumBRN > 0) + for(j = 1; j <= blkcom::nNumBRN; j++) + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 3 ])) << blkcom::pKBus[ j - 1 ] << blkcom::pMBus[ j - 1 ]; + n18 = blkcom::nNumNVO + blkcom::nNumBRN + 1; + std::cout << " Enter loop over numbers. n18 =" << n18 << std::endl; + j = 1; + FOREVER { + for(k = 1; k <= n18; k++) { + (*reinterpret_cast<std::ifstream *>(blkcom::pLFiles[ 76 ])) >> labcom::sR4[ k - 1 ]; + if(reinterpret_cast<std::ifstream *>(blkcom::pLFiles[ 76 ]) -> eof()) + goto a6539; + } + if((blkcom::nIprsUp == 7) || (blkcom::nIprsUp > 9)) + std::cout << " j, r4(1) =" << j << labcom::sR4[ 0 ];\ + if(sR4[ 0 ] == -9999.0e0) + break; + for(k = 1; k <= n18; k++) + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 3 ])) << labcom::sR4[ k - 1 ]; + ++j; + } + + a6539: + std::cout << " Done transferring lun77 to lunit(4). j =" << j << std::endl; + runtym(d1, d2); + n18 = pLocker[ 0 ]; + n19 = pLocker[ 1 ]; + pfatch(); + tables(); + std::cout << " n18, n19, locker(1), locker(2) =" << n18 << n19 << pLocker[ 0 ] << pLocker[ 1 ] << std::endl; + blkcom::pFLStat[ 0 ] = -d1; + blkcom::pFLStat[ 1 ] = -d2; + if((n18 == pLocker[ 0 ]) && (n19 == pLocker[ 1 ])) + goto a2863; + blkcom::nKill = 201; + blkcom::sStat.m_nTACST = 2861; + }; + auto absolute_TACS_dimensions = [ & ](void) + { + if(blkcom::nNOutPR == 0) + (*reinterpret_cast<std::ostream *>(blkcom::pKFile6)) << "+Set absolute TACS list size limits." << std::endl; + // To do. + }; + auto relative_TACS_dimensions = [ & ](void) + { + if(blkcom::nNOutPR == 0) + (*reinterpret_cast<std::ostream *>(blkcom::pLFile6)) << "+Proportional allocation of total TACS storage." << std::endl; + cimage(); + if(blkcom::nKolBeg > 0) + goto a7120; + expchk(ll1, ll80, ll8); + if(blkcom::nKill > 0) + goto a9200; + for(i = 1; i <= 10; i++) + blkcom::sABuff >> labcom::sVoltBC[ i - 1 ]; + goto a7130; + + a7120: + blkcom::nNFrFld = 10; + freeOne(sVoltBC); + + a7130: + if(blkcom::nNOutPR == 0) + (*reinterpret_cast<std::ostream *>(blkcom::pKFile6)) "+Relative list sizes." << labcom::sVoltBC[ 0 ] << labcom::sVoltBC[ 1 ] << labcom::sVoltBC[ 2 ] << std::endl; + d1 = 0.0e0; + for(i = 1; i <= 8; i++) + d1 += labcom::sVoltBC[ i - 1 ]; + d1 = blckom::nLTACST * blkcom::pNByte[ 2 ] / d1; + pLSTACS[ 0 ] = (long int) (labcom::sVoltBC[ 0 ] * d1 / (4 * blkcom::pNByte[ 2 ] + 8 * blkcom::pNByte[ 3 ])); + pLSTACS[ 1 ] = (long int) (labcom::sVoltBC[ 1 ] * d1 / (2 * blkcom::pNByte[ 2 ] + blkcom::pNByte[ 3 ])); + pLSTACS[ 2 ] = (long int) (labcom::sVoltBC[ 2 ] * d1 / (2 * blkcom::pNByte[ 3 ])); + pLSTACS[ 3 ] = (long int) (labcom::sVoltBC[ 3 ] * d1 / (5 * blkcom::pNByte[ 2 ] + blkcom::pNByte[ 3 ])); + pLSTACS[ 4 ] = (long int) (labcom::sVoltBC[ 4 ] * d1 / (3 * blkcom::pNByte[ 3 ])); + pLSTACS[ 5 ] = (long int) (labcom::sVoltBC[ 5 ] * d1 / blkcom::pNByte[ 3 ]); + PLSTACS[ 6 ] = (long int) (labcom::sVoltBC[ 6 ] * d1 / blkcom::pNByte[ 2 ]); + pLSTACS[ 7 ] = (long int) (labcom::sVoltBC[ 7 ] * d1 / (6 * blkcom::pNByte[ 2 ] + 2 * blkcom::pNByte[ 3 ])); + }; + auto read_input_card = [ & ](void) + { + cimage(); + for(i = 1; i <= 14; i++) + blkcom::sABuff >> blkcom::sAUpper[ i - 1 ]; + if(strcom::toLower(blkcom::sAUpper[ 0 ]) == sText1) + goto a2697; + if(strcom::toLower(blkcom::sAUpper[ 0 ]) == sText3) + goto a2697; + if(strcom::toLower(blkcom::sAUpper[ 0 ]) == sText4) + goto a2699; + if(strcom::toLower(blkcom::sAUpper[ 0 ]) == sText6) + goto a7722; + (*reinterpret_cast<std::ostream *>(blkcom::pKFile6)) << " Begin TACS. " << std::string(27, ' ') << std::endl; + blkcom::nNewTAC = 1; + blkcom::nNTCSEX = 1; + blkcom::nNIUNRS = 1; + std::cout << " Prepare to call ntacs1 from over1." << std::endl; + ntacs1(); + std::cout << " Back from ntacs1, back in over1." << std::endl; + goto a4284; + + a2697: + blkcom::nNTCSEX = 1; + + a2699: + n1 = 1; + if(blkcom::nNOutPR != 0) + goto a2691; + if(blckom::nNTCSEX == 0) + goto a22699; + if(blckom::nNOutPR == 0) + (*reinterpret_cast<std::ostream *>(blkcom::pKFile6)) << "+TACS hyvrid setup. TACS data cards follow." << std::endl; + // 1984 format(18x, i2) + + char *pTemp[ 20 ]; + blkcom::sABuff.read(pTemp, 18); + blkcom::sABuff >> blkcom::sLStat[ 51 ]; + goto a2691; + + a4281: + if(n1 == 0) + goto a4284; + move(blkcom::pLSTACS, &blkcom::pLStat[ 60 ], ll8); + blkcom::nKTab = 1; + tacs1(); + if(blkcom::nKill > 0) + goto a9200; + if((blkcom::nNTCSEX + blkcom::nNSTACS) > 0) + goto a4276; + blkcom::nIndStp = 1; + blkcom::LimStp = blkcom::pKprChg[ 0 ]; + runtym(d1, d2); + blkcom::pFLStat[ 0 ] += d1; + blkcom::pFLStat[ 1 ] += d2; + blkcom::pFLStat[ 6 ] -= d1; + blkcom::pFLStat[ 7 ] -= d2; + blkcom::nChain = 12; + }; + // + // over1 main function body. + // + ll8 = LL8; + ll80 = LL80; + // + if(blkcom::nIprsUp >= 1) + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << "Begin module over1." << std::endl; + nPU = std::numeric_limits<double>::infinity(); + movecopy::move0<long int>(blkcom::pKTRLSW, LL6); + movecopy::move0<long int>(blkcom::pIpnTV, LL11); + movecopy::move0<long int>(blkcom::pLoopSS, LL11); + blkcom::sMonCar.m_nUserSST = 0; + nNMAuto = 0; + umcom::pBUSUM[ 0 ] = sText2; + blkcom::nNRight = 0; + blkcom::nIofgnd = 0; + blkcom::nMolDat = 0; + blkcom::nIStep = 0; + blkcom::sMonCar.m_nKLoaEP = 0; + blkcom::nTEnerg = 1e+20; + blkcom::sBranch = sText2; + blkcom::sCopy = sText6; + blkcom::nIAlter = 0; + blkcom::nIsPrin = 0; + blkcom::nIsPlot = 0; + blkcom::nIndStp = 1; + blkcom::nNOutPR = 0; + blkcom::pLFiles[ 0 ] = reinterpret_cast<void *>(&std::cerr); + blkcom::pLFiles[ 4 ] = reinterpret_cast<void *>(&std::cin); + blkcom::pLFiles[ 5 ] = reinterpret_cast<void *>(&std::cout); + blkcom::pKFile6 = blkcom::pLFiles[ 5 ]; + blkcom::pPeakND[ 0 ] = 0.0; + blkcom::nKBurro = 0; + // Assign default relative precision for 6 EMTP variable types. + // 1 --- alphanumeric 2 --- complex + // 3 --- floating-point numeric 4 --- integer numeric + // 5 --- 3 of 'subr31' 6 --- 4 of 'subr31' + // setting all equal to unity means that all have equal length. + for(j = 1; j <= 6; j++) + blkcom::pNByte[ j - 1 ] = 1; + emtp::dimens(blkcom::sLStat, \ + blkcom::nChain, \ + blkcom::sBus1, \ + blkcom::sBus2); + /* + blkcom::nLBus = blkcom::sLStat[ 0 ]; + blkcom::nLBrnch = blkcom::sLStat[ 1 ]; + blkcom::nLData = blkcom::sLStat[ 2 ]; + blkcom::nLExct = blkcom::sLStat[ 3 ]; + blkcom::nLYMat = blkcom::sLStat[ 4 ]; + blkcom::nLSwtch = blkcom::sLStat[ 5 ]; + blkcom::nLSize7 = blkcom::sLStat[ 6 ]; + blkcom::nLPast = blkcom::sLStat[ 7 ]; + blkcom::nLNonL = blkcom::sLStat[ 8 ]; + blkcom::nLChar = blkcom::sLStat[ 9 ]; + blkcom::nLSMOut = blkcom::sLStat[ 10 ]; + blkcom::nLSize12 = blkcom::sLStat[ 11 ]; + blkcom::nLFDep = blkcom::sLStat[ 12 ]; + blkcom::nLWT = blkcom::sLStat[ 13 ]; + blkcom::nLTails = blkcom::sLStat[ 14 ]; + blkcom::nLIMass = blkcom::sLStat[ 15 ]; + blkcom::nLSyn = blkcom::sLStat[ 16 ]; + blkcom::nMaxPE = blkcom::sLStat[ 17 ]; + blkcom::nLTCST = blkcom::sLStat[ 18 ]; + blkcom::nLFSem = blkcom::sLStat[ 19 ]; + blkcom::nLFD = blkcom::sLStat[ 20 ]; + blkcom::nLHist = blkcom::sLStat[ 21 ]; + blkcom::nLSize23 = blkcom::sLStat[ 22 ]; + blkcom::nLComp = blkcom::sLStat[ 23 ]; + blkcom::nLSPCum = blkcom::sLStat[ 24 ]; + blkcom::nLSize26 = blkcom::sLStat[ 25 ]; + blkcom::nLSize27 = blkcom::sLStat[ 26 ]; + blkcom::nLSize28 = blkcom::sLStat[ 27 ]; + */ + // memcpy((void *) &blkcom::sSStat, \ + // (void *) blkcom::sLStat.data(), \ + //sizeof(blkcom::tStat)); + blkcom::pSStat = blkcom::sLStat.data() + // Assign 'n1' equal to the number of EMTP lists of variable + // dimensioning (of the solution overlays). + //n1 = 27; + //blkcom::nLTLabl = blkcom::sLStat[ n1 + 1 ]; + comlock::pLocker[ 0 ] = blkcom::sBus1; + comlock::pLocker[ 1 ] = blkcom::sBus2; + d13 = blkcom::pSStat -> m_nTACST; + d13 /= 1600.; + for(j = 1; j <= 8; j++) + pLSTACS[ j - 1 ] *= d13; + n1 = -9999; + movecopy::copy<long int>(n1, blkcom::sLStat, LL60); + sysdep(); + movecopy::move0<double>(blkcom::sFLStat, LL20); + date_time::runtym(d1, d2); + blkcom::sFLStat[ 0 ] -= d1; + blkcom::sFLStat[ 1 ] -= d2; + blkcom::nTenM6 = pow(blkcom::nTenM3, 2.0); + blkcom::nMaxZNO = 50; + blkcom::nEpsZNo = blkcom::nEpsilon; + blkcom::nEpWarn = blkcom::nTenM3; + blkcom::nEpStop = 0.1; + blkcom::pZNoLim[ 0 ] = 1.0; + blkcom::pZNoLim[ 1 ] = 1.5; + blkcom::sMonCar.m_nKBase = 0; + blkcom::sMonCar.m_nISW = 0; + blkcom::pKPrChg[ 0 ] = -7777; + blkcom::nJFLSOS = 0; + // rewind lunit1 + // rewind lunit3 + // rewind lunit4 + blkcom::sMonCar.m_nKnt = 1; + blkcom::sMonCar.m_pMTape = blkcom::pLFiles[ 4 ]; + blkcom::nIFDep = 0; + blkcom::nNTCSex = 0; + blkcom::nNSTACS = 0; + blkcom::nKanal = 0; + + // Initialize KPARTB with nonzero value so later minus + // sign can be applied as flag of "renumber bypass" usage: + blkcom::nKPartB = 1000; + + // SYSDEP will redefine if low-prec. Complex ("cable constants"): + nZNVRef = 0.0; + blkcom::nFMaxFS = 0.0; + blkcom::pBegMax[ 0 ] = 0.0; + blkcom::pBegMax[ 1 ] = 0.0; + blkcom::pBegMax[ 2 ] = std::numeric_limits<double>::infinity(); + blkcom::nKTRef = 0; + blkcom::nNComp = 0; + blkcom::nNumSM = 0; + blkcom::nNumUM = 0; + blkcom::nNumOut = 0; + blkcom::nKill = 0; + blkcom::nNum99 = 0; + blkcom::nModOut = 0; + blkcom::pInEcho = nullptr; + sBus = blkcom::sBlank; + blkcom::nIAverg = 0; + movecopy::move0<int>(labcom::sISourc, blkcom::sSStat.m_nSwitch); + movecopy::move0<int>(labcom::sKodeBR, blkcom::sSStat.m_nBranch); + movecopy::move0<int>(labcom::sKodSem, blkcom::sSStat.m_nBranch); + movecopy::move0<int>(labcom::sLength, blkcom::sSStat.m_nBranch); + movecopy::move0<int>(labcom::sIndHst, blkcom::sSStat.m_nBranch); + movecopy::move0<double>(labcom::sBValue, blkcom::sSStat.m_nSize12); + nIsWent = 1; + blkcom::nOmega = 0.0; + blkcom::nDegMin = 0.0; + blkcom::nDegMax = 0.0; + blkcom::nSglFir = 2.0 * M_PI; + blkcom::nJST = 0; + blkcom::nJST1 = 1; + blkcom::nIFDep2 = 1; + blkcom::nIAdd = 0; + blkcom::nIFSem = 0; + // + com2::nIDM = 1; + com2::nIDQ = 1; + com2::nIDU = 1; + com2::nIDT = 1; + nIAdQQ = 1; + com2::nIQ = 0; + com2::nIDA = 0; + com2::nIDY = 0; + com2::nIFKC = 0; + nNK = 0; + nNGroup = 0; + nNTurn = 0; + nNFDBR = 0; + nNFDPH = 9; + nNFDHST = 5400; + // nNFDPOL = 25; + nNFDPol = 30; + nNTLin = 0; + // pLU2 = ... + pLU6 = blkcom::pLFiles[ 5 ]; + + a5223: + blkcom::nIFX = 0; + nIP = 2; + nIY = 2; + blkcom::nICat = 0; + if(blkcom::nNOutPR != 0) + goto a15; + if(blkcom::nKol132 == 132) + goto a6452; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " ********* Begin \"M40.\" EMTP solution."; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " Size /label/ ="; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(7) << std::setfill(' ') << std::dec; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << blkcom::sSStat.m_nTLabl; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " integer words." << std::endl; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " list limits 1-10 :"; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nBus; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nBranch; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nData; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nExct; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nYMat; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nSwitch; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nSize7; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nPast; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nNOnL; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nChar << std::endl; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " list limits 11-20 :"; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nSMOut; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nSize12; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nFDep; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nWT; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nTails; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nIMass; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nSyn; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nMaxPE; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nTACST; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(6) << std::dec << blkcom::sSStat.m_nFSem << std::endl; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " list limits 21-end:"; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nFD; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nHist; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nSize23; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nComp; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nSPCum; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nSize26; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nSize27; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nSize28 << std::endl; + goto a15; + + a6452: + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " Associated user documentation is the 864-page EMTP rule book dated June, 1984. Version M43. Vardim time/date ="; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << comlock::pLocker[ 0 ] << comlock::pLocker[ 1 ] << std::endl; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " Independent list limits follow. Total length of /label/ equals "; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(8) << std::dec << blkcom::sSStat.m_nTLabl; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " integer words. "; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nBus; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nBranch; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nData; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nExct; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nYMat; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nSwitch << std::endl; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " " << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nSize7; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nPast; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nNOnL; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nChar; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nSMOut; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nSize12; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nFDep; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nWT; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nTails; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nIMass; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nSyn; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nMaxPE; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nTACST; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nFSem; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nFD; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nHist; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nSize23; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nComp; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nSPCum; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nSize26; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nSize27; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setw(6) << std::setfill(' ') << std::dec << blkcom::sSStat.m_nSize28 << std::endl; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " " << std::string(51, '-') << "+" << std::string(80, '-') << std::endl; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " Descriptive interpretation of new-case input data |" << std::flush; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " input data card images printed below, all 80 columns, character by character." << std::endl << std::flush; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " " << std::string(51, ' ') << "|" << std::flush; + for(i = 1; i <= 8; i++) { + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::string(9, ' ') << std::flush; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::setfill(' ') << std::setw(1) << std::dec << i << std::flush; + } + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::endl; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " " << std::string(51, ' ') << "|" << std::flush; + for(i = 1; i <= 8; i++) + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::string(9, ' ') << "0" << std::flush; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << std::endl << std::flush; + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << " " << std::string(51, '-') << "+" << std::string(80, '-') << std::endl; + + a15: + FOREVER { + emtp::cimage(); + if(blkcom::nKill > 0) + goto a9200; + blkcom::nNRight = -2; + n9 = blkcom::nKolBeg; + blkcom::nKolBeg = 1; + blkcom::sTexCol = blkcom::sABuff.str().substr(0, 80); + freedom::freeOne(d1); + + a3247: + blkcom::nNRight = 0; + if(n9 == -std::numeric_limits<long int>::infinity()) + blkcom::nKolBeg = n9; + if(blkcom::nNFrFld > 0) + goto a3280; + if(blkcom::nNOutPR == 0) + (*reinterpret_cast<std::ostream *>(blkcom::pKFile6)) << "+Blank termination-of-run card." << std::endl; + interp(); + blkcom::nIVolt = 7777; + + a3273: + blkcom::nKill = 9999; + blkcom::nChain = 31; + goto a9800; + + a3280: + reques(); + i = sStat.m_nMaxPE; + switch(i) { + case 0: + + a2843: + if((blkcom::nNOutPR != 0) && (blkcom::nIprsUp > 0)) + blkcom::nNOutPR = 0; + blkcom::nXOpt = blkcom::nStatFR; + blkcom::nCOpt = blkcom::nStatFR; + blkcom::nKolBeg = n9; + if(blkcom::nKolBeg > 0) + goto a4201; + utilities::expchk(ll1, ll80, ll8); + if(blkcom::nKill > 0) + goto a9200; + blkcom::sABuff >> blkcom::nDeltaT >> blkcom::nTMax >> d1 >> d2 >> d3 >> blkcom::nTolMat >> blkcom::nT; + if(blkcom::nT == 0.0) + blkcom::nT = 0.0e0; + goto a4202; + + a4201: + blkcom::nNFrFld = 1; + blkcom::nNRight = 0; + freedom::freeOne(blkcom::nDeltaT); + freedom::freeOne(blkcom::nTMax); + freedom::freeOne(d1); + freedom::freeOne(d2); + freedom::freeOne(d3); + freedom::freeOne(blkcom::nTolMat); + freedom::freeOne(blkcom::nT); + + a4202: + if(blkcom::nNOutPR == 0) + (*reinterpret_cast<std::ostream *>(blkcom::pKFile6)) << "+Misc. data." << std::setfill(' ') << std::setw(12) << blkcom::nDeltaT << blkcom::nTMax << d1 << std::endl; + if(blkcom::nIofbnd != 33666) + goto a4206; + blkcom::nChain = 41; + blkcom::nXOpt = d1; + goto a9800; + break; + + case 11: + goto a3273; + break; + + case 15: + start_again(); + goto a9200; + break; + + case 28: + goto a3247; + break; + + case 32: + absolute_TACS_dimensions(); + goto a15; + break; + + case 33: + relative_TACS_dimensions(); + goto a15; + break; + + case 34: + goto a523; + break; + + case 38: + goto a15; + break; + + case 40: + goto a4308; + break; + } + if(blkcom::nKill > 0) + goto a9200; + if(blkcom::nChain != 1) + goto a9800; + } + + a4276: + blkcom::nChain = 12; + goto a9800; + + a4284: + blkcom::nChain = 2; + goto a9800; + + a9200: + blkcom::nChain = 51; + blkcom::sLStat[ 17 ] = 1; + + a9800: + blkcom::nLastOV = 1; + n5 = (size_t) &nIDA; + n6 = (size_t) &nIFKC; + if(blkcom::nIprsUp >= 1) + (*reinterpret_cast<std::ostream *>(blkcom::pLFiles[ 5 ])) << "Exit module over1." << std::endl; + + a99999: + return; + } + + // subroutine tacs1c. + void tacs1c(void) + { + // To do. + } + + // subroutine swmodf. + void swmodf(void) + { + // To do. + } + + // subroutine reques. + void reques(void) + { + // To do. + } + + // subroutine sysdep. + void sysdep(void) + { + std::string sCol(""); + std::string sColXXX("plt00000000000.pl4"); + std::string sLettra("a"); + std::string sLettrb("b"); + std::string sLettrc("c"); + std::string sBusNM1(" "); + std::string sBusNM2("........"); + std::string sBusNM3("terra"); + std::string sText1 = ","; + std::string sText2 = "$"; + // + sCol = sColXXX; + // To do. + blkcom::sBlank = sBusNM1; + blkcom::sTrash = sBusNM2; + blkcom::sTerra = sBusNM3; + blkcom::cCSepar = sText1[ 0 ]; + blkcom::sChCont = sText2; + blkcom::nTenM3 = 1.0e-3; + blkcom::nUnity = 1.0e0; + blkcom::nOneHaf = 0.5e0; + blkcom::pNByte[ 0 ] = 2; + blkcom::pNByte[ 1 ] = 2; + blkcom::pKTRLSW[ 5 ] = 0; + blkcom::pNByte[ 2 ] = 2; + blkcom::nEpsilon = 1.0e-8; + //blkcom::nTwoPI = 2.0 * M_PI; + // To do. + } + + // subroutine midov1. + void midov1(void) + { + // To do. + } + + // subroutine nmincr. + void nmincr(std::string &, int &) + { + // To do. + } + + // subroutine tacs1. + void tacs1(void) + { + // To do. + } + + // subroutine tacs1a. + void tacs1a(void) + { + // To do. + } + + // subroutine tacs1b. + void tacs1b(void) + { + // To do. + } + + // subroutine expchk. + void expchk(int &, int &, int &) + { + // To do. + } + + // subroutine intchk. + void intchk(int &, int &, int &) + { + // To do. + } + + // subroutine pfatch. + void pfatch(void) + { + // To do. + } + +} + +// end of file over1.cpp |