47 #include <Xyce_config.h>
50 #include <N_UTL_Misc.h>
62 #include <N_ERH_ErrorMgr.h>
63 #include <N_LAS_BlockVector.h>
64 #include <N_LAS_Matrix.h>
65 #include <N_LAS_System.h>
66 #include <N_LAS_Vector.h>
67 #include <N_PDS_Comm.h>
68 #include <N_PDS_Manager.h>
91 timeStepForHistory2_(0.0)
94 sec.maxOrder_=(
Xycemin(2,tiaParams.maxOrder));
95 sec.minOrder_=(
Xycemax(1,tiaParams.minOrder));
97 if (sec.minOrder_ > sec.maxOrder_)
99 sec.minOrder_ = sec.maxOrder_;
131 #ifdef Xyce_DEBUG_TIME
132 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
136 Xyce::dout() << std::endl;
137 Xyce::dout() << Xyce::section_divider << std::endl;
139 " N_TIA_OneStep::obtainPredictor" << std::endl;
141 Xyce::dout() <<
"\n sec.nscsco_: " <<
sec.
nscsco_ << std::endl;
143 Xyce::dout() <<
"\n sec.beta_[" << i <<
"] = " <<
sec.
beta_[i] <<
"\n" << std::endl;
146 Xyce::dout() <<
"\n xHistory["<< i <<
"]: \n" << std::endl;
147 (
ds.
xHistory[i])->printPetraObject(Xyce::dout());
148 Xyce::dout() << std::endl;
152 Xyce::dout() <<
"\n qHistory["<< i <<
"]: \n" << std::endl;
153 (
ds.
qHistory[i])->printPetraObject(Xyce::dout());
154 Xyce::dout() << std::endl;
158 Xyce::dout() <<
"\n sHistory["<< i <<
"]: \n" << std::endl;
159 (
ds.
sHistory[i])->printPetraObject(Xyce::dout());
160 Xyce::dout() << std::endl;
164 Xyce::dout() <<
"\n stoHistory["<< i <<
"]: \n" << std::endl;
166 Xyce::dout() << std::endl;
170 Xyce::dout() <<
"\n stoLeadCurrQHistory["<< i <<
"]: \n" << std::endl;
172 Xyce::dout() << std::endl;
174 Xyce::dout() <<
"\n xn0: \n" << std::endl;
175 ds.
xn0Ptr->printPetraObject(Xyce::dout());
176 Xyce::dout() << std::endl;
177 Xyce::dout() <<
"\n qn0: \n" << std::endl;
178 ds.
qn0Ptr->printPetraObject(Xyce::dout());
179 Xyce::dout() << std::endl;
180 Xyce::dout() <<
"\n qpn0: \n" << std::endl;
181 ds.
qpn0Ptr->printPetraObject(Xyce::dout());
182 Xyce::dout() << std::endl;
183 Xyce::dout() <<
"\n sn0: \n" << std::endl;
184 ds.
sn0Ptr->printPetraObject(Xyce::dout());
185 Xyce::dout() << std::endl;
186 Xyce::dout() <<
"\n spn0: \n" << std::endl;
187 ds.
spn0Ptr->printPetraObject(Xyce::dout());
188 Xyce::dout() << std::endl;
189 Xyce::dout() <<
"\n stoQn0Ptr: \n" << std::endl;
191 Xyce::dout() << std::endl;
192 Xyce::dout() <<
"\n stoQpn0Ptr: \n" << std::endl;
194 Xyce::dout() << std::endl;
195 Xyce::dout() << Xyce::section_divider << std::endl;
197 #endif // Xyce_DEBUG_TIME
219 for (
int ip=0; ip<numParams;++ip)
221 std::vector<N_LAS_Vector*> & dfdpHistory =
ds.
dfdpHistory[ip];
222 std::vector<N_LAS_Vector*> & dqdpHistory =
ds.
dqdpHistory[ip];
223 std::vector<N_LAS_Vector*> & dbdpHistory =
ds.
dbdpHistory[ip];
224 std::vector<N_LAS_Vector*> & dXdpHistory =
ds.
dXdpHistory[ip];
237 *dfdpn0Ptr = *(dfdpHistory[0]);
238 *dqdpn0Ptr = *(dqdpHistory[0]);
239 *dbdpn0Ptr = *(dbdpHistory[0]);
240 *dXdpn0Ptr = *(dXdpHistory[0]);
243 dfdppn0Ptr->putScalar(0.0);
244 dqdppn0Ptr->putScalar(0.0);
245 dbdppn0Ptr->putScalar(0.0);
246 dXdppn0Ptr->putScalar(0.0);
249 Xyce::dout() <<
"obtainSensitivityPredictors: dqdpn0Ptr, param = " << ip <<
"\n";
250 dqdpn0Ptr->printPetraObject(Xyce::dout());
256 dXdpn0Ptr->linearCombo(
sec.
beta_[i],*(dXdpHistory[i]),1.0,*dXdpn0Ptr);
278 #ifdef Xyce_DEBUG_TIME
281 Xyce::dout() << std::endl;
282 Xyce::dout() << Xyce::section_divider << std::endl;
284 " N_TIA_OneStep::obtainResidual" << std::endl;
285 Xyce::dout() <<
"\n t = " <<
sec.
nextTime <<
"\n" << std::endl;
286 Xyce::dout() <<
"\n solution: \n" << std::endl;
288 Xyce::dout() <<
"\n daeQVector: \n" << std::endl;
290 Xyce::dout() <<
"\n qn0: \n" << std::endl;
291 ds.
qn0Ptr->printPetraObject(Xyce::dout());
292 Xyce::dout() <<
"\n qpn0: \n" << std::endl;
293 ds.
qpn0Ptr->printPetraObject(Xyce::dout());
295 Xyce::dout() <<
"\n daeFVector: \n" << std::endl;
298 Xyce::dout() <<
"\n dQdt-vector: \n" << std::endl;
300 Xyce::dout() << std::endl;
307 #ifdef SEPARATE_F_AND_B
315 #ifdef SEPARATE_F_AND_B
339 #ifdef Xyce_DEBUG_TIME
342 Xyce::dout() <<
"\n Residual-vector: \n" << std::endl;
343 Xyce::dout() <<
"-(qpn0-(sec.alpha_s/h)*(Q-qn0)+F-B) \n" << std::endl;
345 Xyce::dout() << Xyce::section_divider << std::endl;
346 Xyce::dout() << std::endl;
362 for (
int ip=0; ip<numParams;++ip)
372 std::vector<N_LAS_Vector*> & dqdpHistory =
ds.
dqdpHistory[ip];
385 nextDqdpDerivVec.linearCombo(1.0,dqdpVec,-1.0, dqdpn0Vec);
387 nextDqdpDerivVec.linearCombo(-1.0,currDqdpDerivVec,1.0,nextDqdpDerivVec);
389 RHSVec.linearCombo(0.5,nextDqdpDerivVec,+0.5,dfdpVec);
390 #ifdef SEPARATE_F_AND_B
391 RHSVec.linearCombo(1.0,RHSVec,-0.5,dbdpVec);
396 nextDqdpDerivVec.linearCombo(1.0,dqdpVec,-1.0, dqdpn0Vec);
399 RHSVec.linearCombo(1.0,nextDqdpDerivVec,+1.0,dfdpVec);
400 #ifdef SEPARATE_F_AND_B
401 RHSVec.linearCombo(1.0,RHSVec,-1.0,dbdpVec);
410 RHSVec.linearCombo(1.0,RHSVec, qscalar, currDQdxDXdpVec);
415 RHSVec.linearCombo(1.0,RHSVec, 0.5, currDQdxDXdpDerivVec);
419 Xyce::dout() <<
"obtainSensitivityResiduals: RHS Vector, ip = " << ip <<
":\n";
420 RHSVec.printPetraObject(Xyce::dout());
437 for (
int ip=0; ip<numParams;++ip)
448 nextDQdxDXdpDerivVec.putScalar(0.0);
449 nextDQdxDXdpDerivVec.linearCombo(2.0,nextDQdxDXdpVec,-2.0,currDQdxDXdpVec);
450 nextDQdxDXdpDerivVec.scale(1.0/dt);
451 nextDQdxDXdpDerivVec.linearCombo(-1.0,currDQdxDXdpDerivVec,1.0,nextDQdxDXdpDerivVec);
455 nextDQdxDXdpDerivVec.putScalar(0.0);
456 nextDQdxDXdpDerivVec.linearCombo(1.0,nextDQdxDXdpVec,-1.0,currDQdxDXdpVec);
457 nextDQdxDXdpDerivVec.scale(1.0/dt);
472 #ifdef Xyce_DEBUG_TIME
475 Xyce::dout() << std::endl;
476 Xyce::dout() << Xyce::section_divider << std::endl;
478 " N_TIA_OneStep::obtainJacobian" << std::endl;
497 Jac.linearCombo( qscalar, dQdx, fscalar, dFdx );
499 #ifdef Xyce_DEBUG_TIME
502 Xyce::dout() <<
"fscalar = " << fscalar <<
" qscalar = " << qscalar << std::endl;
504 Xyce::dout() <<
"\n dFdx:" <<std::endl;
505 dFdx.printPetraObject(Xyce::dout());
506 Xyce::dout() <<
"\n dQdx:" <<std::endl;
507 dQdx.printPetraObject(Xyce::dout());
508 Xyce::dout() <<
"\n Total Jacobian:" <<std::endl;
509 Jac.printPetraObject(Xyce::dout());
515 Xyce::dout() << Xyce::section_divider << std::endl;
516 Xyce::dout() << std::endl;
530 N_LAS_Vector * tmpSolVectorPtr, std::vector<N_LAS_Vector*> & historyVec)
536 *tmpSolVectorPtr = *(historyVec[0]);
538 if( -dtr < 100 * N_UTL_MachineDependentParams::MachinePrecision() )
548 tmpSolVectorPtr->linearCombo(1.0,*tmpSolVectorPtr,dtr,*(historyVec[1]));
571 N_LAS_Vector * tmpSolVectorPtr)
573 N_LAS_BlockVector * blockTempSolVectorPtr =
574 dynamic_cast<N_LAS_BlockVector*
>(tmpSolVectorPtr);
575 if (blockTempSolVectorPtr == NULL)
577 std::string msg =
"N_TIA_OneStep::interpolateMPDESolution: ";
578 msg +=
"N_LAS_Vector tmpSolVectorPtr is not of type N_LAS_BlockVector";
579 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
585 int numblocks = timepoint.size();
586 int blockCount = blockTempSolVectorPtr->blockCount();
587 if (numblocks > blockCount)
589 std::string msg =
"N_TIA_OneStep::interpolateMPDESolution: ";
590 msg +=
"Number of time points requested is greater than number of fast time points in MPDE block vector";
591 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
604 tfuzz = 100 * uround * (tn + hh);
605 tp = tn - hused - tfuzz;
606 for (
int i=0; i<numblocks ; ++i)
608 if ( (timepoint[i] - tp)*hh < 0.0 )
614 N_LAS_Vector * solVectorPtr;
615 N_LAS_Vector * xHistoryVectorPtr;
617 for (
int i=0; i < numblocks ; ++i)
619 if ((kused == 0) || (timepoint[i] == tn)) { kord = 1; }
620 else { kord = kused; }
621 solVectorPtr = &(blockTempSolVectorPtr->block(i));
623 delt = timepoint[i] - tn;
625 for (
int j=1 ; j <= kord ; ++j)
629 N_LAS_BlockVector * blockXHistoryVectorPtr =
630 dynamic_cast<N_LAS_BlockVector*>(
ds.
xHistory[j]);
631 if (blockXHistoryVectorPtr == NULL)
633 Xyce::Report::DevelFatal0().in(
"N_TIA_OneStep::interpolateMPDESolution") <<
"N_LAS_Vector ds.xHistory[j] is not of type N_LAS_BlockVector\n j = " << j;
636 xHistoryVectorPtr = &(blockXHistoryVectorPtr->block(i));
637 solVectorPtr->linearCombo(1.0,*solVectorPtr,c,*xHistoryVectorPtr);
654 N_LAS_Vector * solnVecPtr,
655 const std::vector<double> & fastTimes )
657 #ifdef Xyce_DEBUG_TIME
660 Xyce::dout() << std::endl;
661 Xyce::dout() << Xyce::section_divider << std::endl;
663 " N_TIA_OneStep::printMPDEOutputSolution" << std::endl;
665 #endif // Xyce_DEBUG_TIME
670 double beg_of_output_time_interval = lasttime;
671 double end_of_output_time_interval = tn;
672 double start_time = max(lasttime,beg_of_output_time_interval);
673 double stop_time = min(tn,end_of_output_time_interval);
674 #ifdef Xyce_DEBUG_TIME
677 Xyce::dout() <<
"timestep = " << timestep << std::endl;
678 Xyce::dout() <<
"lasttime = " << lasttime << std::endl;
679 Xyce::dout() <<
"tn = " << tn << std::endl;
680 Xyce::dout() <<
"beg_of_output_time_interval = " << beg_of_output_time_interval << std::endl;
681 Xyce::dout() <<
"end_of_output_time_interval = " << end_of_output_time_interval << std::endl;
682 Xyce::dout() <<
"start_time = " << start_time << std::endl;
683 Xyce::dout() <<
"stop_time = " << stop_time << std::endl;
685 #endif // Xyce_DEBUG_TIME
688 N_LAS_BlockVector * blockTmpSolVectorPtr =
690 if (blockTmpSolVectorPtr == NULL)
692 std::string msg =
"N_TIA_OneStep::printMPDEOutputSolution: ";
693 msg +=
"N_LAS_Vector ds.tmpSolVectorPtr is not of type N_LAS_BlockVector";
694 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
697 int blockCount = blockTmpSolVectorPtr->blockCount();
700 double T2 = fastTimes.back();
702 double charcross = fmod(start_time,T2);
706 for (
int i=0 ; i<=blockCount ; ++i)
708 if (fastTimes[i] >= charcross)
716 std::string msg =
"N_TIA_OneStep::printMPDEOutputSolution: ";
717 msg +=
"Cannot find where characteristic curve crosses fast time slice at start_time";
718 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
721 std::vector<double> h2(blockCount,0);
722 for (
int j=0 ; j < blockCount ; ++j)
724 h2[j] = fastTimes[j+1] - fastTimes[j];
726 std::vector<double> ti;
728 double first_interp = start_time - charcross + fastTimes[s_ind_0];
729 #ifdef Xyce_DEBUG_TIME
732 Xyce::dout() <<
"first_interp = " << first_interp << std::endl;
734 #endif // Xyce_DEBUG_TIME
735 if (s_ind_0 == blockCount) { s_ind_0 = 0; };
737 double eps = fabs(start_time)*1.0e-6;
738 if ( fabs(first_interp-
timept_) <= eps )
740 first_interp += h2[s_ind_0];
742 if (s_ind_0 == blockCount) { s_ind_0 = 0; };
743 #ifdef Xyce_DEBUG_TIME
746 Xyce::dout() <<
"Moving first_interp forward to avoid duplicate outputs: " << first_interp << std::endl;
748 #endif // Xyce_DEBUG_TIME
751 double t = first_interp;
752 while (t <= stop_time)
757 if (sn >= blockCount) { sn = 0; }
759 #ifdef Xyce_DEBUG_TIME
762 Xyce::dout() <<
"T2 = " << T2 << std::endl;
763 Xyce::dout() <<
"charcross = " << charcross << std::endl;
764 Xyce::dout() <<
"s_ind_0 = " << s_ind_0 << std::endl;
765 Xyce::dout() <<
"Expecting to interpolate the following points:" << std::endl;
766 unsigned int numinterp = ti.size();
767 for (
unsigned int i=0 ; i < numinterp ; ++i)
769 Xyce::dout() << ti[i] << std::endl;
771 Xyce::dout() <<
"Total of " << numinterp <<
" points" << std::endl;
773 #endif // Xyce_DEBUG_TIME
775 unsigned int tinum = ti.size();
776 int total_interp = 0;
777 std::vector<double> timepoint_vec(blockCount,stop_time);
778 int num_interp_this_cycle = 0;
780 for (
unsigned int i=0; i < tinum ; ++i)
782 timepoint_vec[s_ind] = ti[i];
783 num_interp_this_cycle++;
785 if (s_ind >= blockCount) { s_ind = 0; };
787 if ((s_ind == s_ind_0) || (i == tinum-1))
792 for (
int j=0 ; j < num_interp_this_cycle ; ++j)
796 timept_, blockTmpSolVectorPtr->block(s),
802 if (s >= blockCount) { s = 0; }
803 #ifdef Xyce_DEBUG_TIME
804 Xyce::dout() <<
"Interpolated to t = " <<
timept_ << std::endl;
805 #endif // Xyce_DEBUG_TIME
807 num_interp_this_cycle = 0;
810 #ifdef Xyce_DEBUG_TIME
811 Xyce::dout() <<
"Total of " << total_interp <<
" points" << std::endl;
812 #endif // Xyce_DEBUG_TIME
815 eps = fabs(stop_time)*1.0e-8;
817 if (fabs(
timept_ - stop_time) >= eps)
819 #ifdef Xyce_DEBUG_TIME
822 Xyce::dout() <<
"Previous timept = " <<
timept_ << std::endl;
823 Xyce::dout() <<
"Expecting to interpolate the following point: " << stop_time << std::endl;
825 #endif // Xyce_DEBUG_TIME
826 N_LAS_Vector* tmpSolnVecPtr = solnVecPtr;
833 N_LAS_BlockVector * blockTmpSolnVecPtr =
834 dynamic_cast<N_LAS_BlockVector*
>(tmpSolnVecPtr);
835 N_LAS_BlockVector * blockTmpVecPtr =
836 dynamic_cast<N_LAS_BlockVector*
>(tmpVecPtr);
837 if (blockTmpSolnVecPtr == NULL)
839 std::string msg =
"N_TIA_OneStep::printMPDEOutputSolution: ";
840 msg +=
"N_LAS_Vector tmpSolnVecPtr is not of type N_LAS_BlockVector";
841 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
844 if (blockTmpVecPtr == NULL)
846 std::string msg =
"N_TIA_OneStep::printMPDEOutputSolution: ";
847 msg +=
"N_LAS_Vector tmpVecPtr is not of type N_LAS_BlockVector";
848 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
853 charcross = fmod(stop_time,T2);
856 if( charcross < fastTimes[0] )
859 s_ind_1 = blockCount-1;
863 for (
int i=blockCount-1 ; i>=0 ; --i)
865 if (fastTimes[i] <= charcross)
874 std::string msg =
"N_TIA_OneStep::printMPDEOutputSolution: ";
875 msg +=
"Cannot find where characteristic curve crosses fast time slice at stop_time";
876 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
881 double coeff_sm = fastTimes[sp]-charcross;
882 double coeff_sp = charcross-fastTimes[sm];
883 if (sp == blockCount) { sp = 0; }
884 double dt = h2[s_ind_1];
886 #ifdef Xyce_DEBUG_TIME
887 Xyce::dout() <<
"charcross = " << charcross << std::endl;
888 Xyce::dout() <<
"s_ind_1 = " << s_ind_1 << std::endl;
889 Xyce::dout() <<
"sp = " << sp << std::endl;
890 Xyce::dout() <<
"sm = " << sm << std::endl;
891 Xyce::dout() <<
"dt = " << dt << std::endl;
892 Xyce::dout() <<
"timept = " <<
timept_ << std::endl;
893 Xyce::dout() <<
"coeff_sm = " << coeff_sm << std::endl;
894 Xyce::dout() <<
"coeff_sp = " << coeff_sp << std::endl;
895 #endif // Xyce_DEBUG_TIME
896 blockTmpVecPtr->block(0).linearCombo(
897 coeff_sm/dt, blockTmpSolnVecPtr->block(sm),
898 coeff_sp/dt, blockTmpSolnVecPtr->block(sp)
904 #ifdef Xyce_DEBUG_TIME
905 Xyce::dout() <<
"Interpolated to t = " <<
timept_ << std::endl;
906 #endif // Xyce_DEBUG_TIME
908 #ifdef Xyce_DEBUG_TIME
913 Xyce::dout() <<
"No further interpolation required." << std::endl;
916 #endif // Xyce_DEBUG_TIME
918 #ifdef Xyce_DEBUG_TIME
919 Xyce::dout() << Xyce::section_divider << std::endl;
920 #endif // Xyce_DEBUG_TIME
935 N_LAS_Vector * solnVecPtr,
936 const std::vector<double> & fastTimes,
939 #ifdef Xyce_DEBUG_TIME
942 Xyce::dout() << std::endl;
943 Xyce::dout() << Xyce::section_divider << std::endl;
945 " N_TIA_OneStep::printWaMPDEOutputSolution" << std::endl;
947 #endif // Xyce_DEBUG_TIME
952 double beg_of_output_time_interval = lasttime;
953 double end_of_output_time_interval = tn;
954 double start_time = max(lasttime,beg_of_output_time_interval);
955 double stop_time = min(tn,end_of_output_time_interval);
956 #ifdef Xyce_DEBUG_TIME
959 Xyce::dout() <<
"start_time = " << start_time << std::endl;
960 Xyce::dout() <<
"stop_time = " << stop_time << std::endl;
962 #endif // Xyce_DEBUG_TIME
986 N_LAS_BlockVector * blockTmpSolVectorPtr =
988 N_LAS_BlockVector * blockTmpXn0APtr =
990 N_LAS_BlockVector * blockTmpXn0BPtr =
992 if (blockTmpSolVectorPtr == NULL)
994 std::string msg =
"N_TIA_OneStep::printWaMPDEOutputSolution: ";
995 msg +=
"N_LAS_Vector ds.tmpSolVectorPtr is not of type N_LAS_BlockVector";
996 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
999 if (blockTmpXn0APtr == NULL)
1001 std::string msg =
"N_TIA_OneStep::printWaMPDEOutputSolution: ";
1002 msg +=
"N_LAS_Vector ds.tmpXn0APtr is not of type N_LAS_BlockVector";
1003 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
1006 if (blockTmpXn0BPtr == NULL)
1008 std::string msg =
"N_TIA_OneStep::printWaMPDEOutputSolution: ";
1009 msg +=
"N_LAS_Vector ds.tmpXn0BPtr is not of type N_LAS_BlockVector";
1010 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
1013 int phiLID = blockTmpSolVectorPtr->pmap()->globalToLocalIndex(phiGID);
1015 double timeA = -1.0;
1016 double timeB = -1.0;
1017 #ifdef Xyce_DEBUG_TIME
1020 Xyce::dout() <<
" sec.usedOrder_ = " <<
sec.
usedOrder_ << std::endl;
1021 Xyce::dout() <<
" sec.currentTime_ = " <<
sec.
currentTime << std::endl;
1022 Xyce::dout() <<
" lasttime = " << lasttime << std::endl;
1024 #endif // Xyce_DEBUG_TIME
1031 timeA = lasttime + hh*i;
1035 std::string msg =
"interpolateSolution returned false!";
1036 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0,msg);
1045 timeB = lasttime + hh*(i+1);
1047 #ifdef Xyce_DEBUG_TIME
1050 Xyce::dout() <<
"Interpolating in [ " << timeA <<
", " << timeB <<
" ]" << std::endl;
1051 Xyce::dout() <<
"timeA = " << timeA << std::endl;
1052 Xyce::dout() <<
"timeB = " << timeB << std::endl;
1054 #endif // Xyce_DEBUG_TIME
1057 std::vector<double> t1vals;
1058 double T2 = fastTimes.back();
1059 int blockCount = blockTmpSolVectorPtr->blockCount();
1060 double h2 = T2/blockCount;
1061 double tval = timeA+h2;
1062 while (tval <= timeB)
1064 t1vals.push_back(tval);
1068 double eps = fabs(timeB)*1.0e-8;
1069 if ( (t1vals.size() == 0) || (fabs(t1vals.back() - timeB) >= eps) )
1071 t1vals.push_back(timeB);
1073 std::vector<double> t2vals, phiAB(2);
1074 std::vector<double> tmpPhiAB(2, 0.0);
1080 blockTmpSolVectorPtr->pmap()->pdsComm()->sumAll( &tmpPhiAB[0], &phiAB[0], 2 );
1082 double phiA = phiAB[0], phiB = phiAB[1];
1083 for (
unsigned int j=0 ; j<t1vals.size() ; ++j)
1085 double phi = (1/(timeB-timeA))*(phiA*(timeB-t1vals[j])+phiB*(t1vals[j]-timeA));
1086 t2vals.push_back(fmod(phi,T2));
1088 #ifdef Xyce_DEBUG_TIME
1091 Xyce::dout() <<
"t1vals = " << std::endl;
1092 for (
unsigned int j=0 ; j < t1vals.size() ; ++j)
1094 Xyce::dout() << t1vals[j] << std::endl;
1096 Xyce::dout() <<
"phi(" << timeA <<
") = " << phiA << std::endl;
1097 Xyce::dout() <<
"phi(" << timeB <<
") = " << phiB << std::endl;
1098 Xyce::dout() <<
"t2vals = " << std::endl;
1099 for (
unsigned int j=0 ; j< t2vals.size() ; ++j)
1101 Xyce::dout() << t2vals[j] << std::endl;
1104 #endif // Xyce_DEBUG_TIME
1109 double t = t1vals[0];
1110 double s = t2vals[0];
1114 for (
int j=0 ; j < blockCount ; ++j)
1116 if ((fastTimes[j] <= s) && (s < fastTimes[j+1]))
1122 if (b2 == blockCount)
1126 double s1 = fastTimes[b1];
1127 double s2 = fastTimes[b1+1];
1128 if ((s < s1) || (s > s2))
1130 std::string msg =
"N_TIA_OneStep::printWaMPDEOutputSolution: ";
1131 msg +=
" Interpolator cannot find a fast time block containing the first point ";
1132 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
1134 #ifdef Xyce_DEBUG_TIME
1135 Xyce::dout() <<
"Found s = " << s <<
" in block " << b1;
1136 Xyce::dout() <<
" with boundary = [" << s1 <<
"," << s2 <<
"]" << std::endl;
1137 #endif // Xyce_DEBUG_TIME
1138 for (
unsigned int j=0 ; j < t1vals.size() ; ++j)
1144 if ( (s < s1) || (s > s2) )
1146 #ifdef Xyce_DEBUG_TIME
1147 Xyce::dout() <<
"Incrementing fast time block for next interpolation." << std::endl;
1148 #endif // Xyce_DEBUG_TIME
1150 if (b1 == blockCount)
1155 if (b2 == blockCount)
1160 s2 = fastTimes[b1+1];
1163 if ((s < s1) || (s > s2))
1165 #ifdef Xyce_DEBUG_TIME
1166 Xyce::dout() <<
"Searching for fast time block for next interpolation." << std::endl;
1167 #endif // Xyce_DEBUG_TIME
1169 for (
int j2=0 ; j2 < blockCount ; ++j2)
1171 if ((fastTimes[j2] <= s) && (s < fastTimes[j2+1]))
1177 if (b2 == blockCount)
1182 s2 = fastTimes[b1+1];
1185 if ((s < s1) || (s > s2))
1187 std::string msg =
"N_TIA_OneStep::printWaMPDEOutputSolution: ";
1188 msg +=
" Interpolator moved fast time block but new point is not in this block ";
1189 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
1200 #ifdef Xyce_DEBUG_TIME
1203 Xyce::dout() <<
"Interpolating in the block:" << std::endl;
1204 Xyce::dout() <<
"(t1,t2) = (" << t1 <<
"," << t2 <<
")" << std::endl;
1205 Xyce::dout() <<
"(s1,s2) = (" << s1 <<
"," << s2 <<
")" << std::endl;
1207 #endif // Xyce_DEBUG_TIME
1208 double denom = (t2-t1)*(s2-s1);
1209 double coeff0 = (t2-t)*(s2-s)/denom;
1210 double coeff1 = (t2-t)*(s-s1)/denom;
1211 double coeff2 = (t-t1)*(s2-s)/denom;
1212 double coeff3 = (t-t1)*(s-s1)/denom;
1213 (blockTmpSolVectorPtr->block(b1)).linearCombo(
1214 coeff0, blockTmpXn0APtr->block(b1),
1215 coeff1, blockTmpXn0APtr->block(b2),
1216 coeff2, blockTmpXn0BPtr->block(b1) );
1217 (blockTmpSolVectorPtr->block(b1)).update(
1218 coeff3, blockTmpXn0BPtr->block(b2), 1.0 );
1223 outputManagerAdapter.
tranOutput(t, blockTmpSolVectorPtr->block(b1),
1227 #ifdef Xyce_DEBUG_TIME
1228 Xyce::dout() <<
"Interpolated to (t,phi(t)) = (" << t <<
"," << s <<
")" << std::endl;
1229 #endif // Xyce_DEBUG_TIME
1234 #ifdef Xyce_DEBUG_TIME
1235 Xyce::dout() << Xyce::section_divider << std::endl;
1236 #endif // Xyce_DEBUG_TIME
1252 N_LAS_Vector * solnVecPtr,
1253 const bool doNotInterpolate,
1254 const std::vector<double> &outputInterpolationTimes,
1255 bool skipPrintLineOutput)
1257 #ifdef Xyce_DEBUG_TIME
1260 Xyce::dout() << std::endl;
1261 Xyce::dout() << Xyce::section_divider << std::endl;
1263 " N_TIA_OneStep::printOutputSolution" << std::endl;
1264 Xyce::dout() <<
"usedOrder_ = " <<
sec.
usedOrder_ << std::endl;
1266 #endif // Xyce_DEBUG_TIME
1269 bool dointerp =
true;
1282 if (doNotInterpolate)
1287 if (dointerp && !outputInterpolationTimes.empty())
1289 for (
unsigned int i=0;i<outputInterpolationTimes.size();++i)
1305 if (outputInterpolationTimes.empty() || doNotInterpolate)
1311 skipPrintLineOutput);
1314 #ifdef Xyce_DEBUG_TIME
1315 Xyce::dout() << Xyce::section_divider << std::endl;
1316 #endif // Xyce_DEBUG_TIME
1331 N_LAS_Vector * solnVecPtr,
1332 const double saveTime,
1333 const bool doNotInterpolate)
1335 #ifdef Xyce_DEBUG_TIME
1338 Xyce::dout() << std::endl;
1339 Xyce::dout() << Xyce::section_divider << std::endl;
1341 " N_TIA_OneStep::saveOutputSolution" << std::endl;
1343 #endif // Xyce_DEBUG_TIME
1347 bool dointerp =
true;
1352 #ifdef Xyce_DEBUG_TIME
1353 Xyce::dout() << Xyce::section_divider << std::endl;
1354 #endif // Xyce_DEBUG_TIME
1368 #ifdef Xyce_DEBUG_TIME
1371 Xyce::dout() << std::endl;
1372 Xyce::dout() << Xyce::section_divider << std::endl;
1374 " N_TIA_OneStep::updateHistory" << std::endl;
1375 Xyce::dout() <<
"\n Before updates \n" << std::endl;
1378 Xyce::dout() <<
"\n xHistory["<< i <<
"]: \n" << std::endl;
1379 (
ds.
xHistory[i])->printPetraObject(Xyce::dout());
1380 Xyce::dout() << std::endl;
1384 Xyce::dout() <<
"\n qHistory["<< i <<
"]: \n" << std::endl;
1385 (
ds.
qHistory[i])->printPetraObject(Xyce::dout());
1386 Xyce::dout() << std::endl;
1390 Xyce::dout() <<
"\n sHistory["<< i <<
"]: \n" << std::endl;
1391 (
ds.
sHistory[i])->printPetraObject(Xyce::dout());
1392 Xyce::dout() << std::endl;
1394 Xyce::dout() << Xyce::section_divider << std::endl;
1396 #endif // Xyce_DEBUG_TIME
1402 #ifdef SEPARATE_F_AND_B
1423 #ifdef Xyce_DEBUG_TIME
1426 Xyce::dout() <<
"\n After updates \n" << std::endl;
1427 Xyce::dout() <<
"\n newtonCorrectionPtr: " << std::endl;
1429 Xyce::dout() <<
"\n qnewtonCorrectionPtr: " << std::endl;
1433 Xyce::dout() <<
"\n xHistory["<< i <<
"]: \n" << std::endl;
1434 (
ds.
xHistory[i])->printPetraObject(Xyce::dout());
1435 Xyce::dout() << std::endl;
1439 Xyce::dout() <<
"\n qHistory["<< i <<
"]: \n" << std::endl;
1440 (
ds.
qHistory[i])->printPetraObject(Xyce::dout());
1441 Xyce::dout() << std::endl;
1443 Xyce::dout() <<
"\n sNewtonCorrectionPtr: " << std::endl;
1445 Xyce::dout() << std::endl;
1446 Xyce::dout() <<
"\n nextStatePtr: " << std::endl;
1448 Xyce::dout() << std::endl;
1451 Xyce::dout() <<
"\n sHistory["<< i <<
"]: \n" << std::endl;
1452 (
ds.
sHistory[i])->printPetraObject(Xyce::dout());
1453 Xyce::dout() << std::endl;
1455 Xyce::dout() << Xyce::section_divider << std::endl;
1457 #endif // Xyce_DEBUG_TIME
1473 for (
int ip=0; ip<numParams;++ip)
1475 std::vector<N_LAS_Vector*> & dqdpHistory =
ds.
dqdpHistory[ip];
1476 std::vector<N_LAS_Vector*> & dXdpHistory =
ds.
dXdpHistory[ip];
1485 *(dXdpHistory[2]) = *(dXdpHistory[1]);
1486 #ifdef SEPARATE_F_AND_B
1487 (dqdpHistory[2])->linearCombo(1.0, nextDfdpVec, -1.0, nextDbdpVec);
1489 *(dqdpHistory[2]) = nextDfdpVec;
1493 (dXdpHistory[1])->linearCombo(1.0, nextDXdpVec, -1.0,*(dXdpHistory[0]));
1494 (dqdpHistory[1])->linearCombo(1.0, nextDqdpVec, -1.0,*(dqdpHistory[0]));
1496 *(dXdpHistory[0]) = nextDXdpVec;
1497 *(dqdpHistory[0]) = nextDqdpVec;
1500 Xyce::dout() <<
"dxdp history ip = " << ip <<
":\n";
1503 dXdpHistory[i]->printPetraObject(Xyce::dout());
1523 #ifdef Xyce_DEBUG_TIME
1526 Xyce::dout() << std::endl;
1527 Xyce::dout() << Xyce::section_divider << std::endl;
1529 " N_TIA_OneStep::restoreHistory" << std::endl;
1531 Xyce::dout() <<
"\n sec.psi_[i] = " <<
sec.
psi_[i] << std::endl;
1534 Xyce::dout() <<
"\n xHistory["<< i <<
"]: \n" << std::endl;
1535 (
ds.
xHistory[i])->printPetraObject(Xyce::dout());
1536 Xyce::dout() << std::endl;
1540 Xyce::dout() <<
"\n qHistory["<< i <<
"]: \n" << std::endl;
1541 (
ds.
qHistory[i])->printPetraObject(Xyce::dout());
1542 Xyce::dout() << std::endl;
1546 Xyce::dout() <<
"\n sHistory["<< i <<
"]: \n" << std::endl;
1547 (
ds.
sHistory[i])->printPetraObject(Xyce::dout());
1548 Xyce::dout() << std::endl;
1550 Xyce::dout() << Xyce::section_divider << std::endl;
1552 #endif // Xyce_DEBUG_TIME
1567 #ifdef Xyce_DEBUG_TIME
1570 Xyce::dout() << std::endl;
1571 Xyce::dout() << Xyce::section_divider << std::endl;
1572 Xyce::dout() <<
" N_TIA_OneStep::updateCoeffs" << std::endl;
1576 Xyce::dout() <<
" nscsco_ = " <<
sec.
nscsco_ << std::endl;
1577 Xyce::dout() <<
" psi_[0] = " <<
sec.
psi_[0] << std::endl;
1598 sec.
beta_[1] = temp1/temp2 + (temp1/temp2)*(temp1/temp2)/2;
1608 #ifdef Xyce_DEBUG_TIME
1611 Xyce::dout() <<
" nscsco_ = " <<
sec.
nscsco_ << std::endl;
1612 Xyce::dout() <<
" beta_[0] = " <<
sec.
beta_[0] << std::endl;
1613 Xyce::dout() <<
" beta_[1] = " <<
sec.
beta_[1] << std::endl;
1614 Xyce::dout() <<
" beta_[2] = " <<
sec.
beta_[2] << std::endl;
1615 Xyce::dout() <<
" beta_[3] = " <<
sec.
beta_[3] << std::endl;
1616 Xyce::dout() <<
" beta_[4] = " <<
sec.
beta_[4] << std::endl;
1617 Xyce::dout() <<
" alpha_[0] = " <<
sec.
alpha_[0] << std::endl;
1618 Xyce::dout() <<
" alpha_[1] = " <<
sec.
alpha_[1] << std::endl;
1619 Xyce::dout() <<
" alpha_[2] = " <<
sec.
alpha_[2] << std::endl;
1620 Xyce::dout() <<
" alpha_[3] = " <<
sec.
alpha_[3] << std::endl;
1621 Xyce::dout() <<
" alpha_[4] = " <<
sec.
alpha_[4] << std::endl;
1622 Xyce::dout() <<
" alphas_ = " <<
sec.
alphas_ << std::endl;
1623 Xyce::dout() <<
" alpha0_ = " <<
sec.
alpha0_ << std::endl;
1624 Xyce::dout() <<
" gamma_[0] = " <<
sec.
gamma_[0] << std::endl;
1625 Xyce::dout() <<
" gamma_[1] = " <<
sec.
gamma_[1] << std::endl;
1626 Xyce::dout() <<
" gamma_[2] = " <<
sec.
gamma_[2] << std::endl;
1627 Xyce::dout() <<
" gamma_[3] = " <<
sec.
gamma_[3] << std::endl;
1628 Xyce::dout() <<
" gamma_[4] = " <<
sec.
gamma_[4] << std::endl;
1629 Xyce::dout() <<
" psi_[0] = " <<
sec.
psi_[0] << std::endl;
1630 Xyce::dout() <<
" psi_[1] = " <<
sec.
psi_[1] << std::endl;
1631 Xyce::dout() <<
" psi_[2] = " <<
sec.
psi_[2] << std::endl;
1632 Xyce::dout() <<
" psi_[3] = " <<
sec.
psi_[3] << std::endl;
1633 Xyce::dout() <<
" psi_[4] = " <<
sec.
psi_[4] << std::endl;
1634 Xyce::dout() <<
" sigma_[0] = " <<
sec.
sigma_[0] << std::endl;
1635 Xyce::dout() <<
" sigma_[1] = " <<
sec.
sigma_[1] << std::endl;
1636 Xyce::dout() <<
" sigma_[2] = " <<
sec.
sigma_[2] << std::endl;
1637 Xyce::dout() <<
" sigma_[3] = " <<
sec.
sigma_[3] << std::endl;
1638 Xyce::dout() <<
" sigma_[4] = " <<
sec.
sigma_[4] << std::endl;
1639 Xyce::dout() <<
" ck_ = " <<
sec.
ck_ << std::endl;
1640 Xyce::dout() << Xyce::section_divider << std::endl;
1642 #endif // Xyce_DEBUG_TIME
1669 double currentTimeStep;
1675 currentTimeStep = 0.1 * time_to_stop;
1683 #ifdef Xyce_INCOMPLETE_2LEVEL_NORMS
1684 double dnorm_q = 0.0;
1708 if (rh>1.0) currentTimeStep = currentTimeStep/rh;
1733 #ifdef Xyce_VERBOSE_TIME
1736 Xyce::dout() <<
"ERROROPTION=1: DeltaT Grow = 2" <<
"\n" << std::endl;
1737 Xyce::dout() <<
"ERROROPTION=1: DeltaT Cut = 0.125" <<
"\n" << std::endl;
1738 Xyce::dout() <<
"ERROROPTION=1: NL MIN = " <<
tiaParams.
NLmin <<
"\n" << std::endl;
1739 Xyce::dout() <<
"ERROROPTION=1: NL MAX = " <<
tiaParams.
NLmax <<
"\n" << std::endl;
1740 Xyce::dout() <<
"ERROROPTION=1: DELMAX = " <<
sec.
maxTimeStep <<
"\n" << std::endl;
1742 #endif //Xyce_VERBOSE_TIME
1754 #ifdef SEPARATE_F_AND_B
1780 #ifdef Xyce_DEBUG_TIME
1783 Xyce::dout() << std::endl;
1784 Xyce::dout() << Xyce::section_divider << std::endl;
1786 " N_TIA_OneStep::initialize" << std::endl;
1787 Xyce::dout() <<
"\n xHistory: \n" << std::endl;
1788 (
ds.
xHistory[0])->printPetraObject(Xyce::dout());
1789 Xyce::dout() << std::endl;
1790 (
ds.
xHistory[1])->printPetraObject(Xyce::dout());
1791 Xyce::dout() << std::endl;
1792 Xyce::dout() <<
"\n qHistory: \n" << std::endl;
1793 (
ds.
qHistory[0])->printPetraObject(Xyce::dout());
1794 Xyce::dout() << std::endl;
1795 (
ds.
qHistory[1])->printPetraObject(Xyce::dout());
1796 Xyce::dout() << std::endl;
1797 Xyce::dout() <<
"\n sHistory: \n" << std::endl;
1798 (
ds.
sHistory[0])->printPetraObject(Xyce::dout());
1799 Xyce::dout() << std::endl;
1800 (
ds.
sHistory[1])->printPetraObject(Xyce::dout());
1801 Xyce::dout() << std::endl;
1802 Xyce::dout() <<
"\n" <<
"currentTimeStep = " << currentTimeStep <<
"\n" << std::endl;
1803 Xyce::dout() <<
"\n" <<
"time_to_stop = " << time_to_stop <<
"\n" << std::endl;
1804 Xyce::dout() << Xyce::section_divider << std::endl;
1806 #endif // Xyce_DEBUG_TIME
1822 for (
int ip=0; ip<numParams;++ip)
1824 std::vector<N_LAS_Vector*> & dqdpHistory =
ds.
dqdpHistory[ip];
1825 std::vector<N_LAS_Vector*> & dXdpHistory =
ds.
dXdpHistory[ip];
1836 *(dXdpHistory[0]) = *(currDxdpPtr);
1837 (dXdpHistory[1])->putScalar(0.0);
1840 *(dqdpHistory[0]) = dqdpVec;
1841 #ifdef SEPARATE_F_AND_B
1842 (dqdpHistory[1])->linearCombo(1.0, *(dfdpVec), -1.0, *(dbdpVec));
1844 *(dqdpHistory[1]) = dfdpVec;
1862 double time_to_stop = sec.stopTime - sec.currentTime;
1866 *(ds.xHistory[0]) = *(ds.currSolutionPtr);
1867 (ds.xHistory[1])->putScalar(0.0);
1870 *(ds.qHistory[0]) = *(ds.daeQVectorPtr);
1871 #ifdef SEPARATE_F_AND_B
1872 (ds.qHistory[1])->linearCombo(1.0, *(ds.daeFVectorPtr), -1.0, *(ds.daeBVectorPtr));
1874 *(ds.qHistory[1]) = *(ds.daeFVectorPtr);
1876 (ds.qHistory[1])->scale(-sec.currentTimeStep);
1879 *(ds.sHistory[0]) = *(ds.nextStatePtr);
1880 (ds.sHistory[1])->putScalar(0.0);
1883 sec.numberOfSteps_ = 0;
1885 sec.psi_[0] = sec.currentTimeStep;
1886 sec.cj_ = 1/sec.psi_[0];
1927 #ifdef Xyce_DEBUG_TIME
1930 Xyce::dout() << std::endl;
1931 Xyce::dout() << Xyce::section_divider << std::endl;
1932 Xyce::dout() <<
" N_TIA_OneStep::rejectStep" << std::endl;
1961 std::string msg =
"N_TIA_OneStep::rejectStep: ";
1962 msg +=
" Maximum number of local error test failures. ";
1963 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
1986 #ifndef Xyce_USE_Q_NORM
2010 #ifdef Xyce_DEBUG_TIME
2016 Xyce::dout() <<
" nscsco_ = " <<
sec.
nscsco_ << std::endl;
2017 Xyce::dout() <<
" alpha_[0] = " <<
sec.
alpha_[0] << std::endl;
2018 Xyce::dout() <<
" alpha_[1] = " <<
sec.
alpha_[1] << std::endl;
2019 Xyce::dout() <<
" alpha_[2] = " <<
sec.
alpha_[2] << std::endl;
2020 Xyce::dout() <<
" alpha_[3] = " <<
sec.
alpha_[3] << std::endl;
2021 Xyce::dout() <<
" alpha_[4] = " <<
sec.
alpha_[4] << std::endl;
2022 Xyce::dout() <<
" psi_[0] = " <<
sec.
psi_[0] << std::endl;
2023 Xyce::dout() <<
" psi_[1] = " <<
sec.
psi_[1] << std::endl;
2024 Xyce::dout() <<
" psi_[2] = " <<
sec.
psi_[2] << std::endl;
2025 Xyce::dout() <<
" psi_[3] = " <<
sec.
psi_[3] << std::endl;
2026 Xyce::dout() <<
" psi_[4] = " <<
sec.
psi_[4] << std::endl;
2027 Xyce::dout() <<
" sigma_[0] = " <<
sec.
sigma_[0] << std::endl;
2028 Xyce::dout() <<
" sigma_[1] = " <<
sec.
sigma_[1] << std::endl;
2029 Xyce::dout() <<
" sigma_[2] = " <<
sec.
sigma_[2] << std::endl;
2030 Xyce::dout() <<
" sigma_[3] = " <<
sec.
sigma_[3] << std::endl;
2031 Xyce::dout() <<
" sigma_[4] = " <<
sec.
sigma_[4] << std::endl;
2032 Xyce::dout() <<
" rr = " << rr << std::endl;
2033 Xyce::dout() <<
" r_factor_ = " <<
sec.
r_factor_ << std::endl;
2034 Xyce::dout() <<
" r_safety_ = " <<
sec.
r_safety_ << std::endl;
2035 Xyce::dout() <<
" Est_ = " <<
sec.
Est_ << std::endl;
2036 Xyce::dout() <<
" nef_ = " <<
sec.
nef_ << std::endl;
2037 Xyce::dout() <<
" r_fudge_ = " <<
sec.
r_fudge_ << std::endl;
2038 Xyce::dout() <<
" newOrder_ = " <<
sec.
newOrder_ << std::endl;
2040 Xyce::dout() <<
" newTimeStep_ = " << newTimeStep_ << std::endl;
2042 #endif // Xyce_DEBUG_TIME
2047 std::string tmp =
" OneStep:rejectStep: Warning: Local error test failed with constant step-size.\n";
2048 Xyce::dout() << tmp << std::endl;
2071 #ifdef Xyce_DEBUG_TIME
2074 Xyce::dout() <<
" newTimeStep_ = " << newTimeStep_ << std::endl;
2075 Xyce::dout() <<
" nextTime = " <<
sec.
nextTime << std::endl;
2077 #endif // Xyce_DEBUG_TIME
2096 #ifdef Xyce_DEBUG_TIME
2099 Xyce::dout() << Xyce::section_divider << std::endl;
2101 #endif // Xyce_DEBUG_TIME
2135 #ifdef Xyce_DEBUG_TIME
2138 Xyce::dout() << std::endl;
2139 Xyce::dout() << Xyce::section_divider << std::endl;
2141 Xyce::dout() <<
" N_TIA_OneStep::completeStep" << std::endl;
2167 #ifdef Xyce_DEBUG_TIME
2171 Xyce::dout() <<
" rr = " << rr << std::endl;
2173 Xyce::dout() <<
" currentTime = " <<
sec.
currentTime << std::endl;
2174 Xyce::dout() <<
" nextTime = " <<
sec.
nextTime << std::endl;
2175 Xyce::dout() <<
" newTimeStep_ = " << newTimeStep_ << std::endl;
2176 Xyce::dout() <<
" minTimeStep = " <<
sec.
minTimeStep << std::endl;
2177 Xyce::dout() <<
" maxTimeStep = " <<
sec.
maxTimeStep << std::endl;
2226 #ifdef Xyce_DEBUG_TIME
2230 Xyce::dout() <<
" r_safety = " <<
sec.
r_safety_ << std::endl;
2231 Xyce::dout() <<
" r_fudge_ = " <<
sec.
r_fudge_ << std::endl;
2232 Xyce::dout() <<
" r_hincr_ = " <<
sec.
r_hincr_ << std::endl;
2234 Xyce::dout() <<
" Est = " <<
sec.
Est_ << std::endl;
2235 Xyce::dout() <<
" raw rr = " << rr << std::endl;
2286 #ifdef Xyce_DEBUG_TIME
2289 Xyce::dout() <<
" nextTime = " <<
sec.
nextTime << std::endl;
2290 Xyce::dout() <<
" newTimeStep_ = " << newTimeStep_ << std::endl;
2315 #ifdef Xyce_DEBUG_TIME
2318 Xyce::dout() << Xyce::section_divider << std::endl;
2348 #ifdef Xyce_DEBUG_TIME
2351 Xyce::dout() <<
"\n next state Ptr: \n" << std::endl;
2353 Xyce::dout() << std::endl;
2355 Xyce::dout() <<
"\n sn0: \n" << std::endl;
2356 ds.
sn0Ptr->printPetraObject(Xyce::dout());
2357 Xyce::dout() << std::endl;
2359 Xyce::dout() <<
"\n next State Deriv: \n" << std::endl;
2361 Xyce::dout() << std::endl;
2390 #ifdef Xyce_DEBUG_TIME
2393 Xyce::dout() <<
"\n next store Ptr: \n" << std::endl;
2395 Xyce::dout() << std::endl;
2431 #ifdef Xyce_DEBUG_TIME
2432 Xyce::dout() << tle;