38 #include <Xyce_config.h>
45 #include <N_ERH_Message.h>
48 #include <N_UTL_Timer.h>
63 #ifdef Xyce_DEBUG_ANALYSIS
66 Xyce::dout() <<
"In Step::setAnalysisParams" << std::endl;
70 Util::ParameterList::const_iterator it_tp;
71 Util::ParameterList::const_iterator it_param;
72 Util::ParameterList::const_iterator it_type;
73 Util::ParameterList::const_iterator first = paramsBlock.getParams().begin();
74 Util::ParameterList::const_iterator last = paramsBlock.getParams().end();
81 for (it_tp = first; it_tp != last; ++it_tp)
83 if (it_tp->uTag() ==
"PARAM")
90 Report::UserError() <<
"More than one step parameter has been specified on a single line." << std::endl
91 <<
"Each parameter needs its own line.";
96 #ifdef Xyce_DEBUG_ANALYSIS
99 for (it_tp = first; it_tp != last; ++it_tp)
101 Xyce::dout() << it_tp->uTag() ;
102 Xyce::dout() <<
"\t";
103 if (it_tp->uTag() ==
"PARAM" || it_tp->uTag() ==
"TYPE")
105 Xyce::dout() << it_tp->stringValue();
109 Xyce::dout() << it_tp->getImmutableValue<
double>();
111 Xyce::dout() << std::endl;
116 for (it_tp = first; it_tp != last; ++it_tp)
118 if (it_tp->uTag() ==
"TYPE")
121 sp.
type = it_tp->stringValue();
124 if (it_tp->uTag() ==
"PARAM")
127 sp.
name = it_tp->stringValue();
133 if (sp.
type ==
"LIN")
135 sp.
startVal = it_tp->getImmutableValue<
double>(); ++it_tp;
136 sp.
stopVal = it_tp->getImmutableValue<
double>(); ++it_tp;
137 sp.
stepVal = it_tp->getImmutableValue<
double>(); ++it_tp;
139 else if (sp.
type ==
"DEC" || sp.
type ==
"OCT")
141 sp.
startVal = it_tp->getImmutableValue<
double>(); ++it_tp;
142 sp.
stopVal = it_tp->getImmutableValue<
double>(); ++it_tp;
143 sp.
numSteps = it_tp->getImmutableValue<
int>(); ++it_tp;
145 else if (sp.
type ==
"LIST")
147 for (;it_tp!=last;++it_tp)
149 sp.
valList.push_back(it_tp->getImmutableValue<
double>());
154 Report::UserError() <<
"Unsupported STEP type";
188 bool bsuccess =
true;
205 #ifdef Xyce_DEBUG_ANALYSIS
208 Xyce::dout() << std::endl << std::endl;
209 Xyce::dout() << section_divider << std::endl;
210 Xyce::dout() <<
"Step::init" << std::endl;
218 analysisManager_.setStepLoopInitialized(
true);
235 bool integration_status =
true;
241 #ifdef Xyce_DEBUG_ANALYSIS
245 std::vector <SweepParam>::iterator iterParam;
246 std::vector <SweepParam>::iterator firstParam =
stepParamVec_.begin();
247 std::vector <SweepParam>::iterator lastParam =
stepParamVec_.end ();
248 for (iterParam=firstParam; iterParam != lastParam;++iterParam)
251 Xyce::dout() << (*iterParam);
266 *(analysisManager_.getTIADataStore()->currSolutionPtr),
267 *(analysisManager_.getTIADataStore()->currStatePtr),
268 *(analysisManager_.getTIADataStore()->currStorePtr) );
272 return integration_status;