47 #include <Xyce_config.h>
54 #include <N_ERH_ErrorMgr.h>
55 #include <N_LAS_BlockVector.h>
56 #include <N_LAS_Matrix.h>
57 #include <N_LAS_System.h>
58 #include <N_LAS_Vector.h>
59 #include <N_PDS_Comm.h>
60 #include <N_PDS_Manager.h>
66 #include <N_UTL_Diagnostic.h>
67 #include <N_UTL_FeatureTest.h>
68 #include <N_UTL_MachDepParams.h>
86 TimeIntegrationMethod *
92 return new Gear12(tia_params, step_error_control, data_store);
148 if (DEBUG_TIME && isActive(Diag::TIME_PREDICTOR))
150 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
151 Xyce::dout() << std::endl
152 << Xyce::section_divider << std::endl
153 <<
" Gear12::obtainPredictor" << std::endl
155 <<
"\n sec.nscsco_: " <<
sec.
nscsco_ << std::endl;
157 Xyce::dout() <<
"\n sec.beta_[" << i <<
"] = " <<
sec.
beta_[i] <<
"\n" << std::endl;
160 Xyce::dout() <<
"\n xHistory["<< i <<
"]: \n" << std::endl;
161 (
ds.
xHistory[i])->printPetraObject(Xyce::dout());
162 Xyce::dout() << std::endl;
166 Xyce::dout() <<
"\n qHistory["<< i <<
"]: \n" << std::endl;
167 (
ds.
qHistory[i])->printPetraObject(Xyce::dout());
168 Xyce::dout() << std::endl;
172 Xyce::dout() <<
"\n sHistory["<< i <<
"]: \n" << std::endl;
173 (
ds.
sHistory[i])->printPetraObject(Xyce::dout());
174 Xyce::dout() << std::endl;
176 Xyce::dout() <<
"\n xn0: \n" << std::endl;
177 ds.
xn0Ptr->printPetraObject(Xyce::dout());
178 Xyce::dout() << std::endl;
179 Xyce::dout() <<
"\n qn0: \n" << std::endl;
180 ds.
qn0Ptr->printPetraObject(Xyce::dout());
181 Xyce::dout() << std::endl;
182 Xyce::dout() <<
"\n qpn0: \n" << std::endl;
183 ds.
qpn0Ptr->printPetraObject(Xyce::dout());
184 Xyce::dout() << std::endl;
185 Xyce::dout() <<
"\n sn0: \n" << std::endl;
186 ds.
sn0Ptr->printPetraObject(Xyce::dout());
187 Xyce::dout() << std::endl;
188 Xyce::dout() <<
"\n spn0: \n" << std::endl;
189 ds.
spn0Ptr->printPetraObject(Xyce::dout());
190 Xyce::dout() << std::endl;
191 Xyce::dout() << Xyce::section_divider << std::endl;
219 return pow(stepadjust, 1.0 / 3.0);
236 if (DEBUG_TIME && isActive(Diag::TIME_RESIDUAL))
238 Xyce::dout() << std::endl
239 << Xyce::section_divider << std::endl
240 <<
" Gear12::obtainResidual" << std::endl
242 <<
"\n solution: \n" << std::endl;
244 Xyce::dout() <<
"\n daeQVector: \n" << std::endl;
246 Xyce::dout() <<
"\n qn0: \n" << std::endl;
247 ds.
qn0Ptr->printPetraObject(Xyce::dout());
248 Xyce::dout() <<
"\n qpn0: \n" << std::endl;
249 ds.
qpn0Ptr->printPetraObject(Xyce::dout());
251 <<
"\n daeFVector: \n" << std::endl;
254 Xyce::dout() <<
"\n dQdt-vector: \n" << std::endl;
256 Xyce::dout() << std::endl;
283 if (DEBUG_TIME && isActive(Diag::TIME_RESIDUAL))
285 Xyce::dout() <<
"\n Residual-vector: \n" << std::endl
286 <<
"-(qpn0-(sec.alpha_s/h)*(Q-qn0)+F-B) \n" << std::endl;
288 Xyce::dout() << Xyce::section_divider << std::endl
304 for (
int ip=0; ip<numParams;++ip)
314 std::vector<Linear::Vector*> & dqdpHistoryVec =
ds.
dqdpHistory[ip];
323 RHSVec.linearCombo(1.0, RHSVec,
sec.
alpha_[2],*(dqdpHistoryVec[1]));
327 RHSVec.linearCombo(1.0,RHSVec,-1.0,dbdpVec);
335 RHSVec.linearCombo(1.0,RHSVec, -qscalar1, currDQdxDXdpVec);
340 RHSVec.linearCombo(1.0,RHSVec, -qscalar2, lastDQdxDXdpVec);
344 Xyce::dout() <<
"obtainSensitivityResiduals: RHS Vector, ip = " << ip <<
":\n";
345 RHSVec.printPetraObject(Xyce::dout());
361 if (DEBUG_TIME && isActive(Diag::TIME_JACOBIAN))
363 Xyce::dout() << std::endl
364 << Xyce::section_divider << std::endl
365 <<
" Gear12::obtainJacobian" << std::endl;
382 Jac.linearCombo( qscalar, dQdx, fscalar, dFdx );
384 if (DEBUG_TIME && isActive(Diag::TIME_JACOBIAN))
386 Xyce::dout() <<
"\n dFdx:" <<std::endl;
387 dFdx.printPetraObject(Xyce::dout());
388 Xyce::dout() <<
"\n Total Jacobian:" <<std::endl;
389 Jac.printPetraObject(Xyce::dout());
395 Xyce::dout() << Xyce::section_divider << std::endl << std::endl;
407 Linear::Vector * tmpSolVectorPtr, std::vector<Linear::Vector*> & historyVec)
414 if( -dtr < 100 * Util::MachineDependentParams::MachinePrecision() )
416 *tmpSolVectorPtr = *(historyVec[0]);
420 tmpSolVectorPtr->linearCombo(1.0, *(historyVec[0]), -1.0, *(historyVec[1]));
427 tmpSolVectorPtr->linearCombo(1.0, *(historyVec[0]), dtr, *tmpSolVectorPtr);
450 Linear::Vector * tmpSolVectorPtr)
452 Linear::BlockVector * blockTempSolVectorPtr =
453 dynamic_cast<Linear::BlockVector*
>(tmpSolVectorPtr);
454 if (blockTempSolVectorPtr == NULL)
456 std::string msg =
"Gear12::interpolateMPDESolution: ";
457 msg +=
"Linear::Vector tmpSolVectorPtr is not of type Linear::BlockVector";
458 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
464 int numblocks = timepoint.size();
465 int blockCount = blockTempSolVectorPtr->blockCount();
466 if (numblocks > blockCount)
468 std::string msg =
"Gear12::interpolateMPDESolution: ";
469 msg +=
"Number of time points requested is greater than number of fast time points in MPDE block vector";
470 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
483 tfuzz = 100 * uround * (tn + hh);
484 tp = tn - hused - tfuzz;
485 for (
int i=0; i<numblocks ; ++i)
487 if ( (timepoint[i] - tp)*hh < 0.0 )
493 Linear::Vector * solVectorPtr;
494 Linear::Vector * xHistoryVectorPtr;
496 for (
int i=0; i < numblocks ; ++i)
498 if ((kused == 0) || (timepoint[i] == tn)) { kord = 1; }
499 else { kord = kused; }
500 solVectorPtr = &(blockTempSolVectorPtr->block(i));
502 delt = timepoint[i] - tn;
504 for (
int j=1 ; j <= kord ; ++j)
508 Linear::BlockVector * blockXHistoryVectorPtr =
509 dynamic_cast<Linear::BlockVector*>(
ds.
xHistory[j]);
510 if (blockXHistoryVectorPtr == NULL)
512 Xyce::Report::DevelFatal0().in(
"Gear12::interpolateMPDESolution") <<
"Linear::Vector ds.xHistory[j] is not of type Linear::BlockVector\n j = " << j;
515 xHistoryVectorPtr = &(blockXHistoryVectorPtr->block(i));
516 solVectorPtr->linearCombo(1.0,*solVectorPtr,c,*xHistoryVectorPtr);
533 Linear::Vector * solnVecPtr,
534 const std::vector<double> & fastTimes )
551 Linear::Vector * solnVecPtr,
552 const std::vector<double> & fastTimes,
572 Linear::Vector * solnVecPtr,
573 const bool doNotInterpolate,
574 const std::vector<double> & outputInterpolationTimes,
575 bool skipPrintLineOutput)
577 if (DEBUG_TIME && isActive(Diag::TIME_OUTPUT))
579 Xyce::dout() << std::endl
580 << Xyce::section_divider << std::endl
581 <<
" Gear12::printOutputSolution" << std::endl
587 bool dointerp =
true;
600 if (doNotInterpolate)
605 if (dointerp && !outputInterpolationTimes.empty())
607 for (
unsigned int i=0;i<outputInterpolationTimes.size();++i)
618 skipPrintLineOutput);
626 if (outputInterpolationTimes.empty() || doNotInterpolate)
632 skipPrintLineOutput);
635 if (DEBUG_TIME && isActive(Diag::TIME_OUTPUT))
636 Xyce::dout() << Xyce::section_divider << std::endl;
654 Linear::Vector * solnVecPtr,
655 const double saveTime,
656 const bool doNotInterpolate)
658 if (DEBUG_TIME && isActive(Diag::TIME_OUTPUT))
660 Xyce::dout() << std::endl
661 << Xyce::section_divider << std::endl
662 <<
" Gear12::saveOutputSolution" << std::endl;
667 bool dointerp =
true;
672 if (DEBUG_TIME && isActive(Diag::TIME_OUTPUT))
673 Xyce::dout() << Xyce::section_divider << std::endl;
688 if (DEBUG_TIME && isActive(Diag::TIME_OUTPUT))
690 Xyce::dout() << std::endl
691 << Xyce::section_divider << std::endl
692 <<
" Gear12::updateHistory" << std::endl
693 <<
"\n Before updates \n" << std::endl;
696 Xyce::dout() <<
"\n xHistory["<< i <<
"]: \n" << std::endl;
697 (
ds.
xHistory[i])->printPetraObject(Xyce::dout());
698 Xyce::dout() << std::endl;
702 Xyce::dout() <<
"\n qHistory["<< i <<
"]: \n" << std::endl;
703 (
ds.
qHistory[i])->printPetraObject(Xyce::dout());
704 Xyce::dout() << std::endl;
708 Xyce::dout() <<
"\n sHistory["<< i <<
"]: \n" << std::endl;
709 (
ds.
sHistory[i])->printPetraObject(Xyce::dout());
710 Xyce::dout() << std::endl;
712 Xyce::dout() << Xyce::section_divider << std::endl;
740 if (DEBUG_TIME && isActive(Diag::TIME_HISTORY))
742 Xyce::dout() <<
"\n After updates \n" << std::endl;
743 Xyce::dout() <<
"\n newtonCorrectionPtr: " << std::endl;
745 Xyce::dout() <<
"\n qnewtonCorrectionPtr: " << std::endl;
749 Xyce::dout() <<
"\n xHistory["<< i <<
"]: \n" << std::endl;
750 (
ds.
xHistory[i])->printPetraObject(Xyce::dout());
751 Xyce::dout() << std::endl;
755 Xyce::dout() <<
"\n qHistory["<< i <<
"]: \n" << std::endl;
756 (
ds.
qHistory[i])->printPetraObject(Xyce::dout());
757 Xyce::dout() << std::endl;
759 Xyce::dout() <<
"\n sNewtonCorrectionPtr: " << std::endl;
761 Xyce::dout() << std::endl;
762 Xyce::dout() <<
"\n nextStatePtr: " << std::endl;
764 Xyce::dout() << std::endl;
767 Xyce::dout() <<
"\n sHistory["<< i <<
"]: \n" << std::endl;
768 (
ds.
sHistory[i])->printPetraObject(Xyce::dout());
769 Xyce::dout() << std::endl;
771 Xyce::dout() << Xyce::section_divider << std::endl;
788 for (
int ip=0; ip<numParams;++ip)
790 std::vector<Linear::Vector*> & dqdpHistory =
ds.
dqdpHistory[ip];
791 std::vector<Linear::Vector*> & dXdpHistory =
ds.
dXdpHistory[ip];
800 *(dQdxdXdpHistory[2]) = *(dQdxdXdpHistory[1]);
801 *(dXdpHistory[2]) = *(dXdpHistory[1]);
802 *(dqdpHistory[1]) = *(dqdpHistory[0]);
805 *(dQdxdXdpHistory[1]) = *(dQdxdXdpHistory[0]);
806 *(dXdpHistory[1]) = *(dXdpHistory[0]);
808 *(dQdxdXdpHistory[0]) = nextDQdxDXdpVec;
809 *(dXdpHistory[0]) = nextDXdpVec;
810 *(dqdpHistory[0]) = nextDqdpVec;
828 if (DEBUG_TIME && isActive(Diag::TIME_HISTORY))
830 Xyce::dout() << std::endl
831 << Xyce::section_divider << std::endl
832 <<
" Gear12::restoreHistory" << std::endl;
834 Xyce::dout() <<
"\n sec.psi_[i] = " <<
sec.
psi_[i] << std::endl;
837 Xyce::dout() <<
"\n xHistory["<< i <<
"]: \n" << std::endl;
838 (
ds.
xHistory[i])->printPetraObject(Xyce::dout());
839 Xyce::dout() << std::endl;
843 Xyce::dout() <<
"\n qHistory["<< i <<
"]: \n" << std::endl;
844 (
ds.
qHistory[i])->printPetraObject(Xyce::dout());
845 Xyce::dout() << std::endl;
849 Xyce::dout() <<
"\n sHistory["<< i <<
"]: \n" << std::endl;
850 (
ds.
sHistory[i])->printPetraObject(Xyce::dout());
851 Xyce::dout() << std::endl;
853 Xyce::dout() << Xyce::section_divider << std::endl;
869 if (DEBUG_TIME && isActive(Diag::TIME_COEFFICIENTS))
871 Xyce::dout() << std::endl
872 << Xyce::section_divider << std::endl
873 <<
" Gear12::updateCoeffs" << std::endl
878 <<
" psi_[0] = " <<
sec.
psi_[0] << std::endl;
922 if (DEBUG_TIME && isActive(Diag::TIME_COEFFICIENTS))
924 Xyce::dout() <<
" nscsco_ = " <<
sec.
nscsco_ << std::endl
925 <<
" beta_[0] = " <<
sec.
beta_[0] << std::endl
926 <<
" beta_[1] = " <<
sec.
beta_[1] << std::endl
927 <<
" beta_[2] = " <<
sec.
beta_[2] << std::endl
928 <<
" beta_[3] = " <<
sec.
beta_[3] << std::endl
929 <<
" beta_[4] = " <<
sec.
beta_[4] << std::endl
930 <<
" alpha_[0] = " <<
sec.
alpha_[0] << std::endl
931 <<
" alpha_[1] = " <<
sec.
alpha_[1] << std::endl
932 <<
" alpha_[2] = " <<
sec.
alpha_[2] << std::endl
933 <<
" alpha_[3] = " <<
sec.
alpha_[3] << std::endl
934 <<
" alpha_[4] = " <<
sec.
alpha_[4] << std::endl
937 <<
" gamma_[0] = " <<
sec.
gamma_[0] << std::endl
938 <<
" gamma_[1] = " <<
sec.
gamma_[1] << std::endl
939 <<
" gamma_[2] = " <<
sec.
gamma_[2] << std::endl
940 <<
" gamma_[3] = " <<
sec.
gamma_[3] << std::endl
941 <<
" gamma_[4] = " <<
sec.
gamma_[4] << std::endl
942 <<
" psi_[0] = " <<
sec.
psi_[0] << std::endl
943 <<
" psi_[1] = " <<
sec.
psi_[1] << std::endl
944 <<
" psi_[2] = " <<
sec.
psi_[2] << std::endl
945 <<
" psi_[3] = " <<
sec.
psi_[3] << std::endl
946 <<
" psi_[4] = " <<
sec.
psi_[4] << std::endl
947 <<
" sigma_[0] = " <<
sec.
sigma_[0] << std::endl
948 <<
" sigma_[1] = " <<
sec.
sigma_[1] << std::endl
949 <<
" sigma_[2] = " <<
sec.
sigma_[2] << std::endl
950 <<
" sigma_[3] = " <<
sec.
sigma_[3] << std::endl
951 <<
" sigma_[4] = " <<
sec.
sigma_[4] << std::endl
952 <<
" ck_ = " <<
sec.
ck_ << std::endl
953 << Xyce::section_divider << std::endl;
980 double currentTimeStep;
986 currentTimeStep = 0.1 * time_to_stop;
994 #ifdef Xyce_INCOMPLETE_2LEVEL_NORMS
995 double dnorm_q = 0.0;
1022 currentTimeStep = currentTimeStep/rh;
1039 Xyce::dout() <<
"ERROROPTION=1: DeltaT Grow = 2" <<
"\n" << std::endl
1040 <<
"ERROROPTION=1: DeltaT Cut = 0.125" <<
"\n" << std::endl
1041 <<
"ERROROPTION=1: NL MIN = " << tia_params.
NLmin <<
"\n" << std::endl
1042 <<
"ERROROPTION=1: NL MAX = " << tia_params.
NLmax <<
"\n" << std::endl
1043 <<
"ERROROPTION=1: DELMAX = " <<
sec.
maxTimeStep <<
"\n" << std::endl;
1096 if (DEBUG_TIME && isActive(Diag::TIME_HISTORY))
1098 Xyce::dout() << std::endl
1099 << Xyce::section_divider << std::endl
1100 <<
" Gear12::initialize" << std::endl
1101 <<
"\n xHistory: \n" << std::endl;
1102 (
ds.
xHistory[0])->printPetraObject(Xyce::dout());
1103 Xyce::dout() << std::endl;
1104 (
ds.
xHistory[1])->printPetraObject(Xyce::dout());
1105 Xyce::dout() << std::endl
1106 <<
"\n qHistory: \n" << std::endl;
1107 (
ds.
qHistory[0])->printPetraObject(Xyce::dout());
1108 Xyce::dout() << std::endl;
1109 (
ds.
qHistory[1])->printPetraObject(Xyce::dout());
1110 Xyce::dout() << std::endl
1111 <<
"\n sHistory: \n" << std::endl;
1112 (
ds.
sHistory[0])->printPetraObject(Xyce::dout());
1113 Xyce::dout() << std::endl;
1114 (
ds.
sHistory[1])->printPetraObject(Xyce::dout());
1115 Xyce::dout() << std::endl
1116 <<
"\n" <<
"currentTimeStep = " << currentTimeStep <<
"\n" << std::endl
1117 <<
"\n" <<
"time_to_stop = " << time_to_stop <<
"\n" << std::endl
1118 << Xyce::section_divider << std::endl;
1135 for (
int ip=0; ip<numParams;++ip)
1137 std::vector<Linear::Vector*> & dqdpHistory =
ds.
dqdpHistory[ip];
1138 std::vector<Linear::Vector*> & dXdpHistory =
ds.
dXdpHistory[ip];
1146 *(dQdxdXdpHistory[0]) = *(currDQdxDxdpPtr);
1147 *(dQdxdXdpHistory[1]) = *(currDQdxDxdpPtr);
1150 *(dXdpHistory[0]) = *(currDxdpPtr);
1151 *(dXdpHistory[1]) = *(currDxdpPtr);
1154 *(dqdpHistory[0]) = *(currDqdpPtr);
1155 *(dqdpHistory[1]) = *(currDqdpPtr);
1171 double time_to_stop = sec.stopTime - sec.currentTime;
1175 *(ds.xHistory[0]) = *(ds.currSolutionPtr);
1176 *(ds.xHistory[1]) = *(ds.currSolutionPtr);
1179 *(ds.qHistory[0]) = *(ds.daeQVectorPtr);
1180 *(ds.qHistory[1]) = *(ds.daeQVectorPtr);
1183 *(ds.sHistory[0]) = *(ds.currStatePtr);
1184 (ds.sHistory[1])->putScalar(0.0);
1187 sec.numberOfSteps_ = 0;
1189 sec.psi_[0] = sec.currentTimeStep;
1190 sec.cj_ = 1/sec.psi_[0];
1233 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1235 Xyce::dout() << std::endl
1236 << Xyce::section_divider << std::endl
1237 <<
" Gear12::rejectStep" << std::endl;
1265 std::string msg =
"Gear12::rejectStep: ";
1266 msg +=
" Maximum number of local error test failures. ";
1267 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
1309 if (DEBUG_TIME && isActive(Diag::TIME_STEP) && isActive(Diag::TIME_COEFFICIENTS))
1315 <<
" alpha_[0] = " <<
sec.
alpha_[0] << std::endl
1316 <<
" alpha_[1] = " <<
sec.
alpha_[1] << std::endl
1317 <<
" alpha_[2] = " <<
sec.
alpha_[2] << std::endl
1318 <<
" alpha_[3] = " <<
sec.
alpha_[3] << std::endl
1319 <<
" alpha_[4] = " <<
sec.
alpha_[4] << std::endl
1320 <<
" psi_[0] = " <<
sec.
psi_[0] << std::endl
1321 <<
" psi_[1] = " <<
sec.
psi_[1] << std::endl
1322 <<
" psi_[2] = " <<
sec.
psi_[2] << std::endl
1323 <<
" psi_[3] = " <<
sec.
psi_[3] << std::endl
1324 <<
" psi_[4] = " <<
sec.
psi_[4] << std::endl
1325 <<
" sigma_[0] = " <<
sec.
sigma_[0] << std::endl
1326 <<
" sigma_[1] = " <<
sec.
sigma_[1] << std::endl
1327 <<
" sigma_[2] = " <<
sec.
sigma_[2] << std::endl
1328 <<
" sigma_[3] = " <<
sec.
sigma_[3] << std::endl
1329 <<
" sigma_[4] = " <<
sec.
sigma_[4] << std::endl
1330 <<
" rr = " << rr << std::endl
1333 <<
" Est_ = " <<
sec.
Est_ << std::endl
1337 <<
" newTimeStep_ = " << newTimeStep_ << std::endl;
1343 std::string tmp =
" Gear12:rejectStep: Warning: Local error test failed with constant step-size.\n";
1344 Xyce::dout() << tmp << std::endl;
1367 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1369 Xyce::dout() <<
" newTimeStep_ = " << newTimeStep_ << std::endl
1390 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1392 Xyce::dout() << Xyce::section_divider << std::endl;
1427 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1429 Xyce::dout() << std::endl
1430 << Xyce::section_divider << std::endl
1431 <<
" Gear12::completeStep" << std::endl;
1450 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1453 <<
" rr = " << rr << std::endl
1457 <<
" newTimeStep_ = " << newTimeStep_ << std::endl
1510 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1513 Xyce::dout() <<
" r_safety = " <<
sec.
r_safety_ << std::endl;
1514 Xyce::dout() <<
" r_fudge_ = " <<
sec.
r_fudge_ << std::endl;
1515 Xyce::dout() <<
" r_hincr_ = " <<
sec.
r_hincr_ << std::endl;
1517 Xyce::dout() <<
" Est = " <<
sec.
Est_ << std::endl;
1518 Xyce::dout() <<
" raw rr = " << rr << std::endl;
1569 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1571 Xyce::dout() <<
" nextTime = " <<
sec.
nextTime << std::endl;
1572 Xyce::dout() <<
" newTimeStep_ = " << newTimeStep_ << std::endl;
1597 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1599 Xyce::dout() << Xyce::section_divider << std::endl;
1626 if (DEBUG_TIME && isActive(Diag::TIME_DUMP_SOLUTION_ARRAYS))
1628 Xyce::dout() <<
"\n next state Ptr: \n" << std::endl;
1630 Xyce::dout() << std::endl;
1632 Xyce::dout() <<
"\n sn0: \n" << std::endl;
1633 ds.
sn0Ptr->printPetraObject(Xyce::dout());
1634 Xyce::dout() << std::endl;
1636 Xyce::dout() <<
"\n next State Deriv: \n" << std::endl;
1638 Xyce::dout() << std::endl;
1666 if (DEBUG_TIME && isActive(Diag::TIME_DUMP_SOLUTION_ARRAYS))
1668 Xyce::dout() <<
"\n next store Ptr: \n" << std::endl;
1670 Xyce::dout() << std::endl;
1698 if (DEBUG_TIME && isActive(Diag::TIME_DUMP_SOLUTION_ARRAYS))
1700 Xyce::dout() <<
"\n next leadcurrent q Ptr: \n" << std::endl;
1702 Xyce::dout() << std::endl;
1737 if (DEBUG_TIME && isActive(Diag::TIME_ERROR))
1738 Xyce::dout() << tle;
1745 Xyce::Report::UserWarning() <<
"Excessively small current time step, incorrectly returning with large value";
bool interpolateMPDESolution(std::vector< double > &timepoint, Linear::Vector *tmpSolVectorPtr)
void rejectStep(const TIAParams &tia_params)
Linear::Vector * sNewtonCorrectionPtr
Linear::Vector * nextLeadCurrentQPtr
Linear::Vector * leadCurrentQn0Ptr
Gear12(const TIAParams &tia_params, StepErrorControl &step_error_control, DataStore &data_store)
int newtonConvergenceStatus
double partialErrorNormSum()
Linear::Vector * tmpLeadDeltaVPtr
std::vector< Linear::Vector * > nextDqdpPtrVector
std::vector< double > sigma_
std::vector< std::vector< Linear::Vector * > > dQdxdXdpHistory
Linear::Vector * qErrWtVecPtr
Pure virtual class to augment a linear system.
int nIterations
Number of newton iterations.
std::vector< double > dOdpVec_
std::vector< double > scaled_dOdpVec_
void getInitialQnorm(TwoLevelError &tle) const
std::vector< Linear::Vector * > nextDXdpPtrVector
Linear::Vector * tmpStaVectorPtr
Linear::Vector * currStorePtr
std::vector< double > scaled_dOdpAdjVec_
std::vector< Linear::Vector * > leadDeltaVHistory
Linear::Vector * tmpSolVectorPtr
std::vector< Linear::Vector * > nextDbdpPtrVector
double partialSum_m2(int currentOrder)
bool interpolateSolution(double timepoint, Linear::Vector *tmpSolVectorPtr, std::vector< Linear::Vector * > &historyVec)
int errorAnalysisOption
Error analysis option.
Linear::Vector * tmpStoVectorPtr
std::vector< Linear::Vector * > nextDfdpPtrVector
void completeStep(const TIAParams &tia_params)
bool printOutputSolution(Analysis::OutputMgrAdapter &outputManagerAdapter, const TIAParams &tia_params, const double time, Linear::Vector *solnVecPtr, const bool doNotInterpolate, const std::vector< double > &outputInterpolationTimes, bool skipPrintLineOutput)
void updateLeadCurrentVec()
std::vector< Linear::Vector * > qHistory
Linear::Vector * nextLeadDeltaVPtr
Linear::Vector * currStatePtr
std::vector< double > objectiveVec_
std::vector< Linear::Vector * > currDXdpPtrVector
double lastAttemptedTimeStep
std::vector< Linear::Vector * > leadCurrentHistory
bool constantTimeStepFlag
Constant time step integration flag.
static TimeIntegrationMethod * factory(const TIAParams &tia_params, StepErrorControl &step_error_control, DataStore &data_store)
void initialize(const TIAParams &tia_params)
Linear::Vector * daeQVectorPtr
Linear::Vector * tmpLeadCurrentVectorPtr
double partialSum_p1(int currentOrder, int maxOrder)
void setTimeStep(double newTimeStep)
double currentTimeStepRatio
Linear::Vector * daeFVectorPtr
Linear::Vector * qNewtonCorrectionPtr
Linear::Vector * currLeadCurrentQPtr
double leadingCoeff
Time-integration method leading coefficient value.
Linear::Vector * nextStoreLeadCurrQDerivPtr
Linear::Matrix * dFdxMatrixPtr
Linear::Matrix * JMatrixPtr
Linear::Vector * nextStatePtr
std::vector< Linear::Vector * > leadCurrentQHistory
void tranOutput(double time, Linear::Vector &currSolutionPtr, Linear::Vector &stateVecPtr, Linear::Vector &storeVecPtr, Linear::Vector &lead_current_vector, Linear::Vector &junction_voltage_vector, std::vector< double > &objectiveVec_, std::vector< double > &dOdpVec_, std::vector< double > &dOdpAdjVec_, std::vector< double > &scaled_dOdpVec_, std::vector< double > &scaled_dOdpAdjVec_, bool skipPrintLineOutput=false)
DataStore & ds
Reference to the TIA data-store object.
Linear::Vector * dFdxdVpVectorPtr
double computeExpoStepAdjust(double stepadjust)
std::vector< std::vector< Linear::Vector * > > dqdpHistory
Linear::Vector * currLeadDeltaVPtr
std::vector< double > beta_
double delta_x_errorNorm_q1()
bool printWaMPDEOutputSolution(Analysis::OutputMgrAdapter &outputManagerAdapter, const double time, Linear::Vector *solnVecPtr, const std::vector< double > &fastTimes, const int phiGID)
Linear::Vector * currStoreLeadCurrQPtr
int numberSuccessiveFailures
Linear::Vector * nextSolutionPtr
void getTwoLevelError(TwoLevelError &tle) const
Linear::Vector * RHSVectorPtr
bool printMPDEOutputSolution(Analysis::OutputMgrAdapter &outputManagerAdapter, const double time, Linear::Vector *solnVecPtr, const std::vector< double > &fastTimes)
Linear::Vector * nextStorePtr
Linear::Vector * stoQn0Ptr
bool saveOutputSolution(Analysis::OutputMgrAdapter &outputManagerAdapter, const TIAParams &tia_params, Linear::Vector *solnVecPtr, const double saveTime, const bool doNotInterpolate)
void updateSensitivityHistory()
std::vector< double > psi_
Linear::Vector * dQdxdVpVectorPtr
double currentTimeStepSum
Linear::Vector * currLeadCurrentPtr
std::vector< double > dOdpAdjVec_
double partialTimeDeriv() const
std::vector< Linear::Vector * > lastDQdxDXdpPtrVector
void rejectStepForHabanero()
Linear::Vector * nextLeadCurrentQDerivPtr
Linear::Vector * newtonCorrectionPtr
Linear::Vector * currSolutionPtr
void initializeSensitivities()
StepErrorControl & sec
Reference to step-error control object.
std::vector< Linear::Vector * > stoHistory
void obtainSensitivityPredictors()
Linear::Vector * nextStoreLeadCurrQPtr
void obtainSensitivityResiduals()
Linear::Vector * nextStateDerivPtr
std::vector< Linear::Vector * > xHistory
void outputDCOP(const Linear::Vector &solution)
std::vector< Linear::Vector * > sensRHSPtrVector
std::vector< double > alpha_
Linear::Matrix * dQdxMatrixPtr
std::vector< Linear::Vector * > currDQdxDXdpPtrVector
double partialSum_m1(int currentOrder)
std::vector< std::vector< Linear::Vector * > > dXdpHistory
Linear::Vector * daeBVectorPtr
std::vector< Linear::Vector * > nextDQdxDXdpPtrVector
std::vector< Linear::Vector * > currDqdpPtrVector
std::vector< Linear::Vector * > stoLeadCurrQHistory
void setTwoLevelTimeInfo(const TimeIntInfo &tiInfo)
double partialQErrorNormSum()
std::vector< double > gamma_
double timept_
Keep track of last interpolation point in printMPDEOutputSolution.
Linear::Vector * nextLeadCurrentPtr
std::vector< Linear::Vector * > lastDXdpPtrVector
std::vector< Linear::Vector * > sHistory