47 #include <Xyce_config.h>
54 #include <N_ERH_ErrorMgr.h>
55 #include <N_IO_InitialConditions.h>
56 #include <N_LAS_BlockVector.h>
57 #include <N_LAS_Matrix.h>
58 #include <N_LAS_System.h>
59 #include <N_LAS_Vector.h>
60 #include <N_PDS_Comm.h>
61 #include <N_PDS_Manager.h>
67 #include <N_UTL_Diagnostic.h>
68 #include <N_UTL_FeatureTest.h>
69 #include <N_UTL_MachDepParams.h>
87 TimeIntegrationMethod *
93 return new Gear12(tia_params, step_error_control, data_store);
149 if (DEBUG_TIME && isActive(Diag::TIME_PREDICTOR))
151 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
152 Xyce::dout() << std::endl
153 << Xyce::section_divider << std::endl
154 <<
" Gear12::obtainPredictor" << std::endl
156 <<
"\n sec.nscsco_: " <<
sec.
nscsco_ << std::endl;
158 Xyce::dout() <<
"\n sec.beta_[" << i <<
"] = " <<
sec.
beta_[i] <<
"\n" << std::endl;
161 Xyce::dout() <<
"\n xHistory["<< i <<
"]: \n" << std::endl;
162 (
ds.
xHistory[i])->printPetraObject(Xyce::dout());
163 Xyce::dout() << std::endl;
167 Xyce::dout() <<
"\n qHistory["<< i <<
"]: \n" << std::endl;
168 (
ds.
qHistory[i])->printPetraObject(Xyce::dout());
169 Xyce::dout() << std::endl;
173 Xyce::dout() <<
"\n sHistory["<< i <<
"]: \n" << std::endl;
174 (
ds.
sHistory[i])->printPetraObject(Xyce::dout());
175 Xyce::dout() << std::endl;
177 Xyce::dout() <<
"\n xn0: \n" << std::endl;
178 ds.
xn0Ptr->printPetraObject(Xyce::dout());
179 Xyce::dout() << std::endl;
180 Xyce::dout() <<
"\n qn0: \n" << std::endl;
181 ds.
qn0Ptr->printPetraObject(Xyce::dout());
182 Xyce::dout() << std::endl;
183 Xyce::dout() <<
"\n qpn0: \n" << std::endl;
184 ds.
qpn0Ptr->printPetraObject(Xyce::dout());
185 Xyce::dout() << std::endl;
186 Xyce::dout() <<
"\n sn0: \n" << std::endl;
187 ds.
sn0Ptr->printPetraObject(Xyce::dout());
188 Xyce::dout() << std::endl;
189 Xyce::dout() <<
"\n spn0: \n" << std::endl;
190 ds.
spn0Ptr->printPetraObject(Xyce::dout());
191 Xyce::dout() << std::endl;
192 Xyce::dout() << Xyce::section_divider << std::endl;
220 return pow(stepadjust, 1.0 / 3.0);
237 if (DEBUG_TIME && isActive(Diag::TIME_RESIDUAL))
239 Xyce::dout() << std::endl
240 << Xyce::section_divider << std::endl
241 <<
" Gear12::obtainResidual" << std::endl
243 <<
"\n solution: \n" << std::endl;
245 Xyce::dout() <<
"\n daeQVector: \n" << std::endl;
247 Xyce::dout() <<
"\n qn0: \n" << std::endl;
248 ds.
qn0Ptr->printPetraObject(Xyce::dout());
249 Xyce::dout() <<
"\n qpn0: \n" << std::endl;
250 ds.
qpn0Ptr->printPetraObject(Xyce::dout());
252 <<
"\n daeFVector: \n" << std::endl;
255 Xyce::dout() <<
"\n dQdt-vector: \n" << std::endl;
257 Xyce::dout() << std::endl;
284 if (DEBUG_TIME && isActive(Diag::TIME_RESIDUAL))
286 Xyce::dout() <<
"\n Residual-vector: \n" << std::endl
287 <<
"-(qpn0-(sec.alpha_s/h)*(Q-qn0)+F-B) \n" << std::endl;
289 Xyce::dout() << Xyce::section_divider << std::endl
305 for (
int ip=0; ip<numParams;++ip)
315 std::vector<Linear::Vector*> & dqdpHistoryVec =
ds.
dqdpHistory[ip];
324 RHSVec.linearCombo(1.0, RHSVec,
sec.
alpha_[2],*(dqdpHistoryVec[1]));
328 RHSVec.linearCombo(1.0,RHSVec,-1.0,dbdpVec);
336 RHSVec.linearCombo(1.0,RHSVec, -qscalar1, currDQdxDXdpVec);
341 RHSVec.linearCombo(1.0,RHSVec, -qscalar2, lastDQdxDXdpVec);
345 Xyce::dout() <<
"obtainSensitivityResiduals: RHS Vector, ip = " << ip <<
":\n";
346 RHSVec.printPetraObject(Xyce::dout());
362 if (DEBUG_TIME && isActive(Diag::TIME_JACOBIAN))
364 Xyce::dout() << std::endl
365 << Xyce::section_divider << std::endl
366 <<
" Gear12::obtainJacobian" << std::endl;
383 Jac.linearCombo( qscalar, dQdx, fscalar, dFdx );
385 if (DEBUG_TIME && isActive(Diag::TIME_JACOBIAN))
387 Xyce::dout() <<
"\n dFdx:" <<std::endl;
388 dFdx.printPetraObject(Xyce::dout());
389 Xyce::dout() <<
"\n Total Jacobian:" <<std::endl;
390 Jac.printPetraObject(Xyce::dout());
396 Xyce::dout() << Xyce::section_divider << std::endl << std::endl;
408 Linear::Vector * tmpSolVectorPtr, std::vector<Linear::Vector*> & historyVec)
415 if( -dtr < 100 * Util::MachineDependentParams::MachinePrecision() )
417 *tmpSolVectorPtr = *(historyVec[0]);
421 tmpSolVectorPtr->linearCombo(1.0, *(historyVec[0]), -1.0, *(historyVec[1]));
428 tmpSolVectorPtr->linearCombo(1.0, *(historyVec[0]), dtr, *tmpSolVectorPtr);
451 Linear::Vector * tmpSolVectorPtr)
453 Linear::BlockVector * blockTempSolVectorPtr =
454 dynamic_cast<Linear::BlockVector*
>(tmpSolVectorPtr);
455 if (blockTempSolVectorPtr == NULL)
457 std::string msg =
"Gear12::interpolateMPDESolution: ";
458 msg +=
"Linear::Vector tmpSolVectorPtr is not of type Linear::BlockVector";
459 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
465 int numblocks = timepoint.size();
466 int blockCount = blockTempSolVectorPtr->blockCount();
467 if (numblocks > blockCount)
469 std::string msg =
"Gear12::interpolateMPDESolution: ";
470 msg +=
"Number of time points requested is greater than number of fast time points in MPDE block vector";
471 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
484 tfuzz = 100 * uround * (tn + hh);
485 tp = tn - hused - tfuzz;
486 for (
int i=0; i<numblocks ; ++i)
488 if ( (timepoint[i] - tp)*hh < 0.0 )
494 Linear::Vector * solVectorPtr;
495 Linear::Vector * xHistoryVectorPtr;
497 for (
int i=0; i < numblocks ; ++i)
499 if ((kused == 0) || (timepoint[i] == tn)) { kord = 1; }
500 else { kord = kused; }
501 solVectorPtr = &(blockTempSolVectorPtr->block(i));
503 delt = timepoint[i] - tn;
505 for (
int j=1 ; j <= kord ; ++j)
509 Linear::BlockVector * blockXHistoryVectorPtr =
510 dynamic_cast<Linear::BlockVector*>(
ds.
xHistory[j]);
511 if (blockXHistoryVectorPtr == NULL)
513 Xyce::Report::DevelFatal0().in(
"Gear12::interpolateMPDESolution") <<
"Linear::Vector ds.xHistory[j] is not of type Linear::BlockVector\n j = " << j;
516 xHistoryVectorPtr = &(blockXHistoryVectorPtr->block(i));
517 solVectorPtr->linearCombo(1.0,*solVectorPtr,c,*xHistoryVectorPtr);
534 Linear::Vector * solnVecPtr,
535 const std::vector<double> & fastTimes )
552 Linear::Vector * solnVecPtr,
553 const std::vector<double> & fastTimes,
573 Linear::Vector * solnVecPtr,
574 const bool doNotInterpolate,
575 const std::vector<double> & outputInterpolationTimes,
576 bool skipPrintLineOutput)
578 if (DEBUG_TIME && isActive(Diag::TIME_OUTPUT))
580 Xyce::dout() << std::endl
581 << Xyce::section_divider << std::endl
582 <<
" Gear12::printOutputSolution" << std::endl
588 bool dointerp =
true;
601 if (doNotInterpolate)
606 if (dointerp && !outputInterpolationTimes.empty())
608 for (
unsigned int i=0;i<outputInterpolationTimes.size();++i)
620 skipPrintLineOutput);
628 if (outputInterpolationTimes.empty() || doNotInterpolate)
634 skipPrintLineOutput);
637 if (DEBUG_TIME && isActive(Diag::TIME_OUTPUT))
638 Xyce::dout() << Xyce::section_divider << std::endl;
654 Parallel::Machine comm,
655 IO::InitialConditionsManager & initial_conditions_manager,
656 const NodeNameMap & node_name_map,
658 Linear::Vector * solnVecPtr,
659 const double saveTime,
660 const bool doNotInterpolate)
662 if (DEBUG_TIME && isActive(Diag::TIME_OUTPUT))
664 Xyce::dout() << std::endl
665 << Xyce::section_divider << std::endl
666 <<
" Gear12::saveOutputSolution" << std::endl;
671 bool dointerp =
true;
677 if (DEBUG_TIME && isActive(Diag::TIME_OUTPUT))
678 Xyce::dout() << Xyce::section_divider << std::endl;
693 if (DEBUG_TIME && isActive(Diag::TIME_OUTPUT))
695 Xyce::dout() << std::endl
696 << Xyce::section_divider << std::endl
697 <<
" Gear12::updateHistory" << std::endl
698 <<
"\n Before updates \n" << std::endl;
701 Xyce::dout() <<
"\n xHistory["<< i <<
"]: \n" << std::endl;
702 (
ds.
xHistory[i])->printPetraObject(Xyce::dout());
703 Xyce::dout() << std::endl;
707 Xyce::dout() <<
"\n qHistory["<< i <<
"]: \n" << std::endl;
708 (
ds.
qHistory[i])->printPetraObject(Xyce::dout());
709 Xyce::dout() << std::endl;
713 Xyce::dout() <<
"\n sHistory["<< i <<
"]: \n" << std::endl;
714 (
ds.
sHistory[i])->printPetraObject(Xyce::dout());
715 Xyce::dout() << std::endl;
717 Xyce::dout() << Xyce::section_divider << std::endl;
745 if (DEBUG_TIME && isActive(Diag::TIME_HISTORY))
747 Xyce::dout() <<
"\n After updates \n" << std::endl;
748 Xyce::dout() <<
"\n newtonCorrectionPtr: " << std::endl;
750 Xyce::dout() <<
"\n qnewtonCorrectionPtr: " << std::endl;
754 Xyce::dout() <<
"\n xHistory["<< i <<
"]: \n" << std::endl;
755 (
ds.
xHistory[i])->printPetraObject(Xyce::dout());
756 Xyce::dout() << std::endl;
760 Xyce::dout() <<
"\n qHistory["<< i <<
"]: \n" << std::endl;
761 (
ds.
qHistory[i])->printPetraObject(Xyce::dout());
762 Xyce::dout() << std::endl;
764 Xyce::dout() <<
"\n sNewtonCorrectionPtr: " << std::endl;
766 Xyce::dout() << std::endl;
767 Xyce::dout() <<
"\n nextStatePtr: " << std::endl;
769 Xyce::dout() << std::endl;
772 Xyce::dout() <<
"\n sHistory["<< i <<
"]: \n" << std::endl;
773 (
ds.
sHistory[i])->printPetraObject(Xyce::dout());
774 Xyce::dout() << std::endl;
776 Xyce::dout() << Xyce::section_divider << std::endl;
793 for (
int ip=0; ip<numParams;++ip)
795 std::vector<Linear::Vector*> & dqdpHistory =
ds.
dqdpHistory[ip];
796 std::vector<Linear::Vector*> & dXdpHistory =
ds.
dXdpHistory[ip];
805 *(dQdxdXdpHistory[2]) = *(dQdxdXdpHistory[1]);
806 *(dXdpHistory[2]) = *(dXdpHistory[1]);
807 *(dqdpHistory[1]) = *(dqdpHistory[0]);
810 *(dQdxdXdpHistory[1]) = *(dQdxdXdpHistory[0]);
811 *(dXdpHistory[1]) = *(dXdpHistory[0]);
813 *(dQdxdXdpHistory[0]) = nextDQdxDXdpVec;
814 *(dXdpHistory[0]) = nextDXdpVec;
815 *(dqdpHistory[0]) = nextDqdpVec;
833 if (DEBUG_TIME && isActive(Diag::TIME_HISTORY))
835 Xyce::dout() << std::endl
836 << Xyce::section_divider << std::endl
837 <<
" Gear12::restoreHistory" << std::endl;
839 Xyce::dout() <<
"\n sec.psi_[i] = " <<
sec.
psi_[i] << std::endl;
842 Xyce::dout() <<
"\n xHistory["<< i <<
"]: \n" << std::endl;
843 (
ds.
xHistory[i])->printPetraObject(Xyce::dout());
844 Xyce::dout() << std::endl;
848 Xyce::dout() <<
"\n qHistory["<< i <<
"]: \n" << std::endl;
849 (
ds.
qHistory[i])->printPetraObject(Xyce::dout());
850 Xyce::dout() << std::endl;
854 Xyce::dout() <<
"\n sHistory["<< i <<
"]: \n" << std::endl;
855 (
ds.
sHistory[i])->printPetraObject(Xyce::dout());
856 Xyce::dout() << std::endl;
858 Xyce::dout() << Xyce::section_divider << std::endl;
874 if (DEBUG_TIME && isActive(Diag::TIME_COEFFICIENTS))
876 Xyce::dout() << std::endl
877 << Xyce::section_divider << std::endl
878 <<
" Gear12::updateCoeffs" << std::endl
883 <<
" psi_[0] = " <<
sec.
psi_[0] << std::endl;
927 if (DEBUG_TIME && isActive(Diag::TIME_COEFFICIENTS))
929 Xyce::dout() <<
" nscsco_ = " <<
sec.
nscsco_ << std::endl
930 <<
" beta_[0] = " <<
sec.
beta_[0] << std::endl
931 <<
" beta_[1] = " <<
sec.
beta_[1] << std::endl
932 <<
" beta_[2] = " <<
sec.
beta_[2] << std::endl
933 <<
" beta_[3] = " <<
sec.
beta_[3] << std::endl
934 <<
" beta_[4] = " <<
sec.
beta_[4] << std::endl
935 <<
" alpha_[0] = " <<
sec.
alpha_[0] << std::endl
936 <<
" alpha_[1] = " <<
sec.
alpha_[1] << std::endl
937 <<
" alpha_[2] = " <<
sec.
alpha_[2] << std::endl
938 <<
" alpha_[3] = " <<
sec.
alpha_[3] << std::endl
939 <<
" alpha_[4] = " <<
sec.
alpha_[4] << std::endl
942 <<
" gamma_[0] = " <<
sec.
gamma_[0] << std::endl
943 <<
" gamma_[1] = " <<
sec.
gamma_[1] << std::endl
944 <<
" gamma_[2] = " <<
sec.
gamma_[2] << std::endl
945 <<
" gamma_[3] = " <<
sec.
gamma_[3] << std::endl
946 <<
" gamma_[4] = " <<
sec.
gamma_[4] << std::endl
947 <<
" psi_[0] = " <<
sec.
psi_[0] << std::endl
948 <<
" psi_[1] = " <<
sec.
psi_[1] << std::endl
949 <<
" psi_[2] = " <<
sec.
psi_[2] << std::endl
950 <<
" psi_[3] = " <<
sec.
psi_[3] << std::endl
951 <<
" psi_[4] = " <<
sec.
psi_[4] << std::endl
952 <<
" sigma_[0] = " <<
sec.
sigma_[0] << std::endl
953 <<
" sigma_[1] = " <<
sec.
sigma_[1] << std::endl
954 <<
" sigma_[2] = " <<
sec.
sigma_[2] << std::endl
955 <<
" sigma_[3] = " <<
sec.
sigma_[3] << std::endl
956 <<
" sigma_[4] = " <<
sec.
sigma_[4] << std::endl
957 <<
" ck_ = " <<
sec.
ck_ << std::endl
958 << Xyce::section_divider << std::endl;
985 double currentTimeStep;
991 currentTimeStep = 0.1 * time_to_stop;
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;
1095 if (DEBUG_TIME && isActive(Diag::TIME_HISTORY))
1097 Xyce::dout() << std::endl
1098 << Xyce::section_divider << std::endl
1099 <<
" Gear12::initialize" << std::endl
1100 <<
"\n xHistory: \n" << std::endl;
1101 (
ds.
xHistory[0])->printPetraObject(Xyce::dout());
1102 Xyce::dout() << std::endl;
1103 (
ds.
xHistory[1])->printPetraObject(Xyce::dout());
1104 Xyce::dout() << std::endl
1105 <<
"\n qHistory: \n" << std::endl;
1106 (
ds.
qHistory[0])->printPetraObject(Xyce::dout());
1107 Xyce::dout() << std::endl;
1108 (
ds.
qHistory[1])->printPetraObject(Xyce::dout());
1109 Xyce::dout() << std::endl
1110 <<
"\n sHistory: \n" << std::endl;
1111 (
ds.
sHistory[0])->printPetraObject(Xyce::dout());
1112 Xyce::dout() << std::endl;
1113 (
ds.
sHistory[1])->printPetraObject(Xyce::dout());
1114 Xyce::dout() << std::endl
1115 <<
"\n" <<
"currentTimeStep = " << currentTimeStep <<
"\n" << std::endl
1116 <<
"\n" <<
"time_to_stop = " << time_to_stop <<
"\n" << std::endl
1117 << Xyce::section_divider << std::endl;
1134 for (
int ip=0; ip<numParams;++ip)
1136 std::vector<Linear::Vector*> & dqdpHistory =
ds.
dqdpHistory[ip];
1137 std::vector<Linear::Vector*> & dXdpHistory =
ds.
dXdpHistory[ip];
1145 *(dQdxdXdpHistory[0]) = *(currDQdxDxdpPtr);
1146 *(dQdxdXdpHistory[1]) = *(currDQdxDxdpPtr);
1149 *(dXdpHistory[0]) = *(currDxdpPtr);
1150 *(dXdpHistory[1]) = *(currDxdpPtr);
1153 *(dqdpHistory[0]) = *(currDqdpPtr);
1154 *(dqdpHistory[1]) = *(currDqdpPtr);
1232 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1234 Xyce::dout() << std::endl
1235 << Xyce::section_divider << std::endl
1236 <<
" Gear12::rejectStep" << std::endl;
1264 std::string msg =
"Gear12::rejectStep: ";
1265 msg +=
" Maximum number of local error test failures. ";
1266 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
1308 if (DEBUG_TIME && isActive(Diag::TIME_STEP) && isActive(Diag::TIME_COEFFICIENTS))
1314 <<
" alpha_[0] = " <<
sec.
alpha_[0] << std::endl
1315 <<
" alpha_[1] = " <<
sec.
alpha_[1] << std::endl
1316 <<
" alpha_[2] = " <<
sec.
alpha_[2] << std::endl
1317 <<
" alpha_[3] = " <<
sec.
alpha_[3] << std::endl
1318 <<
" alpha_[4] = " <<
sec.
alpha_[4] << std::endl
1319 <<
" psi_[0] = " <<
sec.
psi_[0] << std::endl
1320 <<
" psi_[1] = " <<
sec.
psi_[1] << std::endl
1321 <<
" psi_[2] = " <<
sec.
psi_[2] << std::endl
1322 <<
" psi_[3] = " <<
sec.
psi_[3] << std::endl
1323 <<
" psi_[4] = " <<
sec.
psi_[4] << std::endl
1324 <<
" sigma_[0] = " <<
sec.
sigma_[0] << std::endl
1325 <<
" sigma_[1] = " <<
sec.
sigma_[1] << std::endl
1326 <<
" sigma_[2] = " <<
sec.
sigma_[2] << std::endl
1327 <<
" sigma_[3] = " <<
sec.
sigma_[3] << std::endl
1328 <<
" sigma_[4] = " <<
sec.
sigma_[4] << std::endl
1329 <<
" rr = " << rr << std::endl
1332 <<
" Est_ = " <<
sec.
Est_ << std::endl
1336 <<
" newTimeStep_ = " << newTimeStep_ << std::endl;
1342 std::string tmp =
" Gear12:rejectStep: Warning: Local error test failed with constant step-size.\n";
1343 Xyce::dout() << tmp << std::endl;
1366 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1368 Xyce::dout() <<
" newTimeStep_ = " << newTimeStep_ << std::endl
1389 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1391 Xyce::dout() << Xyce::section_divider << std::endl;
1426 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1428 Xyce::dout() << std::endl
1429 << Xyce::section_divider << std::endl
1430 <<
" Gear12::completeStep" << std::endl;
1449 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1452 <<
" rr = " << rr << std::endl
1456 <<
" newTimeStep_ = " << newTimeStep_ << std::endl
1509 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1512 Xyce::dout() <<
" r_safety = " <<
sec.
r_safety_ << std::endl;
1513 Xyce::dout() <<
" r_fudge_ = " <<
sec.
r_fudge_ << std::endl;
1514 Xyce::dout() <<
" r_hincr_ = " <<
sec.
r_hincr_ << std::endl;
1516 Xyce::dout() <<
" Est = " <<
sec.
Est_ << std::endl;
1517 Xyce::dout() <<
" raw rr = " << rr << std::endl;
1568 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1570 Xyce::dout() <<
" nextTime = " <<
sec.
nextTime << std::endl;
1571 Xyce::dout() <<
" newTimeStep_ = " << newTimeStep_ << std::endl;
1596 if (DEBUG_TIME && isActive(Diag::TIME_STEP))
1598 Xyce::dout() << Xyce::section_divider << std::endl;
1625 if (DEBUG_TIME && isActive(Diag::TIME_DUMP_SOLUTION_ARRAYS))
1627 Xyce::dout() <<
"\n next state Ptr: \n" << std::endl;
1629 Xyce::dout() << std::endl;
1631 Xyce::dout() <<
"\n sn0: \n" << std::endl;
1632 ds.
sn0Ptr->printPetraObject(Xyce::dout());
1633 Xyce::dout() << std::endl;
1635 Xyce::dout() <<
"\n next State Deriv: \n" << std::endl;
1637 Xyce::dout() << std::endl;
1665 if (DEBUG_TIME && isActive(Diag::TIME_DUMP_SOLUTION_ARRAYS))
1667 Xyce::dout() <<
"\n next store Ptr: \n" << std::endl;
1669 Xyce::dout() << std::endl;
1697 if (DEBUG_TIME && isActive(Diag::TIME_DUMP_SOLUTION_ARRAYS))
1699 Xyce::dout() <<
"\n next leadcurrent q Ptr: \n" << std::endl;
1701 Xyce::dout() << std::endl;
1736 if (DEBUG_TIME && isActive(Diag::TIME_ERROR))
1737 Xyce::dout() << tle;
1744 Xyce::Report::UserWarning() <<
"Excessively small current time step, incorrectly returning with large value";
bool saveOutputSolution(Parallel::Machine comm, IO::InitialConditionsManager &initial_conditions_manager, const NodeNameMap &node_name_map, const TIAParams &tia_params, Linear::Vector *solnVecPtr, const double saveTime, const bool doNotInterpolate)
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
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 setTwoLevelTimeInfo()
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
std::vector< Linear::Vector * > leadCurrentQDerivHistory
Linear::Matrix * dFdxMatrixPtr
Linear::Matrix * JMatrixPtr
Linear::Vector * nextStatePtr
std::vector< Linear::Vector * > leadCurrentQHistory
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
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 * tmpLeadCurrentQDerivVectorPtr
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
std::vector< Linear::Vector * > sensRHSPtrVector
std::vector< double > alpha_
Linear::Matrix * dQdxMatrixPtr
void tranOutput(double time, Linear::Vector &currSolutionPtr, Linear::Vector &stateVecPtr, Linear::Vector &storeVecPtr, Linear::Vector &lead_current_vector, Linear::Vector &junction_voltage_vector, Linear::Vector &lead_current_dqdt_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)
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
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