46 #include <Xyce_config.h>
53 #include <N_ERH_ErrorMgr.h>
56 #include <N_UTL_Param.h>
57 #include <N_UTL_OptionBlock.h>
59 #include <N_IO_CmdParse.h>
76 #ifdef Xyce_VERBOSE_NONLINEAR
77 printParamsFlag_(true),
79 #ifdef Xyce_DEBUG_NONLINEAR
82 debugMaxTimeStep_(N_UTL_MachineDependentParams::IntMax()),
84 debugMaxTime_(N_UTL_MachineDependentParams::DoubleMax()),
85 screenOutputFlag_(false),
167 : commandLine_(right.commandLine_),
168 absTol_(right.absTol_),
169 relTol_(right.relTol_),
170 INForcingFlag_(right.INForcingFlag_),
172 normLevel_(right.normLevel_),
173 linearOptimization_(right.linearOptimization_),
174 modeToggled_(right.modeToggled_),
175 #ifdef Xyce_VERBOSE_NONLINEAR
176 printParamsFlag_(right.printParamsFlag_),
178 analysisMode_(right.analysisMode_),
179 maxNewtonStep_(right.maxNewtonStep_),
180 maxSearchStep_(right.maxSearchStep_),
181 nlStrategy_(right.nlStrategy_),
182 searchMethod_(right.searchMethod_),
183 direction_(right.direction_),
184 deltaXTol_(right.deltaXTol_),
185 RHSTol_(right.RHSTol_),
186 constraintBT_(right.constraintBT_),
187 globalBTMax_(right.globalBTMax_),
188 globalBTMin_(right.globalBTMin_),
189 globalBTChange_(right.globalBTChange_)
190 #ifdef Xyce_DEBUG_NONLINEAR
192 debugLevel_(right.debugLevel_),
193 debugMinTimeStep_(right.debugMinTimeStep_),
194 debugMaxTimeStep_(right.debugMaxTimeStep_),
195 debugMinTime_(right.debugMinTime_),
196 debugMaxTime_(right.debugMaxTime_)
230 for (std::list<N_UTL_Param>::const_iterator it_tpL = OB.getParams().begin();
231 it_tpL != OB.getParams().end(); ++ it_tpL)
233 if (it_tpL->uTag() ==
"ABSTOL")
235 setAbsTol(it_tpL->getImmutableValue<
double>());
237 else if (it_tpL->uTag() ==
"RELTOL")
239 setRelTol(it_tpL->getImmutableValue<
double>());
241 else if (it_tpL->uTag() ==
"DELTAXTOL")
245 else if (it_tpL->uTag() ==
"SMALLUPDATETOL")
249 else if (it_tpL->uTag() ==
"ENFORCEDEVICECONV")
253 else if (it_tpL->uTag() ==
"RHSTOL")
255 setRHSTol(it_tpL->getImmutableValue<
double>());
257 else if (it_tpL->uTag() ==
"MAXSTEP")
261 else if (it_tpL->uTag() ==
"LINOPT")
265 else if (it_tpL->uTag() ==
"CONSTRAINTBT")
269 else if (it_tpL->uTag() ==
"CONSTRAINTMAX")
273 else if (it_tpL->uTag() ==
"CONSTRAINTMIN")
277 else if (it_tpL->uTag() ==
"CONSTRAINTCHANGE")
281 else if (it_tpL->uTag() ==
"NLSTRATEGY")
285 else if (it_tpL->uTag() ==
"SEARCHMETHOD")
289 else if (it_tpL->uTag() ==
"MAXSEARCHSTEP")
293 else if (it_tpL->uTag() ==
"IN_FORCING")
297 else if (it_tpL->uTag() ==
"NORMLVL")
301 else if (it_tpL->uTag() ==
"NOX")
305 else if (it_tpL->uTag() ==
"MATRIXMARKET")
307 #ifdef Xyce_DEBUG_NONLINEAR
308 setMMFormat (static_cast<bool>(it_tpL->getImmutableValue<
double>()));
311 else if (it_tpL->uTag() ==
"DEBUGLEVEL")
313 #ifdef Xyce_DEBUG_NONLINEAR
317 else if (it_tpL->uTag() ==
"DEBUGMINTIMESTEP")
319 #ifdef Xyce_DEBUG_NONLINEAR
323 else if (it_tpL->uTag() ==
"DEBUGMAXTIMESTEP")
325 #ifdef Xyce_DEBUG_NONLINEAR
329 else if (it_tpL->uTag() ==
"DEBUGMINTIME")
331 #ifdef Xyce_DEBUG_NONLINEAR
335 else if (it_tpL->uTag() ==
"DEBUGMAXTIME")
337 #ifdef Xyce_DEBUG_NONLINEAR
341 else if (it_tpL->uTag() ==
"SCREENOUTPUT")
343 #ifdef Xyce_DEBUG_NONLINEAR
349 std::string tmp = it_tpL->uTag() +
350 " is not a recognized nonlinear solver option.\n";
351 N_ERH_ErrorMgr::report (N_ERH_ErrorMgr::USR_FATAL_0, tmp);
370 os <<
"\n" << std::endl
371 << Xyce::section_divider << std::endl;
372 os <<
"\n***** Nonlinear solver options:\n" << std::endl
381 os <<
"\tAnalysis Mode:\t\t" <<
analysisMode_ <<
"\t(DC Op)" << std::endl;
383 os <<
"\tAnalysis Mode:\t\t" <<
analysisMode_ <<
"\t(DC Sweep)" << std::endl;
385 os <<
"\tAnalysis Mode:\t\t" <<
analysisMode_ <<
"\t(Transient)" << std::endl;
389 os <<
"\tNL Strategy:\t\t" << strategy <<
"\t(None => Newton)" << std::endl;
391 os <<
"\tNL Strategy:\t\t" << strategy <<
"\t(Gradient)" << std::endl;
393 os <<
"\tNL Strategy:\t\t" << strategy <<
"\t(Newton/Gradient)" << std::endl;
395 os <<
"\tNL Strategy:\t\t" << strategy <<
"\t(Modified-Newton)" << std::endl;
397 os <<
"\tNL Strategy:\t\t" << strategy <<
"\t(Modified-Newton/Gradient)" << std::endl;
400 if (searchMethod ==
FULL)
401 os <<
"\tsearch method:\t\t" << searchMethod <<
"\t(None => Full Newton Steps)" << std::endl;
403 else if (searchMethod ==
DIVIDE)
404 os <<
"\tsearch method:\t\t" << searchMethod <<
"\t(Divide)" << std::endl;
407 os <<
"\tsearch method:\t\t" << searchMethod <<
"\t(Backtrack)" << std::endl;
410 os <<
"\tsearch method:\t\t" << searchMethod <<
"\t(Simple Backtrack)" << std::endl;
413 os <<
"\tsearch method:\t\t" << searchMethod <<
"\t(Bank and Rose Algorithm)" << std::endl;
415 else if (searchMethod ==
DESCENT)
416 os <<
"\tsearch method:\t\t" << searchMethod <<
"\t(Line Search)" << std::endl;
423 #ifdef Xyce_DEBUG_NONLINEAR
428 << Xyce::section_divider <<
"\n" << std::endl;
464 #ifdef Xyce_DEBUG_NONLINEAR
487 #ifdef Xyce_DEBUG_NONLINEAR