46 #include <Xyce_config.h>
59 #include <N_ERH_ErrorMgr.h>
60 #include <N_ERH_Message.h>
61 #include <N_UTL_Param.h>
62 #include <N_PDS_fwd.h>
63 #include <N_UTL_OptionBlock.h>
75 #include <N_LAS_Builder.h>
76 #include <N_LAS_System.h>
77 #include <N_LAS_QueryUtil.h>
78 #include <Epetra_MapColoring.h>
80 #include <N_UTL_ExtendedString.h>
81 #include <N_UTL_FeatureTest.h>
82 #include <N_UTL_MachDepParams.h>
97 allParams_(Teuchos::rcp(new Teuchos::ParameterList)),
98 noxParams_(allParams_->sublist(
"NOX")),
99 locaParams_(allParams_->sublist(
"LOCA")),
100 debugParams_(allParams_->sublist(
"DEBUG")),
101 comboPtr_(Teuchos::rcp(new
NOX::StatusTest::Combo(
NOX::StatusTest::Combo::OR))),
103 isStatusTestsSet_(false),
104 continuationSpecified_(false),
107 voltageListType_(VLT_None),
108 gstepping_minimum_conductance_(0.0),
109 savedLocaOptions_(false),
111 debugMinTimeStep_(0),
112 debugMaxTimeStep_(Util::MachineDependentParams::IntMax()),
114 debugMaxTime_(Util::MachineDependentParams::DoubleMax()),
115 screenOutputFlag_(false),
117 voltageScaleFactor_(1.0)
123 #ifdef Xyce_VERBOSE_NOX
125 .set(
"Output Information",
127 NOX::Utils::Warning +
128 NOX::Utils::OuterIteration +
129 NOX::Utils::OuterIterationStatusTest +
130 NOX::Utils::InnerIteration +
131 NOX::Utils::Details +
132 NOX::Utils::StepperIteration +
133 NOX::Utils::StepperDetails +
134 NOX::Utils::Parameters
138 if (VERBOSE_NONLINEAR)
140 .set(
"Output Information",
142 NOX::Utils::Warning +
143 NOX::Utils::OuterIteration +
144 NOX::Utils::StepperIteration
148 .set(
"Output Information", NOX::Utils::Error);
151 .set(
"Output Stream", Teuchos::RCP<std::ostream>(&dout(),
false));
163 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
164 noxParams_.sublist(
"Line Search").set(
"Method",
"Full Step");
173 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
174 noxParams_.sublist(
"Line Search").set(
"Method",
"Full Step");
182 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
183 noxParams_.sublist(
"Line Search").set(
"Method",
"Full Step");
184 noxParams_.sublist(
"Direction").sublist(
"Newton")
185 .sublist(
"Linear Solver").set(
"Tolerance", 1.0e-12);
190 noxParams_.sublist(
"Line Search").sublist(
"Polynomial")
191 .set(
"Recovery Step Type",
"Last Computed Step");
195 Teuchos::ParameterList& stepperList =
locaParams_.sublist(
"Stepper");
196 Teuchos::ParameterList& predictorList =
locaParams_.sublist(
"Predictor");
197 Teuchos::ParameterList& stepSizeList =
locaParams_.sublist(
"Step Size");
199 stepperList.set(
"Continuation Method",
"Natural");
200 stepperList.set(
"Skip df/dp",
true);
201 predictorList.set(
"Method",
"Tangent");
247 noxParams_.sublist(
"Printing").set(
"MyPID", myPID);
248 noxParams_.sublist(
"Printing").set(
"Output Processor",
250 locaParams_.sublist(
"Utilities").set(
"MyPID", myPID);
251 locaParams_.sublist(
"Utilities").set(
"Output Processor",
266 Parallel::Machine comm,
267 Linear::Vector ** currSolVectorPtrPtr,
269 Linear::Vector * maskVectorPtr)
272 bool isTransient =
false;
278 Teuchos::RCP<XyceTests> allTests;
281 allTests = Teuchos::rcp(
new XyceTests(comm,
284 Util::MachineDependentParams::MachineEpsilon(),
292 0.5*Util::MachineDependentParams::DoubleMax(),
301 tests_.push_back(allTests);
319 const std::string message =
"Error: N_NLS::NOX::ParameterSet::getStatusTests() - Status tests are not set!";
320 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
389 "Tag \"" + tag +
"\" is unsupported by the NOX interface at this time.\n";
390 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, warning);
408 int maxSearchStep = 2;
410 double AZ_tol = 1.0e-12;
411 int recoveryStepType = 0;
412 double recoveryStep = 1.0;
417 for (Util::ParamList::const_iterator it_tpL = OB.begin();
418 it_tpL != OB.end(); ++ it_tpL)
420 const std::string tag = it_tpL->uTag();
428 else if (tag ==
"RELTOL")
432 else if (tag ==
"DELTAXTOL")
436 else if (tag ==
"RHSTOL")
440 else if (tag ==
"MAXSTEP")
444 else if (tag ==
"SMALLUPDATETOL")
450 else if (tag ==
"ENFORCEDEVICECONV")
456 else if (tag ==
"LINOPT")
460 else if (tag ==
"CONSTRAINTBT")
464 else if (tag ==
"CONSTRAINTMAX")
468 else if (tag ==
"CONSTRAINTMIN")
472 else if (tag ==
"CONSTRAINTCHANGE")
476 else if (tag ==
"NORMLVL")
478 if (it_tpL->getImmutableValue<
int>() != 2)
481 else if (tag ==
"DEBUGLEVEL")
485 else if (tag ==
"SCREENOUTPUT")
489 else if (tag ==
"USEMASKING")
493 else if (tag ==
"DEBUGMINTIMESTEP")
497 else if (tag ==
"DEBUGMAXTIMESTEP")
501 else if (tag ==
"DEBUGMINTIME")
505 else if (tag ==
"DEBUGMAXTIME")
509 else if (tag ==
"DLSDEBUG")
513 else if (tag ==
"NLSTRATEGY")
515 int val = it_tpL->getImmutableValue<
int>();
518 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
519 noxParams_.sublist(
"Direction").set(
"Method",
"Newton");
523 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
525 .set(
"Method",
"Steepest Descent");
529 noxParams_.set(
"Nonlinear Solver",
"Trust Region Based");
533 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
535 .set(
"Method",
"Modified-Newton");
539 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
540 noxParams_.sublist(
"Direction").set(
"Method",
"Quasi-Newton");
544 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
545 noxParams_.sublist(
"Direction").set(
"Method",
"Broyden");
549 noxParams_.set(
"Nonlinear Solver",
"Tensor Based");
550 noxParams_.sublist(
"Direction").set(
"Method",
"Tensor");
551 noxParams_.sublist(
"Direction").sublist(
"Tensor")
552 .sublist(
"Linear Solver").set(
"Compute Step",
"Newton");
553 noxParams_.sublist(
"Direction").sublist(
"Tensor")
554 .sublist(
"Linear Solver").set(
"Reorthogonalize",
"Always");
555 noxParams_.sublist(
"Line Search").set(
"Method",
"Tensor");
556 noxParams_.sublist(
"Line Search").sublist(
"Tensor")
557 .set(
"Submethod",
"Full Step");
563 "NLStrategy = 7 is no longer supported.\n";
564 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, warning);
570 "NLStrategy = 8 is no longer supported.\n";
571 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, warning);
576 "NLStrategy is not found!\n";
577 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, warning);
582 else if (tag ==
"SEARCHMETHOD")
584 int val = it_tpL->getImmutableValue<
int>();
587 noxParams_.sublist(
"Line Search").set(
"Method",
"Full Step");
591 noxParams_.sublist(
"Line Search").set(
"Method",
"Backtrack");
595 noxParams_.sublist(
"Line Search").set(
"Method",
"Polynomial");
596 noxParams_.sublist(
"Line Search").sublist(
"Polynomial")
597 .set(
"Interpolation Type",
"Quadratic");
601 noxParams_.sublist(
"Line Search").set(
"Method",
"Polynomial");
602 noxParams_.sublist(
"Line Search").sublist(
"Polynomial")
603 .set(
"Interpolation Type",
"Cubic");
608 .set(
"Method",
"More'-Thuente");
612 std::ostringstream ost;
613 ost <<
"ParameterSet::parseOptionBlock_ - "
614 <<
"SEARCHMETHOD = " << val
615 <<
" not supported by Xyce at this time." << std::endl;
616 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, ost.str());
621 else if (tag ==
"TRMINRADIUS")
624 .set(
"Minimum Trust Region Radius", it_tpL->getImmutableValue<
double>());
626 else if (tag ==
"TRMAXRADIUS")
629 .set(
"Maximum Trust Region Radius", it_tpL->getImmutableValue<
double>());
631 else if (tag ==
"TRMINIMPROVEMENTRATIO")
634 .set(
"Minimum Improvement Ratio", it_tpL->getImmutableValue<
double>());
636 else if (tag ==
"TRCONTRACTIONRATIO")
639 .set(
"Contraction Trigger Ratio", it_tpL->getImmutableValue<
double>());
641 else if (tag ==
"TRCONTRACTIONFACTOR")
644 .set(
"Contraction Factor", it_tpL->getImmutableValue<
double>());
646 else if (tag ==
"TREXPANSIONRATIO")
649 .set(
"Expansion Trigger Ratio", it_tpL->getImmutableValue<
double>());
651 else if (tag ==
"TREXPANSIONFACTOR")
654 .set(
"Expansion Factor", it_tpL->getImmutableValue<
double>());
656 else if (tag ==
"TRRECOVERYSTEP")
659 .set(
"Recovery Step", it_tpL->getImmutableValue<
double>());
663 else if (tag ==
"NOX")
674 else if (tag ==
"CONTINUATION")
677 if (it_tpL->isNumeric())
679 noxSolver = it_tpL->getImmutableValue<
int>();
683 ExtendedString p(it_tpL->stringValue());
685 if (p.substr(0,4) ==
"STAN")
689 else if (p.substr(0,3) ==
"NAT")
693 else if (p.substr(0,3) ==
"MOS")
697 else if (p.substr(0,4) ==
"GMIN")
701 else if (p.substr(0,6) ==
"NEWMOS")
705 else if (p.substr(0,9) ==
"BSIM3INV1")
709 else if (p.substr(0,9) ==
"BSIM3INV2")
713 else if (p.substr(0,9) ==
"BLOCKGAIN")
717 else if (p.substr(0,4) ==
"TEST")
721 else if (p.substr(0,6) ==
"PSEUDO")
725 else if (p.substr(0,5) ==
"POWER")
729 else if (p.substr(0,3) ==
"ART")
733 else if (p.substr(0,10) ==
"SOURCESTEP")
739 std::string message =
"Unknown specification in .options for 'continuation': ";
740 message += it_tpL->stringValue();
741 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
746 #ifndef Xyce_NOX_LOCA_ARTIFICIAL_HOMOTOPY_SUPPORT
749 Report::UserFatal0() <<
"Nonlinear Solver (NOX::Interface) Artificial parameter continuation requires "
750 <<
"building xyce with the define: -DXyce_NOX_LOCA_ARTIFICIAL_HOMOTOPY_SUPPORT to "
751 <<
"allow LOCA to augment the diagonal of Jacobian! Either rebuild Xyce or do not "
752 <<
"run Xyce with \"continuation=33\"";
760 else if (tag ==
"MAXSEARCHSTEP")
762 maxSearchStep = it_tpL->getImmutableValue<
int>();
764 else if (tag ==
"IN_FORCING")
766 in_Forcing = it_tpL->getImmutableValue<
int>();
768 else if (tag ==
"AZ_TOL")
770 AZ_tol = it_tpL->getImmutableValue<
double>();
772 else if (tag ==
"RECOVERYSTEPTYPE")
774 recoveryStepType = it_tpL->getImmutableValue<
int>();
776 else if (tag ==
"RECOVERYSTEP")
778 recoveryStep = it_tpL->getImmutableValue<
double>();
780 else if (tag ==
"MEMORY")
782 memory = it_tpL->getImmutableValue<
int>();
787 else if (tag ==
"MAXSEARCHSTEP")
789 maxSearchStep = it_tpL->getImmutableValue<
int>();
791 else if (tag ==
"IN_FORCING")
793 in_Forcing = it_tpL->getImmutableValue<
int>();
795 else if (tag ==
"AZ_TOL")
797 AZ_tol = it_tpL->getImmutableValue<
double>();
799 else if (tag ==
"RECOVERYSTEPTYPE")
801 recoveryStepType = it_tpL->getImmutableValue<
int>();
803 else if (tag ==
"RECOVERYSTEP")
805 recoveryStep = it_tpL->getImmutableValue<
double>();
807 else if (tag ==
"MEMORY")
809 memory = it_tpL->getImmutableValue<
int>();
815 Report::UserWarning() << tag <<
" is not a recognized nonlinear solver option.\n" << std::endl;
830 std::string directionMethod =
831 noxParams_.sublist(
"Direction").get(
"Method",
"Newton");
833 std::string lineSearchMethod =
834 noxParams_.sublist(
"Line Search").get(
"Method",
"Full Step");
837 noxParams_.sublist(
"Line Search").sublist(lineSearchMethod)
838 .set(
"Max Iters", maxSearchStep);
843 noxParams_.sublist(
"Direction").sublist(directionMethod)
844 .set(
"Forcing Term Method",
"Constant");
846 else if (in_Forcing == 1)
848 noxParams_.sublist(
"Direction").sublist(directionMethod)
849 .set(
"Forcing Term Method",
"Type 1");
850 noxParams_.sublist(
"Direction").sublist(
"Newton")
851 .set(
"Forcing Term Minimum Tolerance", AZ_tol);
855 noxParams_.sublist(
"Direction").sublist(directionMethod)
856 .set(
"Forcing Term Method",
"Type 2");
857 noxParams_.sublist(
"Direction").sublist(
"Newton")
858 .set(
"Forcing Term Minimum Tolerance", AZ_tol);
862 if (recoveryStepType == 1)
865 noxParams_.sublist(
"Line Search").sublist(lineSearchMethod)
866 .set(
"Recovery Step Type",
"Constant");
871 noxParams_.sublist(
"Line Search").sublist(lineSearchMethod)
872 .set(
"Recovery Step Type",
"Last Computed Step");
876 noxParams_.sublist(
"Line Search").sublist(lineSearchMethod)
877 .set(
"Recovery Step", recoveryStep);
880 if ((directionMethod ==
"Quasi-Newton") ||
881 (directionMethod ==
"Broyden"))
882 noxParams_.sublist(
"Direction").sublist(directionMethod)
883 .set(
"Memory", memory);
899 Teuchos::ParameterList& stepperList =
locaParams_.sublist(
"Stepper");
900 Teuchos::ParameterList& predictorList =
locaParams_.sublist(
"Predictor");
901 Teuchos::ParameterList& stepSizeList =
locaParams_.sublist(
"Step Size");
903 bool stepperGiven=
false;
904 bool predictorGiven=
false;
912 for (Util::ParamList::const_iterator it_tpL = OB.begin();
913 it_tpL != OB.end(); ++ it_tpL)
915 const std::string tag = it_tpL->uTag();
916 std::string baseTag=tag.substr(0,8);
917 bool isVectorParam=
false;
918 if (baseTag ==
"CONPARAM" ||
919 baseTag ==
"MINVALUE" ||
920 baseTag ==
"MAXVALUE" ||
921 baseTag ==
"INITIALV" ||
922 baseTag ==
"INITIALS" ||
923 baseTag ==
"MINSTEPS" ||
924 (baseTag ==
"MAXSTEPS" && tag.substr(0,11)==
"MAXSTEPSIZE")||
925 baseTag ==
"AGGRESSI")
927 if (baseTag ==
"INITIALV")
929 baseTag =
"INITIALVALUE";
931 else if (baseTag ==
"INITIALS")
933 baseTag =
"INITIALSTEPSIZE";
935 else if (baseTag ==
"MINSTEPS")
937 baseTag =
"MINSTEPSIZE";
939 else if (baseTag ==
"MAXSTEPS")
941 baseTag =
"MAXSTEPSIZE";
943 else if (baseTag ==
"AGGRESSI")
945 baseTag =
"AGGRESSIVENESS";
948 std::string num=tag.substr(baseTag.size(),tag.size()-baseTag.size());
949 int index=ExtendedString(num).Ival();
953 if (tag ==
"STEPPER")
956 if (it_tpL->isNumeric())
958 int iType = it_tpL->getImmutableValue<
int>();
961 stepperList.set(
"Continuation Method",
"Arc Length");
962 stepperList.set(
"Skip df/dp",
false);
966 stepperList.set(
"Continuation Method",
"Natural");
967 stepperList.set(
"Skip df/dp",
true);
972 ExtendedString p(it_tpL->stringValue());
974 if (p.substr(0,3) ==
"ARC")
976 stepperList.set(
"Continuation Method",
"Arc Length");
977 stepperList.set(
"Skip df/dp",
false);
979 else if (p.substr(0,3) ==
"NAT")
981 stepperList.set(
"Continuation Method",
"Natural");
982 stepperList.set(
"Skip df/dp",
true);
986 std::string message =
"Unknown specification in .options for 'stepper': ";
987 message += it_tpL->stringValue();
988 message +=
". Legal choices are ARCLENGTH or NATURAL, which may be abbreviated to three characters.";
989 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
993 else if (tag ==
"PREDICTOR")
996 if (it_tpL->isNumeric())
998 int iType = it_tpL->getImmutableValue<
int>();
1001 predictorList.set(
"Method",
"Tangent");
1003 else if (iType == 2)
1005 predictorList.set(
"Method",
"Secant");
1007 else if (iType == 3)
1009 predictorList.set(
"Method",
"Random");
1013 predictorList.set(
"Method",
"Constant");
1018 ExtendedString p(it_tpL->stringValue());
1020 if (p.substr(0,3) ==
"TAN")
1022 predictorList.set(
"Method",
"Tangent");
1024 else if (p.substr(0,3) ==
"SEC")
1026 predictorList.set(
"Method",
"Secant");
1028 else if (p.substr(0,3) ==
"RAN")
1030 predictorList.set(
"Method",
"Random");
1032 else if (p.substr(0,3) ==
"CON")
1034 predictorList.set(
"Method",
"Constant");
1038 std::string message =
"Unknown specification in .options for 'predictor': ";
1039 message += it_tpL->stringValue();
1040 message +=
". Legal choices are TANGENT, SECANT, RANDOM, CONSTANT, which may be abbreviated to three characters.";
1041 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1048 else if (tag ==
"CONPARAM1")
1050 stepperList.set(
"Continuation Parameter", it_tpL->stringValue());
1052 else if (tag ==
"INITIALVALUE1")
1054 stepperList.set(
"Initial Value", it_tpL->getImmutableValue<
double>());
1056 else if (tag ==
"MINVALUE1")
1059 stepperList.set(
"Min Value", it_tpL->getImmutableValue<
double>());
1061 else if (tag ==
"RESIDUALCONDUCTANCE")
1066 Report::UserWarning0() <<
"A non-zero value for the GMIN Stepping residual conductance has been specified (RESIDUALCONDUCTANCE= " << it_tpL->stringValue() <<
")." << std::endl
1067 <<
"This option should never be used unless absolutely necessary to obtain an initial condition for transient runs with ill-posed DC operating points. The operating point obtained by GMIN Stepping will not be a valid steady state condition for the circuit as defined in the netlist, but might possibly produce a reasonable initial condition for transient runs.";
1070 else if (tag ==
"INITIALSTEPSIZE1")
1072 stepSizeList.set(
"Initial Step Size", it_tpL->getImmutableValue<
double>());
1074 else if (tag ==
"MINSTEPSIZE1")
1076 stepSizeList.set(
"Min Step Size", it_tpL->getImmutableValue<
double>());
1078 else if (tag ==
"MAXSTEPSIZE1")
1080 stepSizeList.set(
"Max Step Size", it_tpL->getImmutableValue<
double>());
1082 else if (tag ==
"AGGRESSIVENESS1")
1084 stepSizeList.set(
"Aggressiveness", it_tpL->getImmutableValue<
double>());
1086 else if (tag ==
"MAXVALUE1")
1088 stepperList.set(
"Max Value", it_tpL->getImmutableValue<
double>());
1090 else if (tag ==
"BIFPARAM")
1092 stepperList.set(
"Bifurcation Parameter", it_tpL->stringValue());
1094 else if (tag ==
"MAXSTEPS")
1096 stepperList.set(
"Max Steps", it_tpL->getImmutableValue<
int>());
1098 else if (tag ==
"MAXNLITERS")
1100 stepperList.set(
"Max Nonlinear Iterations", it_tpL->getImmutableValue<
int>());
1102 else if (tag ==
"STEPCONTROL")
1104 if (it_tpL->isNumeric())
1106 int iType = it_tpL->getImmutableValue<
int>();
1108 stepSizeList.set(
"Method",
"Adaptive");
1110 stepSizeList.set(
"Method",
"Constant");
1114 ExtendedString p(it_tpL->stringValue());
1116 if (p.substr(0,3) ==
"ADA")
1118 stepSizeList.set(
"Method",
"Adaptive");
1120 else if (p.substr(0,3) ==
"CON")
1122 stepSizeList.set(
"Method",
"Constant");
1126 std::string message =
"Unknown specification in .options for 'stepcontrol': ";
1127 message += it_tpL->stringValue();
1128 message +=
". Legal choices are ADAPTIVE or CONSTANT, which may be abbreviated to three characters.";
1129 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1133 else if (tag ==
"POWERNODE")
1135 stepperList.set(
"Power Node", it_tpL->stringValue());
1137 else if (tag ==
"VOLTAGELIST")
1139 ExtendedString p(it_tpL->stringValue());
1141 if (p.substr(0,3) ==
"DOF")
1145 else if (p.substr(0,3) ==
"NOD")
1151 std::string message =
"Unknown specification in .options loca for 'voltagelist': ";
1152 message += it_tpL->stringValue();
1153 message +=
". Legal choices are DOFS or NODES, which may be abbreviated to three characters.";
1154 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1157 else if(tag ==
"VOLTAGESCALEFACTOR")
1162 else if (std::string(tag,0,10) ==
"PARAMLIST")
1165 dout() <<
"tag = " << tag << std::endl;
1173 std::string tmp =tag +
" is not a recognized loca option.\n";
1174 N_ERH_ErrorMgr::report (N_ERH_ErrorMgr::USR_WARNING_0, tmp);
1184 stepperList.set(
"Continuation Method",
"Natural");
1185 stepperList.set(
"Skip df/dp",
true);
1188 if (!predictorGiven)
1190 predictorList.set(
"Method",
"Tangent");
1209 value =
vectorParams[tag][index].getImmutableValue<
double>();
1256 std::string msg =
"ParameterSet::getVectorParam - ";
1257 msg +=
"the parameter \"";
1259 msg +=
"\" is required for parameter continuation!";
1260 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, msg);
1277 Teuchos::RCP<XyceTests> testPtr =
1279 if (Teuchos::is_null(testPtr))
1281 const std::string message =
"getStatusTestReturnCode - Dynamic cast on Xyce Tests check failed.";
1282 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1285 return testPtr->getXyceReturnCode();
1300 Teuchos::RCP<XyceTests> testPtr =
1301 Teuchos::rcp_dynamic_cast<
XyceTests>(tests_[1]);
1302 if (Teuchos::is_null(testPtr))
1304 const std::string message =
"setStatusTestReturnCode - Dynamic cast on Xyce Tests check failed.";
1305 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1308 return testPtr->setReturnCodes (retCodesTmp);
1322 Teuchos::RCP<XyceTests> testPtr =
1324 if (Teuchos::is_null(testPtr))
1326 const std::string message =
"getMaxNormF - Dynamic cast on Xyce Tests check failed.";
1327 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1330 return testPtr->getMaxNormF();
1344 Teuchos::RCP<XyceTests> testPtr =
1346 if (Teuchos::is_null(testPtr))
1348 const std::string message =
"getMaxNormFindex - Dynamic cast on Xyce Tests check failed.";
1349 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1352 return testPtr->getMaxNormFindex ();
1381 Teuchos::RCP<AugmentLinSys>
1384 Teuchos::RCP<AugmentLinSys> als;
1388 Teuchos::RCP<Epetra_MapColoring> color_map =
1389 Teuchos::rcp(ls->builder().createSolnColoring());
1393 als = Teuchos::rcp(
new
1395 ls->getRHSVector()) );
1399 als = Teuchos::rcp(
new
1400 AugmentLinSysPseudoTransient(color_map,
1411 Teuchos::RCP<Epetra_MapColoring> color_map =
1412 Teuchos::rcp(ls->builder().createSolnColoring());
1414 als = Teuchos::rcp(
new GStepping(color_map,
1421 als = Teuchos::rcp(
new
1422 GStepping(ls->getQueryUtil()->vnodeGIDVec(),
1430 std::string message =
"createAugmentLinearSystem - The \'continuation\' ";
1431 message +=
"parameter in the .options nox list must be set to PSEUDO or NATURAL for ";
1432 message +=
"this function to be called!";
1433 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1447 Teuchos::RCP<AugmentLinSys>
1449 const NodeNameMap & allNodes, N_PDS_Comm * pdsCommPtr
1452 Teuchos::RCP<AugmentLinSys> als;
1454 als = Teuchos::rcp(
new AugmentLinSysOPStart(op, allNodes, pdsCommPtr) );
1468 Teuchos::RCP<AugmentLinSys>
1470 bool gminStepping)
const
1472 Teuchos::RCP<AugmentLinSys> als;
1474 Teuchos::RCP<Epetra_MapColoring> ICcolor_map =
1475 Teuchos::rcp(ls->builder().createInitialConditionColoring());
1477 if (gminStepping==
false)
1479 als = Teuchos::rcp(
new AugmentLinSysIC(op, ICcolor_map, ls->getRHSVector() ) );
1485 Teuchos::RCP<Epetra_MapColoring> GMINcolor_map =
1486 Teuchos::rcp(ls->builder().createSolnColoring());
1488 als = Teuchos::rcp(
new AugmentLinSysIC_Gmin(
1498 als = Teuchos::rcp(
new AugmentLinSysIC_Gmin(
1502 ls->getQueryUtil()->vnodeGIDVec(),
bool setOutputOptions(int myPID, int outputProcess)
std::vector< Teuchos::RCP< NOX::StatusTest::Generic > > tests_
Teuchos::RCP< NOX::StatusTest::Combo > comboPtr_
Teuchos::RCP< Teuchos::ParameterList > getDebugParams()
Teuchos::ParameterList statusTestParams_
int getMaxNormFindex() const
Pure virtual class to augment a linear system.
Teuchos::RCP< Teuchos::ParameterList > getLocaParams()
double voltageScaleFactor_
bool setOptions(const Xyce::Util::OptionBlock &OB)
Teuchos::ParameterList & locaParams_
void setNoxSolverType(int type)
Teuchos::RCP< Teuchos::ParameterList > getNoxParams()
const T & value(const ParameterBase &entity, const Descriptor &descriptor)
Returns the value of the parameter for the entity.
bool setLocaOptions(const Xyce::Util::OptionBlock &OB, bool saveCopy=true)
Xyce::Util::OptionBlock savedLocaOB_
Xyce::Nonlinear::AnalysisMode mode_
bool getVectorParam(const std::string &, int, double &)
bool continuationSpecified_
double gstepping_minimum_conductance_
Teuchos::RCP< AugmentLinSys > createAugmentLinearSystem(Xyce::Linear::System *ls) const
std::map< std::string, std::vector< Xyce::Util::Param > > vectorParams
Teuchos::RCP< NOX::StatusTest::Generic > getStatusTests()
void setStatusTestReturnCodes(const Xyce::Nonlinear::ReturnCodes &retCodesTmp)
Teuchos::ParameterList & debugParams_
VoltageListType voltageListType_
double gstepping_min_value_
Teuchos::ParameterList & noxParams_
int getStatusTestReturnCode() const
void unsupportedOption_(const std::string &tag)
bool parseOptionBlock_(const Xyce::Util::OptionBlock &OB)
Teuchos::RCP< Teuchos::ParameterList > getAllParams()
ParameterSet(Xyce::Nonlinear::AnalysisMode mode)
double getMaxNormF() const
int getNoxSolverType() const
bool createStatusTests(Parallel::Machine comm, N_LAS_Vector **currSolnVectorPtrPtr, Xyce::Loader::NonlinearEquationLoader &nonlinear_equation_loader, N_LAS_Vector *maskVectorPtr=0)
Only used when NLS_MASKED_WRMS_NORMS.
Teuchos::RCP< Teuchos::ParameterList > allParams_
int getVectorParamSize(const std::string &vectorName)
void warning(const std::string &msg)