46 #include <Xyce_config.h>
59 #include <N_ERH_ErrorMgr.h>
60 #include <N_IO_CmdParse.h>
61 #include <N_UTL_Diagnostic.h>
62 #include <N_UTL_FeatureTest.h>
63 #include <N_UTL_OptionBlock.h>
64 #include <N_UTL_MachDepParams.h>
98 testJac_absTol(1.0e-8),
99 testJac_SqrtEta(1.0e-8),
100 deviceSens_dp(1.0e-8),
104 numericalJacobianFlag (false),
105 testJacobianFlag (false),
107 testJacStopStep(Util::MachineDependentParams::IntMax()),
109 testJacDeviceName(
""),
110 testJacDeviceNameGiven( false ),
111 voltageLimiterFlag (true),
113 icMultiplier (10000.0),
114 defaultMaxTimeStep (1.0e99),
117 numGainScaleBlocks(1),
118 staggerGainScale(false),
119 randomizeVgstConst(false),
126 zeroResistanceTol(1.0e-100),
127 checkForZeroResistance(true),
128 debugMinTimestep (0),
129 debugMaxTimestep (Util::MachineDependentParams::IntMax()),
131 debugMaxTime (Util::MachineDependentParams::DoubleMax()),
133 #ifndef Xyce_NEW_EXCESS_PHASE
134 newExcessPhase (false),
135 defaultNewExcessPhase (false),
137 newExcessPhase (true),
138 defaultNewExcessPhase (true),
140 excessPhaseScalar1 (1.0),
141 excessPhaseScalar2 (1.0),
143 tryToCompact (false),
144 calculateAllLeadCurrents (false),
169 Util::ParamList::const_iterator iter = OB.begin();
170 Util::ParamList::const_iterator end = OB.end();
172 for ( ; iter != end; ++iter)
174 std::string tag(iter->uTag());
176 if (tag ==
"DEFAD")
defad = iter->getImmutableValue<
double>();
177 else if (tag ==
"DEFAS")
defas = iter->getImmutableValue<
double>();
178 else if (tag ==
"DEFL")
defl = iter->getImmutableValue<
double>();
179 else if (tag ==
"DEFW")
defw = iter->getImmutableValue<
double>();
180 else if (tag ==
"ABSTOL")
abstol = iter->getImmutableValue<
double>();
181 else if (tag ==
"RELTOL")
reltol = iter->getImmutableValue<
double>();
182 else if (tag ==
"CHGTOL")
chgtol = iter->getImmutableValue<
double>();
183 else if (tag ==
"GMIN")
gmin = iter->getImmutableValue<
double>();
184 else if (tag ==
"GMINSCALAR")
gmin_scalar = iter->getImmutableValue<
double>();
185 else if (tag ==
"GMAX")
gmax = iter->getImmutableValue<
double>();
186 else if (tag ==
"TJRELTOL")
testJac_relTol = iter->getImmutableValue<
double>();
187 else if (tag ==
"TJABSTOL")
testJac_absTol = iter->getImmutableValue<
double>();
188 else if (tag ==
"TJSQRTETA")
testJac_SqrtEta = iter->getImmutableValue<
double>();
189 else if (tag ==
"SENSDP")
deviceSens_dp = iter->getImmutableValue<
double>();
190 else if (tag ==
"TNOM")
tnom = iter->getImmutableValue<
double>()+
CONSTCtoK;
191 else if (tag ==
"TEMP")
194 if ( !iter->isTimeDependent() )
temp.setVal(iter->getImmutableValue<
double>()+
CONSTCtoK);
195 else {
temp.setVal( iter->stringValue() );
temp.setTimeDependent(
true ); }
197 else if (tag ==
"SCALESRC")
scale_src = iter->getImmutableValue<
double>();
198 else if (tag ==
"NUMJAC")
200 else if (tag ==
"TESTJAC")
202 else if (tag ==
"TESTJACSTARTSTEP")
204 else if (tag ==
"TESTJACSTOPSTEP")
206 else if (tag ==
"TESTJACWARN")
207 testJacWarn =
static_cast<bool> (iter->getImmutableValue<
int>());
208 else if (tag ==
"TESTJACDEVICENAME")
213 else if (tag ==
"VOLTLIM")
215 else if (tag ==
"LAMBERTW")
lambertWFlag =
static_cast<int>(iter->getImmutableValue<
int>());
216 else if (tag ==
"ICFAC" )
icMultiplier = iter->getImmutableValue<
double>();
217 else if (tag ==
"MAXTIMESTEP" )
defaultMaxTimeStep = iter->getImmutableValue<
double>();
219 else if (tag ==
"VDSSCALEMIN" )
vdsScaleMin = iter->getImmutableValue<
double>();
220 else if (tag ==
"VGSTCONST" )
vgstConst = iter->getImmutableValue<
double>();
221 else if (tag ==
"NUMGAINSCALEBLOCKS" )
223 else if (tag ==
"STAGGERGAINSCALE")
225 else if (tag ==
"RANDOMIZEVGSTCONST")
227 else if (tag ==
"LENGTH0" )
length0 = iter->getImmutableValue<
double>();
228 else if (tag ==
"WIDTH0" )
width0 = iter->getImmutableValue<
double>();
229 else if (tag ==
"TOX0" )
tox0 = iter->getImmutableValue<
double>();
230 else if (tag ==
"MINRES" )
minRes = iter->getImmutableValue<
double>();
231 else if (tag ==
"MINCAP" )
minCap = iter->getImmutableValue<
double>();
232 else if (tag ==
"NEWMEYER" )
234 else if (tag ==
"SENSDEBUGLEVEL")
236 setSensitivityDebugLevel(iter->getImmutableValue<
int>());
238 else if (tag ==
"DEBUGLEVEL")
240 setDeviceDebugLevel(iter->getImmutableValue<
int>());
242 else if (tag ==
"VERBOSELEVEL")
246 else if (tag ==
"DEBUGMINTIMESTEP")
250 else if (tag ==
"DEBUGMAXTIMESTEP")
254 else if (tag ==
"DEBUGMINTIME")
258 else if (tag ==
"DEBUGMAXTIME")
262 else if (tag ==
"NEWEXCESSPHASE")
264 newExcessPhase =
static_cast<bool> (iter->getImmutableValue<
int>());
266 else if (tag ==
"EXCESSPHASESCALAR1")
270 else if (tag ==
"EXCESSPHASESCALAR2")
274 else if (tag ==
"ZERORESISTANCETOL")
278 else if (tag ==
"CHECKFORZERORESISTANCE")
282 else if (tag ==
"RANDOMSEED" )
284 randomSeed = (iter->getImmutableValue<
long>());
286 else if (tag ==
"TRYTOCOMPACT")
288 tryToCompact =
static_cast<bool> (iter->getImmutableValue<
int>());
290 else if (tag ==
"CALCULATEALLLEADCURRENTS")
296 Report::UserError0() << tag <<
" is not a recognized device package option.";
303 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
304 dout() << *
this << std::endl;
321 const IO::CmdParse & command_line)
360 setSensitivityDebugLevel(0);
361 setDeviceDebugLevel(1);
372 if( command_line.getArgumentValue(
"-dva" ) ==
"off" )
374 lout() <<
"Warning: -dva is no longer a recognized option.\n" << std::endl;
377 if( command_line.getArgumentValue(
"-dma" ) ==
"off" )
379 lout() <<
"Warning: -dma is no longer a recognized option.\n" << std::endl;
396 const IO::CmdParse & command_line)
399 IO::setSensitivityDebugLevel(command_line, 0);
400 IO::setDeviceDebugLevel(command_line, 1);
403 if (command_line.argExists(
"-jacobian_test"))
421 os <<
"\n\n-----------------------------------------" << std::endl
422 <<
"\tDevice Options:\n"
423 <<
"\t\tdefad = " << devOp.
defad <<
"\n"
424 <<
"\t\tdefas = " << devOp.
defas <<
"\n"
425 <<
"\t\tdefl = " << devOp.
defl <<
"\n"
426 <<
"\t\tdefw = " << devOp.
defw <<
"\n"
427 <<
"\t\tabstol = " << devOp.
abstol <<
"\n"
428 <<
"\t\treltol = " << devOp.
reltol <<
"\n"
429 <<
"\t\tchgtol = " << devOp.
chgtol <<
"\n"
430 <<
"\t\tgmin = " << devOp.
gmin <<
"\n"
431 <<
"\t\tgmin_orig = " << devOp.
gmin_orig <<
"\n"
432 <<
"\t\tgmin_init = " << devOp.
gmin_init <<
"\n"
433 <<
"\t\tgmin_scalar = " << devOp.
gmin_scalar <<
"\n"
434 <<
"\t\tgmax = " << devOp.
gmax <<
"\n"
435 <<
"\t\ttnom = " << devOp.
tnom <<
"\n"
436 <<
"\t\tscale_src = " << devOp.
scale_src <<
"\n"
441 <<
"\t\ttestJacWarn = " << devOp.
testJacWarn <<
"\n"
453 <<
"\t\tvdsScaleMin = " << devOp.
vdsScaleMin <<
"\n"
454 <<
"\t\tvgstConst = " << devOp.
vgstConst <<
"\n"
458 <<
"\t\tlength0 = " << devOp.
length0 <<
"\n"
459 <<
"\t\twidth0 = " << devOp.
width0 <<
"\n"
460 <<
"\t\ttox0 = " << devOp.
tox0 <<
"\n"
461 <<
"\t\tminres = " << devOp.
minRes <<
"\n"
462 <<
"\t\tmincap = " << devOp.
minCap <<
"\n"
473 << Xyce::section_divider
double excessPhaseScalar2
bool setupDefaultOptions(const IO::CmdParse &command_line)
Pure virtual class to augment a linear system.
double excessPhaseScalar1
bool calculateAllLeadCurrents
double defaultMaxTimeStep
bool checkForZeroResistance
bool applyCmdLineOptions(const IO::CmdParse &command_line)
bool registerOptions(const Util::OptionBlock &OB)
bool numericalJacobianFlag
bool testJacDeviceNameGiven
std::string testJacDeviceName
bool defaultNewExcessPhase
std::ostream & operator<<(std::ostream &os, const Configuration &configuration)