38 #include <Xyce_config.h>
47 #include <N_IO_ActiveOutput.h>
48 #include <N_IO_CircuitBlock.h>
49 #include <N_IO_CmdParse.h>
50 #include <N_IO_OptionBlock.h>
51 #include <N_IO_PkgOptionsMgr.h>
52 #include <N_IO_SpiceSeparatedFieldTool.h>
53 #include <N_LAS_BlockSystemHelpers.h>
54 #include <N_LAS_BlockVector.h>
55 #include <N_LAS_HBBuilder.h>
56 #include <N_LAS_HBPrecondFactory.h>
57 #include <N_LAS_PrecondFactory.h>
58 #include <N_LAS_System.h>
62 #include <N_PDS_ParMap.h>
67 #include <N_UTL_APFT.h>
68 #include <N_UTL_Diagnostic.h>
69 #include <N_UTL_ExtendedString.h>
70 #include <N_UTL_FFTInterface.hpp>
71 #include <N_UTL_FeatureTest.h>
72 #include <N_UTL_MachDepParams.h>
73 #include <N_UTL_Math.h>
74 #include <N_UTL_Timer.h>
76 #include <Teuchos_BLAS.hpp>
77 #include <Teuchos_Utils.hpp>
78 #include <Teuchos_ScalarTraits.hpp>
79 #include <Teuchos_SerialDenseMatrix.hpp>
80 #include <Teuchos_SerialDenseVector.hpp>
81 #include <Teuchos_SerialDenseHelpers.hpp>
82 #include <Teuchos_SerialDenseSolver.hpp>
84 #include <N_PDS_Comm.h>
88 using Teuchos::rcp_dynamic_cast;
103 Linear::System & linear_system,
107 Linear::Builder & builder,
108 Topo::Topology & topology,
109 IO::InitialConditionsManager & initial_conditions_manager,
110 IO::RestartMgr & restart_manager)
135 startUpPeriodsGiven_(false),
143 intmodMaxGiven_(false),
144 fastTimeDisc_(N_MPDE_Discretization::Backward),
145 fastTimeDiscOrder_(1),
146 resetForStepCalledBefore_(false)
194 std::vector<std::string> srcVec;
283 Xyce::lout() <<
" ***** Running HB initial conditions....\n" << std::endl;
286 Xyce::dout() << std::endl
287 << section_divider << std::endl
288 <<
" HB::init()" << std::endl;
297 Xyce::dout() <<
"HB period =" <<
period_ << std::endl;
308 for(
int i = 0; i <
size_; ++i )
329 Xyce::dout() <<
"HB::init(): Generate Maps\n";
332 rcp(
pdsMgrPtr_->getParallelMap( Parallel::SOLUTION_OVERLAP_GND ),
false) );
346 std::vector<std::string> srcVec;
370 ftInterface_ = Teuchos::rcp(
new N_UTL_FFTInterface<std::vector<double> >(
size_ ) );
375 ftInterface_ = Teuchos::rcp(
new N_UTL_FFTInterface<std::vector<double> >(
size_ ) );
392 for (
int i=0 ; i<
size_ ; ++i)
394 if (DEBUG_HB && isActive(Diag::HB_FAST_TIMES))
395 Xyce::dout() <<
"HB::init(): Loading initial condition data from time: fastTimes_["
408 if (DEBUG_HB && isActive(Diag::HB_PRINT_VECTORS))
410 Xyce::dout() <<
"HB Initial Condition Solution!\n";
412 Xyce::dout() <<
"HB Initial Condition State Vector!\n";
414 Xyce::dout() <<
"HB Initial Condition Store Vector!\n";
485 Xyce::dout() << section_divider << std::endl;
502 bool returnValue =
true;
504 Xyce::lout() <<
" ***** Beginning full HB simulation....\n" << std::endl;
508 Xyce::dout() << std::endl
509 << section_divider << std::endl
510 <<
" HB::loopProcess" << std::endl;
526 returnValue = dc_sweep.
run();
532 Xyce::lout() <<
" ***** Harmonic Balance Computation Summary *****" << std::endl;
542 dout() << section_divider << std::endl;
643 const Util::OptionBlock & option_block)
645 for (Util::ParamList::const_iterator it = option_block.begin(), end = option_block.end(); it != end; ++it)
647 if ((*it).uTag() ==
"FREQ")
649 freqs_ = (*it).getValue<std::vector<double> >();
656 Report::UserError() <<
"Frequency of oscillation " <<
freqs_[0] <<
" is less than or equal to zero, invalid .HB specification";
659 if (DEBUG_ANALYSIS && isActive(Diag::TIME_PARAMETERS))
661 dout() << section_divider << std::endl
662 <<
"HB transient simulation parameters"
665 <<
"HB frequency = " <<
freqs_[0] << std::endl
684 for(Util::ParamList::const_iterator iterPL = OB.begin(), endPL = OB.end(); iterPL != endPL; ++iterPL )
686 ExtendedString tag = iterPL->tag();
689 if (std::string(tag,0,7) ==
"NUMFREQ" )
692 size_ = iterPL->getImmutableValue<
int>() *2 + 1;
696 else if ( tag ==
"STARTUPPERIODS" )
703 else if( tag ==
"SAVEICDATA" )
707 else if( tag ==
"TEST" )
709 test_ =
static_cast<bool> (iterPL->getImmutableValue<
int>());
711 else if (tag ==
"DEBUGLEVEL" )
713 setHBDebugLevel(iterPL->getImmutableValue<
int>());
715 else if ( tag ==
"TAHB" )
717 taHB_ = iterPL->getImmutableValue<
int>();
719 else if ( tag ==
"VOLTLIM" )
721 voltLimFlag_ =
static_cast<bool> (iterPL->getImmutableValue<
int>());
723 else if ( tag ==
"INTMODMAX" )
725 intmodMax_ = iterPL->getImmutableValue<
int>();
730 else if ( tag ==
"METHOD" )
732 ExtendedString stringVal ( iterPL->stringValue() );
737 else if ( tag ==
"NUMTPTS")
743 UserWarning(*
this) <<
"Unrecognized HBINT option " << tag;
749 Report::UserError() <<
"The size of numFreq does not match the number of tones in .hb!";
757 for (
int i=0; i <
freqs_.size(); i++ )
797 precFactory_ =
new Linear::HBPrecondFactory(OB, builder);
826 Linear::Vector & solnVecPtr,
827 std::vector<double> & timePoints,
828 std::vector<double> & freqPoints,
829 RCP<Linear::BlockVector> & timeDomainSolnVec,
830 RCP<Linear::BlockVector> & freqDomainSolnVecReal,
831 RCP<Linear::BlockVector> & freqDomainSolnVecImag,
832 RCP<Linear::BlockVector> & timeDomainStoreVec,
833 RCP<Linear::BlockVector> & freqDomainStoreVecReal,
834 RCP<Linear::BlockVector> & freqDomainStoreVecImag,
835 RCP<Linear::BlockVector> & timeDomainLeadCurrentVec,
836 RCP<Linear::BlockVector> & freqDomainLeadCurrentVecReal,
837 RCP<Linear::BlockVector> & freqDomainLeadCurrentVecImaginary,
838 RCP<Linear::BlockVector> & timeDomainJunctionVoltageVec,
839 RCP<Linear::BlockVector> & freqDomainJunctionVoltageVecReal,
840 RCP<Linear::BlockVector> & freqDomainJunctionVoltageVecImaginary
843 Linear::BlockVector & blockSolVecPtr =
dynamic_cast<Linear::BlockVector &
>(solnVecPtr);
855 int N = blockSolVecPtr.blockCount();
856 Teuchos::RCP<N_PDS_ParMap> baseMap = Teuchos::rcp_const_cast<N_PDS_ParMap>(
hbBuilderPtr_->getBaseSolutionMap() );
857 Teuchos::RCP<N_PDS_ParMap> globalMap = Linear::createBlockParMap( blockCounttd, *baseMap );
859 timeDomainSolnVec = Teuchos::rcp(
new Linear::BlockVector(blockCounttd, globalMap, baseMap ) );
865 timePoints.resize(blockCounttd);
875 double TimeStep =
period_/blockCounttd;
877 for(
int i = 0; i < blockCounttd; ++i )
878 timePoints[i] = i*TimeStep;
888 if (
ftInterface_->getFFTInterface()->getSignalLength() != blockCounttd)
890 ftInterface_ = Teuchos::rcp(
new N_UTL_FFTInterface<std::vector<double> >(blockCounttd) );
913 int blockCount =
size_;
914 Teuchos::RCP<N_PDS_ParMap> globalMapfreq = Linear::createBlockParMap( blockCount, *baseMap );
915 freqDomainSolnVecReal = Teuchos::rcp(
new Linear::BlockVector( blockCount, globalMapfreq, baseMap ) );
916 freqDomainSolnVecImag = Teuchos::rcp(
new Linear::BlockVector( blockCount, globalMapfreq, baseMap ) );
922 for (
int j=0; j<N; j++)
928 int lid = baseMap->globalToLocalIndex( j );
929 Linear::Vector& solBlock = blockSolVecPtr.block( j );
931 Linear::Vector& realVecRef = freqDomainSolnVecReal->block((blockCount-1)/2);
932 Linear::Vector& imagVecRef = freqDomainSolnVecImag->block((blockCount-1)/2);
936 realVecRef[lid] = solBlock[0];
937 imagVecRef[lid] = solBlock[1];
940 for (
int i=1; i <= (
size_-1)/2; ++i)
943 Linear::Vector& realVecRef_neg = freqDomainSolnVecReal->block((blockCount-1)/2 - i);
944 Linear::Vector& imagVecRef_neg = freqDomainSolnVecImag->block((blockCount-1)/2 - i);
945 Linear::Vector& realVecRef_pos = freqDomainSolnVecReal->block((blockCount-1)/2 + i);
946 Linear::Vector& imagVecRef_pos = freqDomainSolnVecImag->block((blockCount-1)/2 + i);
950 realVecRef_neg[lid] = solBlock[ 2*(
size_-i) ];
951 imagVecRef_neg[lid] = solBlock[ 2*(
size_-i) + 1 ];
952 realVecRef_pos[lid] = solBlock[ 2*i ];
953 imagVecRef_pos[lid] = solBlock[ 2*i+1 ];
959 Teuchos::RCP<N_PDS_ParMap> baseStoreMap = Teuchos::rcp_const_cast<N_PDS_ParMap>(
hbBuilderPtr_->getBaseStoreMap() );
960 Teuchos::RCP<N_PDS_ParMap> globalStoreMap = Linear::createBlockParMap( blockCounttd, *baseStoreMap );
961 Teuchos::RCP<N_PDS_ParMap> globalStoreMapfd = Linear::createBlockParMap( blockCount, *baseStoreMap );
963 freqDomainStoreVecReal = Teuchos::rcp(
new Linear::BlockVector( blockCount, globalStoreMapfd, baseStoreMap ) );
964 freqDomainStoreVecImag = Teuchos::rcp(
new Linear::BlockVector( blockCount, globalStoreMapfd, baseStoreMap ) );
966 timeDomainStoreVec = Teuchos::rcp(
new Linear::BlockVector( blockCounttd, globalStoreMap, baseStoreMap ) );
967 N = timeDomainStoreVec->block(0).globalLength();
969 for (
int j=0; j<N; j++)
974 int lid = baseStoreMap->globalToLocalIndex( j );
975 Linear::Vector& storeBlock = bStoreVecFreqPtr_->block( j );
977 Linear::Vector& realVecRef = freqDomainStoreVecReal->block((blockCount-1)/2);
978 Linear::Vector& imagVecRef = freqDomainStoreVecImag->block((blockCount-1)/2);
982 realVecRef[lid] = storeBlock[0];
983 imagVecRef[lid] = storeBlock[1];
986 for (
int i=1; i <= (
size_-1)/2; ++i)
988 Linear::Vector& realVecRef_neg = freqDomainStoreVecReal->block((blockCount-1)/2 - i);
989 Linear::Vector& imagVecRef_neg = freqDomainStoreVecImag->block((blockCount-1)/2 - i);
990 Linear::Vector& realVecRef_pos = freqDomainStoreVecReal->block((blockCount-1)/2 + i);
991 Linear::Vector& imagVecRef_pos = freqDomainStoreVecImag->block((blockCount-1)/2 + i);
995 realVecRef_neg[lid] = storeBlock[ 2*(
size_ -i) ];
996 imagVecRef_neg[lid] = storeBlock[ 2*(
size_ -i) + 1 ];
997 realVecRef_pos[lid] = storeBlock[ 2*i ];
998 imagVecRef_pos[lid] = storeBlock[ 2*i+1 ];
1005 if (bStoreVecFreqPtr_->blockCount() > 0 )
1011 Teuchos::RCP<N_PDS_ParMap> baseLeadCurrentMap = Teuchos::rcp_const_cast<N_PDS_ParMap>(
hbBuilderPtr_->getBaseLeadCurrentMap() );
1012 Teuchos::RCP<N_PDS_ParMap> globalLeadCurrentMap = Linear::createBlockParMap( blockCounttd, *baseLeadCurrentMap );
1013 Teuchos::RCP<N_PDS_ParMap> globalLeadCurrentMapfq = Linear::createBlockParMap( blockCount, *baseLeadCurrentMap );
1015 freqDomainLeadCurrentVecReal = Teuchos::rcp(
new Linear::BlockVector( blockCount, globalLeadCurrentMapfq, baseLeadCurrentMap ) );
1016 freqDomainLeadCurrentVecImaginary = Teuchos::rcp(
new Linear::BlockVector( blockCount, globalLeadCurrentMapfq, baseLeadCurrentMap ) );
1017 freqDomainJunctionVoltageVecReal = Teuchos::rcp(
new Linear::BlockVector( blockCount, globalLeadCurrentMapfq, baseLeadCurrentMap ) );
1018 freqDomainJunctionVoltageVecImaginary = Teuchos::rcp(
new Linear::BlockVector( blockCount, globalLeadCurrentMapfq, baseLeadCurrentMap ) );
1020 timeDomainLeadCurrentVec = Teuchos::rcp(
new Linear::BlockVector( blockCounttd, globalLeadCurrentMap, baseLeadCurrentMap ));
1021 timeDomainJunctionVoltageVec = Teuchos::rcp(
new Linear::BlockVector( blockCounttd, globalLeadCurrentMap, baseLeadCurrentMap ) );
1023 N = timeDomainLeadCurrentVec->block(0).globalLength();
1025 for (
int j=0; j<N; j++)
1030 int lid = baseLeadCurrentMap->globalToLocalIndex( j );
1031 Linear::Vector& leadCurrentBlock = bLeadCurrentVecFreqPtr_->block( j );
1033 Linear::Vector& realVecRef1 = freqDomainLeadCurrentVecReal->block((blockCount-1)/2);
1034 Linear::Vector& imagVecRef1 = freqDomainLeadCurrentVecImaginary->block((blockCount-1)/2);
1035 Linear::Vector& realVecRef2 = freqDomainJunctionVoltageVecReal->block((blockCount-1)/2);
1036 Linear::Vector& imagVecRef2 = freqDomainJunctionVoltageVecImaginary->block((blockCount-1)/2);
1040 realVecRef1[lid] = leadCurrentBlock[0];
1041 imagVecRef1[lid] = leadCurrentBlock[1];
1042 realVecRef2[lid] = leadCurrentBlock[0];
1043 imagVecRef2[lid] = leadCurrentBlock[1];
1046 for (
int i=1; i <= (
size_ -1)/2; ++i)
1048 Linear::Vector& realVecRef_neg1 = freqDomainLeadCurrentVecReal->block((blockCount-1)/2 - i);
1049 Linear::Vector& imagVecRef_neg1 = freqDomainLeadCurrentVecImaginary->block((blockCount-1)/2 - i);
1050 Linear::Vector& realVecRef_pos2 = freqDomainLeadCurrentVecReal->block((blockCount-1)/2 + i);
1051 Linear::Vector& imagVecRef_pos2 = freqDomainLeadCurrentVecImaginary->block((blockCount-1)/2 + i);
1053 Linear::Vector& realVecRef_neg3 = freqDomainJunctionVoltageVecReal->block((blockCount-1)/2 - i);
1054 Linear::Vector& imagVecRef_neg3 = freqDomainJunctionVoltageVecImaginary->block((blockCount-1)/2 - i);
1055 Linear::Vector& realVecRef_pos4 = freqDomainJunctionVoltageVecReal->block((blockCount-1)/2 + i);
1056 Linear::Vector& imagVecRef_pos4 = freqDomainJunctionVoltageVecImaginary->block((blockCount-1)/2 + i);
1060 realVecRef_neg1[lid] = leadCurrentBlock[ 2*(
size_ -i) ];
1061 imagVecRef_neg1[lid] = leadCurrentBlock[ 2*(
size_ -i) + 1 ];
1062 realVecRef_pos2[lid] = leadCurrentBlock[ 2*i ];
1063 imagVecRef_pos2[lid] = leadCurrentBlock[ 2*i+1 ];
1064 realVecRef_neg3[lid] = leadCurrentBlock[ 2*(
size_ -i) ];
1065 imagVecRef_neg3[lid] = leadCurrentBlock[ 2*(
size_ -i) + 1 ];
1066 realVecRef_pos4[lid] = leadCurrentBlock[ 2*i ];
1067 imagVecRef_pos4[lid] = leadCurrentBlock[ 2*i+1 ];
1072 if (bLeadCurrentVecFreqPtr_->blockCount() > 0 )
1079 freqDomainSolnVecReal->printPetraObject(std::cout);
1080 freqDomainSolnVecImag->printPetraObject(std::cout);
1082 Xyce::dout() <<
"HB Store Vector FD" << std::endl;
1084 freqDomainStoreVecReal->printPetraObject(std::cout);
1085 freqDomainStoreVecImag->printPetraObject(std::cout);
1128 maxValue = (
size_ - 1)/2;
1135 int numAnalysisFreqs =
freqs_.size();
1139 k.resize(numAnalysisFreqs);
1148 int numTotalFrequencies;
1150 int numExtraFreqs = 0;
1160 for (
int i=1; i < numAnalysisFreqs; i++)
1172 numTotalFrequencies *= numFreqs_[i];
1177 for (
int i=0; i< numAnalysisFreqs; i++)
1179 Xyce::dout() <<
"HB index " << i << std::endl;
1180 Xyce::dout() <<
"HB numPosFreqs =" <<
numPosFreqs[i] << std::endl;
1181 Xyce::dout() <<
"HB k =" << k[i] << std::endl;
1183 Xyce::dout() <<
"HB numTotalFrequencies =" << numTotalFrequencies<< std::endl;
1184 Xyce::dout() <<
"HB numextrafreqs =" << numExtraFreqs << std::endl;
1187 int numIndex = numTotalFrequencies;
1189 Teuchos::SerialDenseMatrix<int,double> indexMatrix(numAnalysisFreqs, numTotalFrequencies);
1193 Xyce::dout() <<
"HB intmodMax =" <<
intmodMax_ << std::endl;
1198 int idxMod, idxValues;
1201 std::vector<int> goodIndex;
1202 for (
int i=0; i < numIndex; i++)
1207 for (
int j= (numAnalysisFreqs - 1); j >= 0; j-- )
1209 idxMod = nextIndex%k[j];
1210 idxValues = (nextIndex - idxMod)/k[j];
1212 indexMatrix (j, i) =
static_cast<double>(idxValues - (
numFreqs_[j] - 1)/2 );
1214 sumIndex += abs(idxValues - (
numFreqs_[j] - 1)/2 );
1219 goodIndex.push_back(i);
1222 int diaindexSize = goodIndex.size();
1224 Teuchos::SerialDenseMatrix<int,double> diaindexMatrix( numAnalysisFreqs, (diaindexSize + numExtraFreqs) );
1225 diaindexMatrix.putScalar(0.0);
1227 for (
int i=0; i < diaindexSize; i++)
1229 for (
int j= (numAnalysisFreqs - 1); j >= 0; j-- )
1230 diaindexMatrix (j, i) = indexMatrix (j, goodIndex[i]);
1235 for (
int i=0; i< diaindexSize; i++)
1237 dout() <<
"good index i = " << i << goodIndex[i] << std::endl;
1239 dout() <<
" checking diamond indexMatrix" << std::endl;
1240 diaindexMatrix.print(dout());
1242 dout() <<
" checking indexMatrix" << std::endl;
1243 indexMatrix.print(dout());
1247 int extraIndexPos = diaindexSize;
1248 for (
int i=0; i < numAnalysisFreqs ; i++)
1255 diaindexMatrix (i, extraIndexPos + j ) =
static_cast<double>(
intmodMax_ + j + 1 );
1264 dout() <<
" checking diamond indexMatrix after axis" << std::endl;
1265 diaindexMatrix.print(dout());
1270 std::vector<double> posfreqPoints_;
1272 int posindexSize = (diaindexSize - 1)/2;
1273 posfreqPoints_.resize(posindexSize + numExtraFreqs);
1275 Teuchos::SerialDenseMatrix<int,double> currindexMatrix( Teuchos::View, diaindexMatrix, numAnalysisFreqs, (posindexSize + numExtraFreqs), 0, posindexSize+1 );
1276 Teuchos::SerialDenseVector<int,double> currfreqPoints( Teuchos::View, &posfreqPoints_[0], (posindexSize + numExtraFreqs ) );
1278 Teuchos::SerialDenseVector<int,double> hbFreqs( Teuchos::View, &
freqs_[0], numAnalysisFreqs);
1280 currfreqPoints.multiply( Teuchos::TRANS, Teuchos::NO_TRANS, 1.0, currindexMatrix, hbFreqs, 0.0 );
1285 dout() <<
"checking positive frequencies" << std::endl;
1286 currindexMatrix.print(dout());
1287 hbFreqs.print(dout());
1288 currfreqPoints.print(dout());
1291 for (
int i=0; i < posindexSize; i++)
1293 if (posfreqPoints_[i] < 0.0)
1294 posfreqPoints_[i] = fabs( posfreqPoints_[i]);
1297 std::sort(posfreqPoints_.begin(), posfreqPoints_.end() );
1302 for (
int i=0; i< posfreqPoints_.size(); i++)
1303 dout() <<
"pos frequency point " << posfreqPoints_[i] << std::endl;
1306 posfreqPoints_.erase(std::unique(posfreqPoints_.begin(), posfreqPoints_.end() ), posfreqPoints_.end() );
1309 if (abs( posfreqPoints_[0]) < 2.0*Util::MachineDependentParams::MachinePrecision() )
1310 posfreqPoints_.erase( posfreqPoints_.begin());
1312 size_ = ( posfreqPoints_.size() ) *2 + 1;
1316 for (
int i=0; i<posfreqPoints_.size(); i++)
1318 dout() <<
"pos frequency point after " << posfreqPoints_[i] << std::endl;
1321 Xyce::dout() <<
"HB size =" <<
size_ << std::endl;
1327 for( i = 0; i <
size_; ++i )
1329 if (i < (size_-1)/2)
1330 freqPoints_[i] = - posfreqPoints_[ (size_-1)/2 - i - 1 ];
1331 else if (i > (size_-1)/2)
1332 freqPoints_[i] = posfreqPoints_[ i - (size_-1)/2 - 1 ];
1341 dout() <<
" frequency point " <<
freqPoints_[i] << std::endl;
1363 int posFreq = (
size_-1)/2;
1364 int oversampleRate = 5;
1366 int periodSampleMultiplier = 1;
1368 Teuchos::BLAS<int,double> blas;
1369 std::vector<double> testPoints(oversampleRate*
size_);
1371 int myPID =
pdsMgrPtr_->getPDSComm()->procID();
1376 for (
int i=0; i<oversampleRate*
size_; ++i)
1378 testPoints[i] = periodSampleMultiplier*
period_*((Teuchos::ScalarTraits<double>::random()+1)/2);
1381 Teuchos::SerialDenseMatrix<int,double> testMatrix(size_,oversampleRate*size_);
1384 for (
int j=0; j<oversampleRate*
size_; ++j)
1386 testMatrix(0,j) = 1.0;
1389 for (
int i=1; i<=posFreq; i++)
1392 for (
int j=0; j<oversampleRate*
size_; j++)
1394 testMatrix(2*i-1,j) = cos(2*
M_PI*
freqPoints_[posFreq+i]*testPoints[j]);
1400 std::vector<double> weightVector(oversampleRate*size_);
1401 for (
int i=0; i<
size_; ++i)
1405 double maxValue = 0.0;
1406 for (
int j=i; j<oversampleRate*
size_; ++j)
1408 Teuchos::SerialDenseMatrix<int,double> tempVector( Teuchos::View, testMatrix, size_, 1, 0, j );
1409 weightVector[j] = tempVector.normFrobenius();
1411 if (weightVector[j] > maxValue)
1414 maxValue = weightVector[j];
1420 std::swap( testPoints[i], testPoints[maxIndex] );
1421 Teuchos::SerialDenseVector<int,double> newSwapVector2 = Teuchos::getCol<int,double>( Teuchos::Copy, testMatrix, maxIndex );
1422 Teuchos::SerialDenseVector<int,double> newSwapVector = Teuchos::getCol<int,double>( Teuchos::View, testMatrix, i );
1423 Teuchos::setCol<int,double>( newSwapVector, maxIndex, testMatrix );
1424 Teuchos::setCol<int,double>( newSwapVector2, i, testMatrix );
1430 Teuchos::SerialDenseMatrix<int,double> currTestMatrix( Teuchos::View, testMatrix, size_, oversampleRate*size_-(i+1), 0, i+1 );
1431 Teuchos::SerialDenseVector<int,double> currWeightVector( Teuchos::View, &weightVector[i+1], oversampleRate*size_-(i+1) );
1433 currWeightVector.multiply( Teuchos::TRANS, Teuchos::NO_TRANS, 1.0, currTestMatrix, newSwapVector, 0.0 );
1440 for (
int j=i+1; j<oversampleRate*
size_; ++j)
1442 Teuchos::SerialDenseMatrix<int,double> currVector( Teuchos::View, testMatrix, size_, 1, 0, j );
1443 blas.AXPY( size_, -(currWeightVector[j-(i+1)]/(maxValue*maxValue) ), newSwapVector.values(), 1, currVector.values(), 1 );
1452 std::sort( testPoints.begin(), testPoints.begin()+
size_ );
1454 for (
int i=0; i<
size_; ++i)
1477 int posFreq = (
size_-1)/2;
1482 for (
int i=0; i<
size_; ++i)
1488 for (
int i=0; i<
size_; i++)
1490 for (
int j=1; j<=posFreq; j++)
1500 Teuchos::SerialDenseSolver<int,double> ftSolver;
1501 ftSolver.setMatrix( Teuchos::rcp( &
dftMatrix_,
false ) );
1517 bool success =
true;
1528 bool retTol1 =
runTol(tia_params);
1529 success = success && retTol1;
1542 if (!startupPeriodsSuccess)
1544 Report::UserError() <<
"Failed to calculate the startup periods";
1548 success = success && startupPeriodsSuccess;
1558 Report::UserError() <<
"Initial HB Transient failed";
1561 success = success && icSuccess;
1583 int posFreq = (
size_-1)/2;
1586 int ntpt = tPoints.size();
1591 for (
int i=0; i<ntpt; ++i)
1597 for (
int i=0; i< ntpt; i++)
1599 for (
int j=1; j<=posFreq; j++)
1623 Xyce::lout() <<
" ***** Computing tolerance parameters for HB IC calculation....\n" << std::endl;
1635 analysisManager_.pushActiveAnalysis(&
transient);
1637 transient.setAnalysisParams(Util::OptionBlock());
1639 transient.resetForHB();
1641 analysisManager_.getStepErrorControl().
resetAll(tia_params);
1643 analysisManager_.setNextOutputTime(0.0);
1646 if (!
transient.
run())
1648 Report::UserError() <<
"Calculation of tolerance parameters failed for relErrorTol = " << tia_params.
relErrorTol;
1653 numPoints =
transient.getStepNumber();
1658 analysisManager_.popActiveAnalysis();
1659 currentAnalysisObject_ = 0;
1666 Report::UserWarning() <<
"Tolerance parameters refined, re-running with relErrorTol = " << tia_params.
relErrorTol/10;
1688 analysisManager_.pushActiveAnalysis(&
transient);
1690 transient.setTIAParams(tia_params);
1691 transient.setAnalysisParams(Util::OptionBlock());
1692 transient.resetForHB();
1694 analysisManager_.getStepErrorControl().
resetAll(tia_params);
1696 analysisManager_.setNextOutputTime(0.0);
1699 if (!
transient.
run())
1701 Report::UserError() <<
"Calculation of tolerance parameters failed for relErrorTol = " << tia_params.
relErrorTol;
1706 numPoints =
transient.getStepNumber();
1711 analysisManager_.popActiveAnalysis();
1712 currentAnalysisObject_ = 0;
1733 bool returnValue =
true;
1735 Xyce::lout() <<
" ***** Computing " <<
startUpPeriods_ <<
" start up periods for HB IC calculation...." << std::endl;
1738 Xyce::dout() <<
"HB::runStartupPeriods_(): Advancing time through "
1741 <<
" finalTime = " << tia_params.
finalTime << std::endl;
1756 x.add(Xyce::IO::PrintType::HB_STARTUP,
ANP_MODE_HB);
1762 analysisManager_.pushActiveAnalysis(&
transient);
1764 transient.setTIAParams(tia_params);
1765 transient.setAnalysisParams(Util::OptionBlock());
1766 transient.resetForHB();
1768 analysisManager_.getStepErrorControl().
resetAll(tia_params);
1770 analysisManager_.setNextOutputTime(0.0);
1773 returnValue =
transient.
run();
1781 analysisManager_.getOutputManagerAdapter().finishOutput();
1783 analysisManager_.popActiveAnalysis();
1814 bool returnValue =
true;
1816 Xyce::lout() <<
" ***** Running transient to compute HB initial condition....\n" << std::endl;
1822 Xyce::dout() <<
"HB::runTransientIC_(): Advancing time from"
1824 <<
" finalTime = " << tia_params.
finalTime << std::endl;
1842 transient.setSaveTimeSteps(
true);
1844 analysisManager_.pushActiveAnalysis(&
transient);
1846 transient.setAnalysisParams(Util::OptionBlock());
1847 transient.resetForHB();
1849 analysisManager_.getStepErrorControl().
resetAll(tia_params);
1851 analysisManager_.setNextOutputTime(0.0);
1854 returnValue =
transient.
run();
1862 analysisManager_.popActiveAnalysis();
1880 double initial_time)
1882 Xyce::lout() <<
" ***** Interpolating transient solution for IC calculation....\n" << std::endl;
1885 int numPoints = dsPtr->
timeSteps.size();
1888 Xyce::dout() <<
"HB::interpolateIC_(): Initial transient run produced " << numPoints <<
" points." << std::endl;
1890 std::vector<int> goodIndicies;
1891 for(
int i = 0; i <
size_; ++i )
1896 bool sortedTimesFlag =
true;
1899 sortedTimesFlag =
false;
1901 int breakpoints = 0;
1904 if (sortedTimesFlag)
1906 goodIndicies.push_back(startIndex);
1907 int GoodTimePointIndex = startIndex + 1;
1909 for(
int i=startIndex; i < numPoints - 1 ; i++ )
1918 if (DEBUG_HB && isActive(Diag::HB_TIMESTEP))
1920 Xyce::dout() <<
"\t\t timeStep[ " << i <<
" ] = " << dsPtr->
timeSteps[i];
1923 Xyce::dout() <<
" Breakpoint";
1925 Xyce::dout() << std::endl;
1931 goodIndicies.push_back( i );
1932 GoodTimePointIndex = GoodTimePointIndex+1;
1938 double tmpTimePoints;
1940 for(
int i=0; i<
size_; i++ )
1947 for(
int j=0; (j< (numPoints - 1) && !found ); j++)
1949 if((dsPtr->
timeSteps[j] <= tmpTimePoints ) && ( tmpTimePoints < dsPtr->
timeSteps[j+1]))
1952 goodIndicies.push_back( j );
1959 for(
int i=0; i<
size_; i++ )
1961 int currentIndex = goodIndicies[i];
1966 Linear::Vector * secondStateVecPtr = dsPtr->
fastTimeStateVec[currentIndex+1];
1968 Linear::Vector * firstQVecPtr = dsPtr->
fastTimeQVec[currentIndex];
1969 Linear::Vector * secondQVecPtr = dsPtr->
fastTimeQVec[currentIndex+1];
1972 Linear::Vector * secondStoreVecPtr = dsPtr->
fastTimeStoreVec[currentIndex+1];
1976 RCP<Linear::Vector> InterpICSolVecPtr = rcp(
new Linear::Vector( *secondSolVecPtr ) );
1977 RCP<Linear::Vector> InterpICStateVecPtr = rcp(
new Linear::Vector( *secondStateVecPtr ) );
1978 RCP<Linear::Vector> InterpICQVecPtr = rcp(
new Linear::Vector( *secondQVecPtr ) );
1979 RCP<Linear::Vector> InterpICStoreVecPtr = rcp(
new Linear::Vector( *secondStoreVecPtr ) );
1981 InterpICSolVecPtr->putScalar(0.0);
1982 InterpICStateVecPtr->putScalar(0.0);
1983 InterpICQVecPtr->putScalar(0.0);
1984 InterpICStoreVecPtr->putScalar(0.0);
1986 InterpICSolVecPtr->linearCombo(-1.0, *firstSolVecPtr, 1.0, *secondSolVecPtr );
1987 InterpICSolVecPtr->linearCombo(1.0, *firstSolVecPtr, fraction , *InterpICSolVecPtr);
1989 InterpICStateVecPtr->linearCombo(-1.0, *firstStateVecPtr, 1.0, *secondStateVecPtr );
1990 InterpICStateVecPtr->linearCombo(1.0, *firstStateVecPtr, fraction , *InterpICStateVecPtr);
1992 InterpICQVecPtr->linearCombo(-1.0, *firstQVecPtr, 1.0, *secondQVecPtr );
1993 InterpICQVecPtr->linearCombo(1.0, *firstQVecPtr, fraction , *InterpICQVecPtr);
1995 InterpICStoreVecPtr->linearCombo(-1.0, *firstStoreVecPtr, 1.0, *secondStoreVecPtr );
1996 InterpICStoreVecPtr->linearCombo(1.0, *firstStoreVecPtr, fraction , *InterpICStoreVecPtr);
2013 typedef Util::Factory<AnalysisBase, HB> HBFactoryBase;
2027 class HBFactory :
public HBFactoryBase
2057 Linear::System & linear_system,
2061 Linear::Builder & builder,
2062 Topo::Topology & topology,
2063 IO::InitialConditionsManager & initial_conditions_manager,
2064 IO::RestartMgr & restart_manager)
2077 virtual ~HBFactory()
2121 bool setHBAnalysisOptionBlock(
const Util::OptionBlock &option_block)
2143 bool setHBIntOptionBlock(
const Util::OptionBlock &option_block)
2165 bool setHBLinSolOptionBlock(
const Util::OptionBlock &option_block)
2187 bool setLinSolOptionBlock(
const Util::OptionBlock &option_block)
2214 struct HBAnalysisReg :
public IO::PkgOptionsReg
2217 HBFactory & factory )
2221 bool operator()(
const Util::OptionBlock &option_block)
2223 factory_.setHBAnalysisOptionBlock(option_block);
2224 factory_.deviceManager_.setBlockAnalysisFlag(
true);
2245 IO::PkgOptionsMgr & options_manager,
2246 IO::CircuitBlock & circuit_block,
2247 const std::string & netlist_filename,
2248 const IO::TokenVector & parsed_line)
2250 Util::OptionBlock option_block(
"HB", Util::OptionBlock::NO_EXPRESSIONS, netlist_filename, parsed_line[0].lineNumber_);
2252 int numFields = parsed_line.size();
2255 if ( numFields < 2 )
2257 Report::UserError0().at(netlist_filename, parsed_line[0].lineNumber_)
2258 <<
".HB line has an unexpected number of fields";
2261 int linePosition = 1;
2262 int endPosition = numFields;
2264 Util::Param parameter(
"",
"");
2267 std::vector<double> freqs(numFields - 1);
2270 while( linePosition < endPosition )
2272 const std::string &
value = parsed_line[linePosition].string_;
2273 if (Util::isValue(value))
2275 freqs[i] = Util::Value(value);
2279 Report::UserError0().at(netlist_filename, parsed_line[0].lineNumber_)
2280 <<
"Attempt to assign value for FREQ from " <<
value;
2286 parameter.setTag(
"FREQ" );
2287 parameter.setVal( freqs );
2288 option_block.addParam( parameter );
2291 circuit_block.addOptions(option_block);
2298 IO::PkgOptionsMgr & options_manager)
2301 Util::ParamMap ¶meters = options_manager.addOptionsMetadataMap(
"LINSOL-HB");
2303 parameters.insert(Util::ParamMap::value_type(
"AZ_max_iter", Util::Param(
"AZ_max_iter", 500)));
2304 parameters.insert(Util::ParamMap::value_type(
"AZ_solver", Util::Param(
"AZ_solver", 1)));
2305 parameters.insert(Util::ParamMap::value_type(
"AZ_conv", Util::Param(
"AZ_conv", 0)));
2306 parameters.insert(Util::ParamMap::value_type(
"AZ_pre_calc", Util::Param(
"AZ_pre_calc", 1)));
2307 parameters.insert(Util::ParamMap::value_type(
"AZ_keep_info", Util::Param(
"AZ_keep_info", 1)));
2308 parameters.insert(Util::ParamMap::value_type(
"AZ_orthog", Util::Param(
"AZ_orthog", 1)));
2309 parameters.insert(Util::ParamMap::value_type(
"AZ_reorder", Util::Param(
"AZ_reorder", 0)));
2310 parameters.insert(Util::ParamMap::value_type(
"AZ_scaling", Util::Param(
"AZ_scaling", 0)));
2311 parameters.insert(Util::ParamMap::value_type(
"AZ_kspace", Util::Param(
"AZ_kspace", 500)));
2312 parameters.insert(Util::ParamMap::value_type(
"AZ_tol", Util::Param(
"AZ_tol", 1.0E-12)));
2313 parameters.insert(Util::ParamMap::value_type(
"AZ_output", Util::Param(
"AZ_output", 0)));
2314 parameters.insert(Util::ParamMap::value_type(
"AZ_diagnostics", Util::Param(
"AZ_diagnostics", 0)));
2315 parameters.insert(Util::ParamMap::value_type(
"TYPE", Util::Param(
"TYPE",
"DEFAULT")));
2316 parameters.insert(Util::ParamMap::value_type(
"PREC_TYPE", Util::Param(
"PREC_TYPE",
"NONE")));
2317 parameters.insert(Util::ParamMap::value_type(
"BLOCK_JACOBI_CORRECTED", Util::Param(
"BLOCK_JACOBI_CORRECTED",
false)));
2321 Util::ParamMap ¶meters = options_manager.addOptionsMetadataMap(
"HBINT");
2323 parameters.insert(Util::ParamMap::value_type(
"TEST", Util::Param(
"TEST",
false)));
2324 parameters.insert(Util::ParamMap::value_type(
"NUMFREQ", Util::Param(
"NUMFREQ",
"VECTOR")));
2325 parameters.insert(Util::ParamMap::value_type(
"STARTUPPERIODS", Util::Param(
"STARTUPPERIODS", 0)));
2326 parameters.insert(Util::ParamMap::value_type(
"SAVEICDATA", Util::Param(
"SAVEICDATA",
false)));
2327 parameters.insert(Util::ParamMap::value_type(
"DEBUGLEVEL", Util::Param(
"DEBUGLEVEL", 0)));
2328 parameters.insert(Util::ParamMap::value_type(
"TAHB", Util::Param(
"TAHB", 1)));
2329 parameters.insert(Util::ParamMap::value_type(
"VOLTLIM", Util::Param(
"VOLTLIM", 1)));
2330 parameters.insert(Util::ParamMap::value_type(
"INTMODMAX", Util::Param(
"INTMODMAX",0)));
2331 parameters.insert(Util::ParamMap::value_type(
"METHOD", Util::Param(
"METHOD",
"APFT")));
2332 parameters.insert(Util::ParamMap::value_type(
"NUMTPTS", Util::Param(
"NUMTPTS", 1)));
2353 factory_block.
optionsManager_.addCommandProcessor(
"HB",
new HBAnalysisReg(*factory));
2355 factory_block.
optionsManager_.addOptionsProcessor(
"HBINT", IO::createRegistrationOptions(*factory, &HBFactory::setHBIntOptionBlock));
2356 factory_block.
optionsManager_.addOptionsProcessor(
"LINSOL-HB", IO::createRegistrationOptions(*factory, &HBFactory::setHBLinSolOptionBlock));
2357 factory_block.
optionsManager_.addOptionsProcessor(
"LINSOL", IO::createRegistrationOptions(*factory, &HBFactory::setLinSolOptionBlock));
IO::OutputMgr & getOutputManager()
void accumulateStatistics_(AnalysisBase &analysis)
std::vector< Linear::Vector * > fastTimeQVec
IO::PkgOptionsMgr & optionsManager_
Util::OptionBlock saved_lsHBOB_
Linear::HBPrecondFactory * precFactory_
std::vector< double > timeSteps
Util::OptionBlock linSolOptionBlock_
AnalysisBase * currentAnalysisObject_
Teuchos::RCP< Linear::BlockVector > HBICQVectorPtr_
HB initial Q condition.
IO::RestartMgr & restartManager_
Teuchos::RCP< N_MPDE_Discretization > mpdeDiscPtr_
Linear::Builder & builder_
Teuchos::SerialDenseMatrix< int, double > dftMatrix_
std::vector< double > freqs_
Problem Size.
std::vector< bool > timeStepsBreakpointFlag
Teuchos::RCP< Linear::Vector > dcOpStateVecPtr_
std::vector< int > numFreqs_
void setNextOutputTime(double next_output_time)
bool printLoopInfo(int start, int finish)
bool startUpPeriodsGiven_
IO::InitialConditionsManager & initialConditionsManager_
Pure virtual class to augment a linear system.
void registerDFTInterface(const Teuchos::RCP< N_UTL_DFTInterfaceDecl< std::vector< double > > > &dftInterface)
std::vector< double > freqPoints_
void setFastTimes(const std::vector< double > ×)
void setTIAParams(const TimeIntg::TIAParams &tia_params)
bool resetForStepAnalysis()
void pushActiveAnalysis(AnalysisBase *analysis)
bool isTransient_
Current analysis state flags.
bool setAnalysisParams(const Util::OptionBlock &option_block)
Linear::System & linearSystem_
Linear::Vector * currStorePtr
std::vector< double > iftOutData_
Teuchos::RCP< Linear::Vector > dcOpSolVecPtr_
void permutedIFT(const Linear::BlockVector &xf, Linear::BlockVector *xt, int numTimePts_=0)
bool isAnalysis(int analysis_type) const
Topo::Topology & topology_
Topo::Topology & topology_
double finalTime
End time for simulation.
std::vector< double > timeSteps_
AnalysisManager & analysisManager_
Util::OptionBlock hbIntOptionBlock_
virtual int getDoubleDCOPStep() const
std::vector< double > ftInData_
std::vector< Linear::Vector * > fastTimeStateVec
Teuchos::SerialDenseMatrix< int, double > idftMatrix_
N_PDS_Manager * pdsMgrPtr_
Util::ListenerAutoSubscribe< StepEvent > StepEventListener
std::vector< double > ftOutData_
Util::Timer & getXyceTranTimer()
void setAnalysisMode(AnalysisMode mode)
const T & value(const ParameterBase &entity, const Descriptor &descriptor)
Returns the value of the parameter for the entity.
Linear::Vector * currStatePtr
Teuchos::RCP< Linear::HBBuilder > hbBuilderPtr_
HB loader, builder, system, and DFT.
Parallel::Manager * getPDSManager() const
bool updateIFT_(std::vector< double > &tPoints)
TimeIntg::StepErrorControl & getStepErrorControl()
Device::DeviceMgr & deviceManager_
std::vector< Linear::Vector * > fastTimeSolutionVec
std::vector< Teuchos::RCP< Linear::Vector > > goodStateVec_
void permutedFFT(const Linear::BlockVector &xt, Linear::BlockVector *xf)
Linear::System * hbLinearSystem_
bool interpolateIC(double initial_time)
bool runStartupPeriods(const TimeIntg::TIAParams &tia_params)
bool setLinSol(const Util::OptionBlock &option_block)
void setMatrixFreeFlag(bool matrixFreeFlag)
void prepareHBOutput(Linear::Vector &solnVecPtr, std::vector< double > &timePoints, std::vector< double > &freqPoints, Teuchos::RCP< Linear::BlockVector > &timeDomainSolnVec, Teuchos::RCP< Linear::BlockVector > &freqDomainSolnVecReal, Teuchos::RCP< Linear::BlockVector > &freqDomainSolnVecImaginary, Teuchos::RCP< Linear::BlockVector > &timeDomainStoreVec, Teuchos::RCP< Linear::BlockVector > &freqDomainStoreVecReal, Teuchos::RCP< Linear::BlockVector > &freqDomainStoreVecImaginary, Teuchos::RCP< Linear::BlockVector > &timeDomainLeadCurrentVec, Teuchos::RCP< Linear::BlockVector > &freqDomainLeadCurrentVecReal, Teuchos::RCP< Linear::BlockVector > &freqDomainLeadCurrentVecImaginary, Teuchos::RCP< Linear::BlockVector > &timeDomainJunctionVoltageVec, Teuchos::RCP< Linear::BlockVector > &freqDomainJunctionVoltageVecReal, Teuchos::RCP< Linear::BlockVector > &freqDomainJunctionVoltageVecImaginary)
std::vector< Teuchos::RCP< Linear::Vector > > goodStoreVec_
Linear::Vector * daeQVectorPtr
Teuchos::RCP< Linear::Vector > dcOpStoreVecPtr_
Device::DeviceMgr & deviceManager_
Teuchos::RCP< Linear::BlockVector > HBICVectorPtr_
bool setLinSolOptions(const Util::OptionBlock &option_block)
void resetAll(AnalysisMode mode)
Linear::Vector * deviceErrorWeightMask_
void setSaveTimeSteps(bool save_time_steps)
IO::InitialConditionsManager & initialConditionsManager_
Teuchos::RCP< Linear::BlockVector > & getLeadCurrentVecFreqPtr()
virtual bool isPDESystem() const
bool initializeSolverSystem(const TimeIntg::TIAParams &tia_params, Loader::Loader &loader, Linear::System &linear_system, Nonlinear::Manager &nonlinear_manager, Device::DeviceMgr &device_manager)
Initializes the solver system.
bool doProcessFailedStep()
int getDoubleDCOPStep() const
virtual bool getDCOPFlag() const =0
bool resetForStepCalledBefore_
Teuchos::RCP< Linear::BlockVector > HBICStoreVectorPtr_
HB initial store condition.
std::vector< int > numPosFreqs
void setMPDEFlag(bool flagVal)
The FactoryBlock contains parameters needed by the analysis creation functions.
Linear::System & linearSystem_
IO::InitialConditionsManager & initialConditionsManager_
Nonlinear::AnalysisMode nonlinearAnalysisMode(Mode mode)
Returns the nonlinear analysis mode given the analysis mode.
void setHBFreqs(const std::vector< double > &freqs)
Teuchos::RCP< N_UTL_DFTInterfaceDecl< std::vector< double > > > dftInterface_
int startUpPeriods_
Periodicity Information.
void registerHBBuilder(Teuchos::RCP< Linear::HBBuilder > hbBuilderPtr)
bool runTol(TimeIntg::TIAParams &tia_params)
N_MPDE_Discretization::Type fastTimeDisc_
Teuchos::RCP< Linear::Vector > dcOpQVecPtr_
Teuchos::RCP< Linear::BlockVector > HBICVectorFreqPtr_
OutputMgrAdapter & getOutputManagerAdapter() const
Linear::Vector * nextStatePtr
std::vector< Linear::Vector * > fastTimeStoreVec
AnalysisManager & analysisManager_
bool initializeAll(Linear::System &linear_system)
Loader::NonlinearEquationLoader & getNonlinearEquationLoader()
Util::OptionBlock saved_lsOB_
bool initializeAll(Analysis::AnalysisManager &analysis_manager, Loader::NonlinearEquationLoader &nonlinear_equation_loader, Linear::System &linear_system, TimeIntg::DataStore &data_store, Parallel::Manager ¶llel_manager, IO::InitialConditionsManager &initial_conditions_manager, IO::OutputMgr &output_manager, Topo::Topology &topology)
double pauseTime
Time step value at which to "pause" the simulation.
void setDoubleDCOPEnabled(bool enable)
Device::DeviceMgr & deviceManager_
Teuchos::RCP< Linear::BlockVector > & getStoreVecFreqPtr()
std::vector< double > iftInData_
Nonlinear::Manager & nonlinearManager_
Nonlinear::Manager & nonlinearManager_
Loader::HBLoader * hbLoaderPtr_
IO::RestartMgr & restartManager_
Linear::Vector * nextSolutionPtr
void deRegisterFastSources(const std::vector< std::string > &sourceNames)
Linear::Builder & builder_
Topo::Topology & topology_
Linear::Vector * nextStorePtr
void addAnalysisFactory(FactoryBlock &factory_block, Util::Factory< AnalysisBase, void > *factory)
double initialTime
Beginning time for the time integrator (StepErrorControl, integrators access from StepErrorControl) ...
HB(AnalysisManager &analysis_manager, Linear::System &linear_system, Nonlinear::Manager &nonlinear_manager, Loader::Loader &loader, Device::DeviceMgr &device_manager, Linear::Builder &builder, Topo::Topology &topology, IO::InitialConditionsManager &initial_conditions_manager, IO::RestartMgr &restart_manager)
Teuchos::RCP< Linear::BlockVector > HBICStateVectorPtr_
HB initial state condition.
std::vector< double > goodTimePoints_
bool processSuccessfulDCOP()
void setVoltageLimiterFlag(bool flagVal)
Linear::System & linearSystem_
std::vector< Teuchos::RCP< Linear::Vector > > goodQVec_
IO::RestartMgr & restartManager_
bool doProcessSuccessfulStep()
bool setHBIntParams(const Util::OptionBlock &option_block)
bool runTransientIC(const TimeIntg::TIAParams &tia_params)
Teuchos::RCP< N_UTL_FFTInterface< std::vector< double > > > ftInterface_
Linear::Vector * currSolutionPtr
TimeIntg::DataStore * getDataStore()
std::vector< Teuchos::RCP< Linear::Vector > > goodSolutionVec_
bool setHBLinSol(const Util::OptionBlock &option_block, Linear::Builder &builder)
AnalysisManager & analysisManager_
Nonlinear::Manager & nonlinearManager_
std::vector< double > registerFastSources(Parallel::Machine comm, const std::vector< std::string > &sourceNames)
void setMatrixFreeFlag(bool matrixFreeFlag)
Util::OptionBlock timeIntegratorOptionBlock_
bool finalVerboseOutput()
Linear::Builder & builder_
bool registerPrecondFactory(const Linear::PrecondFactory *preconditioner_factory)
Util::OptionBlock hbLinSolOptionBlock_
void registerAppLoader(Teuchos::RCP< Loader > appLoaderPtr)
Util::OptionBlock hbAnalysisOptionBlock_
std::vector< double > fastTimes_
void notify(const StepEvent &event)
bool registerHBFactory(FactoryBlock &factory_block)
bool loadDeviceErrorWeightMask(Linear::Vector *deviceMask) const