38 #include <Xyce_config.h>
57 #ifdef Xyce_DEBUG_ANALYSIS
60 Xyce::dout() <<
"In Step::setAnalysisParams" << std::endl;
64 std::list<N_UTL_Param>::const_iterator it_tp;
65 std::list<N_UTL_Param>::const_iterator it_param;
66 std::list<N_UTL_Param>::const_iterator it_type;
67 std::list<N_UTL_Param>::const_iterator first = paramsBlock.getParams().begin();
68 std::list<N_UTL_Param>::const_iterator last = paramsBlock.getParams().end();
75 for (it_tp = first; it_tp != last; ++it_tp)
77 if (it_tp->uTag() ==
"PARAM")
84 msg =
"Step::setSTEPAnalysisParams\n";
85 msg +=
"You have more than one step parameter on a single line.\n";
86 msg +=
"Each parameter needs its own line.\n";
87 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
91 #ifdef Xyce_DEBUG_ANALYSIS
94 for (it_tp = first; it_tp != last; ++it_tp)
96 Xyce::dout() << it_tp->uTag() ;
98 if (it_tp->uTag() ==
"PARAM" || it_tp->uTag() ==
"TYPE")
100 Xyce::dout() << it_tp->stringValue();
104 Xyce::dout() << it_tp->getImmutableValue<
double>();
106 Xyce::dout() << std::endl;
111 for (it_tp = first; it_tp != last; ++it_tp)
113 if (it_tp->uTag() ==
"TYPE")
116 sp.
type = it_tp->stringValue();
119 if (it_tp->uTag() ==
"PARAM")
122 sp.
name = it_tp->stringValue();
128 if (sp.
type ==
"LIN")
130 sp.
startVal = it_tp->getImmutableValue<
double>(); ++it_tp;
131 sp.
stopVal = it_tp->getImmutableValue<
double>(); ++it_tp;
132 sp.
stepVal = it_tp->getImmutableValue<
double>(); ++it_tp;
134 else if (sp.
type ==
"DEC" || sp.
type ==
"OCT")
136 sp.
startVal = it_tp->getImmutableValue<
double>(); ++it_tp;
137 sp.
stopVal = it_tp->getImmutableValue<
double>(); ++it_tp;
138 sp.
numSteps = it_tp->getImmutableValue<
int>(); ++it_tp;
140 else if (sp.
type ==
"LIST")
142 for (;it_tp!=last;++it_tp)
144 sp.
valList.push_back(it_tp->getImmutableValue<
double>());
149 msg =
"Step::setSTEPAnalysisParams: ";
150 msg +=
" unsupported STEP type\n";
151 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
155 (*stepParamVec_).push_back(sp);
178 bool bsuccess =
true;
195 #ifdef Xyce_DEBUG_ANALYSIS
198 Xyce::dout() << std::endl << std::endl;
199 Xyce::dout() << section_divider << std::endl;
200 Xyce::dout() <<
"Step::init" << std::endl;
225 bool integration_status =
true;
231 #ifdef Xyce_DEBUG_ANALYSIS
235 std::vector <SweepParam>::iterator iterParam;
236 std::vector <SweepParam>::iterator firstParam =
stepParamVec_->begin();
237 std::vector <SweepParam>::iterator lastParam =
stepParamVec_->end ();
238 for (iterParam=firstParam; iterParam != lastParam;++iterParam)
241 Xyce::dout() << (*iterParam);
260 return integration_status;