46 #include <Xyce_config.h>
52 #include <N_UTL_Misc.h>
71 #include "N_ERH_ErrorMgr.h"
72 #include "N_ERH_Message.h"
73 #include "N_UTL_Param.h"
74 #include "N_PDS_fwd.h"
75 #include "N_UTL_OptionBlock.h"
78 #include "N_LOA_Loader.h"
87 #include "N_LAS_Builder.h"
88 #include "N_LAS_System.h"
89 #include "N_LAS_QueryUtil.h"
90 #include "Epetra_MapColoring.h"
103 allParams_(Teuchos::rcp(new Teuchos::ParameterList)),
104 noxParams_(allParams_->sublist(
"NOX")),
105 locaParams_(allParams_->sublist(
"LOCA")),
106 debugParams_(allParams_->sublist(
"DEBUG")),
107 comboPtr_(Teuchos::rcp(new NOX::StatusTest::Combo(NOX::StatusTest::Combo::OR))),
109 isStatusTestsSet_(false),
110 continuationSpecified_(false),
113 voltageListType_(VLT_None),
114 gstepping_minimum_conductance_(0.0),
115 savedLocaOptions_(false),
117 debugMinTimeStep_(0),
118 debugMaxTimeStep_(N_UTL_MachineDependentParams::IntMax()),
120 debugMaxTime_(N_UTL_MachineDependentParams::DoubleMax()),
121 screenOutputFlag_(false),
122 voltageScaleFactor_(1.0)
128 #ifdef Xyce_VERBOSE_NOX
130 .set(
"Output Information",
132 NOX::Utils::Warning +
133 NOX::Utils::OuterIteration +
134 NOX::Utils::OuterIterationStatusTest +
135 NOX::Utils::InnerIteration +
136 NOX::Utils::Details +
137 NOX::Utils::StepperIteration +
138 NOX::Utils::StepperDetails +
139 NOX::Utils::Parameters
143 #ifdef Xyce_VERBOSE_NONLINEAR
145 .set(
"Output Information",
147 NOX::Utils::Warning +
148 NOX::Utils::OuterIteration +
149 NOX::Utils::StepperIteration
153 .set(
"Output Information", NOX::Utils::Error);
167 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
168 noxParams_.sublist(
"Line Search").set(
"Method",
"Full Step");
184 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
185 noxParams_.sublist(
"Line Search").set(
"Method",
"Full Step");
200 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
201 noxParams_.sublist(
"Line Search").set(
"Method",
"Full Step");
202 noxParams_.sublist(
"Direction").sublist(
"Newton")
203 .sublist(
"Linear Solver").set(
"Tolerance", 1.0e-12);
208 noxParams_.sublist(
"Line Search").sublist(
"Polynomial")
209 .set(
"Recovery Step Type",
"Last Computed Step");
213 Teuchos::ParameterList& stepperList =
locaParams_.sublist(
"Stepper");
214 Teuchos::ParameterList& predictorList =
locaParams_.sublist(
"Predictor");
215 Teuchos::ParameterList& stepSizeList =
locaParams_.sublist(
"Step Size");
217 stepperList.set(
"Continuation Method",
"Natural");
218 stepperList.set(
"Skip df/dp",
true);
219 predictorList.set(
"Method",
"Tangent");
265 noxParams_.sublist(
"Printing").set(
"MyPID", myPID);
266 noxParams_.sublist(
"Printing").set(
"Output Processor",
268 locaParams_.sublist(
"Utilities").set(
"MyPID", myPID);
269 locaParams_.sublist(
"Utilities").set(
"Output Processor",
283 N_LOA_Loader& loader, std::vector<char> & varTypeVec
284 #ifdef Xyce_NLS_MASKED_WRMS_NORMS
285 ,
bool nonTrivialDeviceMaskFlag, N_LAS_Vector * maskVectorPtr)
405 bool isTransient =
false;
412 Teuchos::RefCountPtr<N_NLS_NOX::XyceTests> allTests;
413 if( statusTestParams_.get(
"FASTTESTS",
false) )
417 statusTestParams_.get(
"RHSTOL", 1.0e-6),
418 N_UTL_MachineDependentParams::MachineEpsilon(),
420 statusTestParams_.get(
"ABSTOL", 1.0e-12),
421 statusTestParams_.get(
"RELTOL", 1.0e-3),
422 statusTestParams_.get(
"DELTAXTOL", 1.0),
423 statusTestParams_.get(
"MAXSTEP", 200),
426 0.5*N_UTL_MachineDependentParams::DoubleMax(),
429 statusTestParams_.get(
"ENFORCEDEVICECONV", 1),
430 statusTestParams_.get(
"SMALLUPDATETOL", 1.0e-6),
433 statusTestParams_.get(
"VOLTZEROTOL", 1.0e-6),
434 statusTestParams_.get(
"CURRZEROTOL", 1.0e-6)
435 #ifdef Xyce_NLS_MASKED_WRMS_NORMS
436 , nonTrivialDeviceMaskFlag, maskVectorPtr
444 statusTestParams_.get(
"RHSTOL", 1.0e-6),
445 N_UTL_MachineDependentParams::MachineEpsilon(),
447 statusTestParams_.get(
"ABSTOL", 1.0e-12),
448 statusTestParams_.get(
"RELTOL", 1.0e-3),
449 statusTestParams_.get(
"DELTAXTOL", 1.0),
450 statusTestParams_.get(
"MAXSTEP", 200),
453 0.5*N_UTL_MachineDependentParams::DoubleMax(),
456 statusTestParams_.get(
"ENFORCEDEVICECONV", 1),
457 statusTestParams_.get(
"SMALLUPDATETOL", 1.0e-6),
459 #ifdef Xyce_NLS_MASKED_WRMS_NORMS
460 , nonTrivialDeviceMaskFlag, maskVectorPtr
464 tests_.push_back(allTests);
465 comboPtr_->addStatusTest(allTests);
466 isStatusTestsSet_ =
true;
482 const std::string message =
"Error: N_NLS::NOX::ParameterSet::getStatusTests() - Status tests are not set!";
483 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
552 "Tag \"" + tag +
"\" is unsupported by the NOX interface at this time.\n";
553 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, warning);
571 int maxSearchStep = 2;
573 double AZ_tol = 1.0e-12;
574 int recoveryStepType = 0;
575 double recoveryStep = 1.0;
580 for (std::list<N_UTL_Param>::const_iterator it_tpL = OB.getParams().begin();
581 it_tpL != OB.getParams().end(); ++ it_tpL)
583 const std::string tag = it_tpL->uTag();
591 else if (tag ==
"RELTOL")
595 else if (tag ==
"DELTAXTOL")
599 else if (tag ==
"RHSTOL")
603 else if (tag ==
"MAXSTEP")
607 else if (tag ==
"SMALLUPDATETOL")
613 else if (tag ==
"ENFORCEDEVICECONV")
617 else if (tag ==
"FASTTESTS")
621 else if (tag ==
"VOLTZEROTOL")
625 else if (tag ==
"ABSZEROTOL")
631 else if (tag ==
"LINOPT")
635 else if (tag ==
"CONSTRAINTBT")
639 else if (tag ==
"CONSTRAINTMAX")
643 else if (tag ==
"CONSTRAINTMIN")
647 else if (tag ==
"CONSTRAINTCHANGE")
651 else if (tag ==
"NORMLVL")
653 if (it_tpL->getImmutableValue<
int>() != 2)
656 else if (tag ==
"DEBUGLEVEL")
660 else if (tag ==
"SCREENOUTPUT")
664 else if (tag ==
"DEBUGMINTIMESTEP")
668 else if (tag ==
"DEBUGMAXTIMESTEP")
672 else if (tag ==
"DEBUGMINTIME")
676 else if (tag ==
"DEBUGMAXTIME")
680 else if (tag ==
"DLSDEBUG")
684 else if (tag ==
"NLSTRATEGY")
686 int val = it_tpL->getImmutableValue<
int>();
689 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
690 noxParams_.sublist(
"Direction").set(
"Method",
"Newton");
694 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
696 .set(
"Method",
"Steepest Descent");
700 noxParams_.set(
"Nonlinear Solver",
"Trust Region Based");
704 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
706 .set(
"Method",
"Modified-Newton");
710 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
711 noxParams_.sublist(
"Direction").set(
"Method",
"Quasi-Newton");
715 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
716 noxParams_.sublist(
"Direction").set(
"Method",
"Broyden");
720 noxParams_.set(
"Nonlinear Solver",
"Tensor Based");
721 noxParams_.sublist(
"Direction").set(
"Method",
"Tensor");
722 noxParams_.sublist(
"Direction").sublist(
"Tensor")
723 .sublist(
"Linear Solver").set(
"Compute Step",
"Newton");
724 noxParams_.sublist(
"Direction").sublist(
"Tensor")
725 .sublist(
"Linear Solver").set(
"Reorthogonalize",
"Always");
726 noxParams_.sublist(
"Line Search").set(
"Method",
"Tensor");
727 noxParams_.sublist(
"Line Search").sublist(
"Tensor")
728 .set(
"Submethod",
"Full Step");
734 "NLStrategy = 7 is no longer supported.\n";
735 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, warning);
741 "NLStrategy = 8 is no longer supported.\n";
742 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, warning);
747 "NLStrategy is not found!\n";
748 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, warning);
753 else if (tag ==
"SEARCHMETHOD")
755 int val = it_tpL->getImmutableValue<
int>();
758 noxParams_.sublist(
"Line Search").set(
"Method",
"Full Step");
762 noxParams_.sublist(
"Line Search").set(
"Method",
"Backtrack");
766 noxParams_.sublist(
"Line Search").set(
"Method",
"Polynomial");
767 noxParams_.sublist(
"Line Search").sublist(
"Polynomial")
768 .set(
"Interpolation Type",
"Quadratic");
772 noxParams_.sublist(
"Line Search").set(
"Method",
"Polynomial");
773 noxParams_.sublist(
"Line Search").sublist(
"Polynomial")
774 .set(
"Interpolation Type",
"Cubic");
779 .set(
"Method",
"More'-Thuente");
783 std::ostringstream ost;
784 ost <<
"N_NLS_NOX::ParameterSet::parseOptionBlock_ - "
785 <<
"SEARCHMETHOD = " << val
786 <<
" not supported by Xyce at this time." << std::endl;
787 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, ost.str());
792 else if (tag ==
"TRMINRADIUS")
795 .set(
"Minimum Trust Region Radius", it_tpL->getImmutableValue<
double>());
797 else if (tag ==
"TRMAXRADIUS")
800 .set(
"Maximum Trust Region Radius", it_tpL->getImmutableValue<
double>());
802 else if (tag ==
"TRMINIMPROVEMENTRATIO")
805 .set(
"Minimum Improvement Ratio", it_tpL->getImmutableValue<
double>());
807 else if (tag ==
"TRCONTRACTIONRATIO")
810 .set(
"Contraction Trigger Ratio", it_tpL->getImmutableValue<
double>());
812 else if (tag ==
"TRCONTRACTIONFACTOR")
815 .set(
"Contraction Factor", it_tpL->getImmutableValue<
double>());
817 else if (tag ==
"TREXPANSIONRATIO")
820 .set(
"Expansion Trigger Ratio", it_tpL->getImmutableValue<
double>());
822 else if (tag ==
"TREXPANSIONFACTOR")
825 .set(
"Expansion Factor", it_tpL->getImmutableValue<
double>());
827 else if (tag ==
"TRRECOVERYSTEP")
830 .set(
"Recovery Step", it_tpL->getImmutableValue<
double>());
834 else if (tag ==
"NOX")
845 else if (tag ==
"CONTINUATION")
848 if (it_tpL->isNumeric())
850 noxSolver = it_tpL->getImmutableValue<
int>();
854 ExtendedString p(it_tpL->stringValue());
856 if (p.substr(0,4) ==
"STAN")
860 else if (p.substr(0,3) ==
"NAT")
864 else if (p.substr(0,3) ==
"MOS")
868 else if (p.substr(0,4) ==
"GMIN")
872 else if (p.substr(0,6) ==
"NEWMOS")
876 else if (p.substr(0,9) ==
"BSIM3INV1")
880 else if (p.substr(0,9) ==
"BSIM3INV2")
884 else if (p.substr(0,9) ==
"BLOCKGAIN")
888 else if (p.substr(0,4) ==
"TEST")
892 else if (p.substr(0,6) ==
"PSEUDO")
896 else if (p.substr(0,5) ==
"POWER")
900 else if (p.substr(0,3) ==
"ART")
906 std::string message =
"Unknown specification in .options for 'continuation': ";
907 message += it_tpL->stringValue();
908 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
913 #ifndef Xyce_NOX_LOCA_ARTIFICIAL_HOMOTOPY_SUPPORT
916 Xyce::Report::UserFatal0() <<
"Nonlinear Solver (NOX::Interface) Artificial parameter continuation requires "
917 <<
"building xyce with the define: -DXyce_NOX_LOCA_ARTIFICIAL_HOMOTOPY_SUPPORT to "
918 <<
"allow LOCA to augment the diagonal of Jacobian! Either rebuild Xyce or do not "
919 <<
"run Xyce with \"continuation=33\"";
927 else if (tag ==
"MAXSEARCHSTEP")
929 maxSearchStep = it_tpL->getImmutableValue<
int>();
931 else if (tag ==
"IN_FORCING")
933 in_Forcing = it_tpL->getImmutableValue<
int>();
935 else if (tag ==
"AZ_TOL")
937 AZ_tol = it_tpL->getImmutableValue<
double>();
939 else if (tag ==
"RECOVERYSTEPTYPE")
941 recoveryStepType = it_tpL->getImmutableValue<
int>();
943 else if (tag ==
"RECOVERYSTEP")
945 recoveryStep = it_tpL->getImmutableValue<
double>();
947 else if (tag ==
"MEMORY")
949 memory = it_tpL->getImmutableValue<
int>();
954 else if (tag ==
"MAXSEARCHSTEP")
956 maxSearchStep = it_tpL->getImmutableValue<
int>();
958 else if (tag ==
"IN_FORCING")
960 in_Forcing = it_tpL->getImmutableValue<
int>();
962 else if (tag ==
"AZ_TOL")
964 AZ_tol = it_tpL->getImmutableValue<
double>();
966 else if (tag ==
"RECOVERYSTEPTYPE")
968 recoveryStepType = it_tpL->getImmutableValue<
int>();
970 else if (tag ==
"RECOVERYSTEP")
972 recoveryStep = it_tpL->getImmutableValue<
double>();
974 else if (tag ==
"MEMORY")
976 memory = it_tpL->getImmutableValue<
int>();
982 Xyce::Report::UserWarning() << tag <<
" is not a recognized nonlinear solver option.\n" << std::endl;
997 std::string directionMethod =
998 noxParams_.sublist(
"Direction").get(
"Method",
"Newton");
1000 std::string lineSearchMethod =
1001 noxParams_.sublist(
"Line Search").get(
"Method",
"Full Step");
1004 noxParams_.sublist(
"Line Search").sublist(lineSearchMethod)
1005 .set(
"Max Iters", maxSearchStep);
1008 if (in_Forcing == 0)
1010 noxParams_.sublist(
"Direction").sublist(directionMethod)
1011 .set(
"Forcing Term Method",
"Constant");
1013 else if (in_Forcing == 1)
1015 noxParams_.sublist(
"Direction").sublist(directionMethod)
1016 .set(
"Forcing Term Method",
"Type 1");
1017 noxParams_.sublist(
"Direction").sublist(
"Newton")
1018 .set(
"Forcing Term Minimum Tolerance", AZ_tol);
1022 noxParams_.sublist(
"Direction").sublist(directionMethod)
1023 .set(
"Forcing Term Method",
"Type 2");
1024 noxParams_.sublist(
"Direction").sublist(
"Newton")
1025 .set(
"Forcing Term Minimum Tolerance", AZ_tol);
1029 if (recoveryStepType == 1)
1032 noxParams_.sublist(
"Line Search").sublist(lineSearchMethod)
1033 .set(
"Recovery Step Type",
"Constant");
1038 noxParams_.sublist(
"Line Search").sublist(lineSearchMethod)
1039 .set(
"Recovery Step Type",
"Last Computed Step");
1043 noxParams_.sublist(
"Line Search").sublist(lineSearchMethod)
1044 .set(
"Recovery Step", recoveryStep);
1047 if ((directionMethod ==
"Quasi-Newton") ||
1048 (directionMethod ==
"Broyden"))
1049 noxParams_.sublist(
"Direction").sublist(directionMethod)
1050 .set(
"Memory", memory);
1066 Teuchos::ParameterList& stepperList =
locaParams_.sublist(
"Stepper");
1067 Teuchos::ParameterList& predictorList =
locaParams_.sublist(
"Predictor");
1068 Teuchos::ParameterList& stepSizeList =
locaParams_.sublist(
"Step Size");
1070 bool stepperGiven=
false;
1071 bool predictorGiven=
false;
1079 for (std::list<N_UTL_Param>::const_iterator it_tpL = OB.getParams().begin();
1080 it_tpL != OB.getParams().end(); ++ it_tpL)
1082 const std::string tag = it_tpL->uTag();
1083 std::string baseTag=tag.substr(0,8);
1084 bool isVectorParam=
false;
1085 if (baseTag ==
"CONPARAM" ||
1086 baseTag ==
"MINVALUE" ||
1087 baseTag ==
"MAXVALUE" ||
1088 baseTag ==
"INITIALV" ||
1089 baseTag ==
"INITIALS" ||
1090 baseTag ==
"MINSTEPS" ||
1091 (baseTag ==
"MAXSTEPS" && tag.substr(0,11)==
"MAXSTEPSIZE")||
1092 baseTag ==
"AGGRESSI")
1094 if (baseTag ==
"INITIALV")
1096 baseTag =
"INITIALVALUE";
1098 else if (baseTag ==
"INITIALS")
1100 baseTag =
"INITIALSTEPSIZE";
1102 else if (baseTag ==
"MINSTEPS")
1104 baseTag =
"MINSTEPSIZE";
1106 else if (baseTag ==
"MAXSTEPS")
1108 baseTag =
"MAXSTEPSIZE";
1110 else if (baseTag ==
"AGGRESSI")
1112 baseTag =
"AGGRESSIVENESS";
1115 std::string num=tag.substr(baseTag.size(),tag.size()-baseTag.size());
1116 int index=ExtendedString(num).Ival();
1120 if (tag ==
"STEPPER")
1123 if (it_tpL->isNumeric())
1125 int iType = it_tpL->getImmutableValue<
int>();
1128 stepperList.set(
"Continuation Method",
"Arc Length");
1129 stepperList.set(
"Skip df/dp",
false);
1133 stepperList.set(
"Continuation Method",
"Natural");
1134 stepperList.set(
"Skip df/dp",
true);
1139 ExtendedString p(it_tpL->stringValue());
1141 if (p.substr(0,3) ==
"ARC")
1143 stepperList.set(
"Continuation Method",
"Arc Length");
1144 stepperList.set(
"Skip df/dp",
false);
1146 else if (p.substr(0,3) ==
"NAT")
1148 stepperList.set(
"Continuation Method",
"Natural");
1149 stepperList.set(
"Skip df/dp",
true);
1153 std::string message =
"Unknown specification in .options for 'stepper': ";
1154 message += it_tpL->stringValue();
1155 message +=
". Legal choices are ARCLENGTH or NATURAL, which may be abbreviated to three characters.";
1156 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1160 else if (tag ==
"PREDICTOR")
1162 predictorGiven=
true;
1163 if (it_tpL->isNumeric())
1165 int iType = it_tpL->getImmutableValue<
int>();
1168 predictorList.set(
"Method",
"Tangent");
1170 else if (iType == 2)
1172 predictorList.set(
"Method",
"Secant");
1174 else if (iType == 3)
1176 predictorList.set(
"Method",
"Random");
1180 predictorList.set(
"Method",
"Constant");
1185 ExtendedString p(it_tpL->stringValue());
1187 if (p.substr(0,3) ==
"TAN")
1189 predictorList.set(
"Method",
"Tangent");
1191 else if (p.substr(0,3) ==
"SEC")
1193 predictorList.set(
"Method",
"Secant");
1195 else if (p.substr(0,3) ==
"RAN")
1197 predictorList.set(
"Method",
"Random");
1199 else if (p.substr(0,3) ==
"CON")
1201 predictorList.set(
"Method",
"Constant");
1205 std::string message =
"Unknown specification in .options for 'predictor': ";
1206 message += it_tpL->stringValue();
1207 message +=
". Legal choices are TANGENT, SECANT, RANDOM, CONSTANT, which may be abbreviated to three characters.";
1208 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1215 else if (tag ==
"CONPARAM1")
1217 stepperList.set(
"Continuation Parameter", it_tpL->stringValue());
1219 else if (tag ==
"INITIALVALUE1")
1221 stepperList.set(
"Initial Value", it_tpL->getImmutableValue<
double>());
1223 else if (tag ==
"MINVALUE1")
1226 stepperList.set(
"Min Value", it_tpL->getImmutableValue<
double>());
1228 else if (tag ==
"RESIDUALCONDUCTANCE")
1233 Xyce::Report::UserWarning0() <<
"A non-zero value for the GMIN Stepping residual conductance has been specified (RESIDUALCONDUCTANCE= " << it_tpL->stringValue() <<
")." << std::endl
1234 <<
"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.";
1237 else if (tag ==
"INITIALSTEPSIZE1")
1239 stepSizeList.set(
"Initial Step Size", it_tpL->getImmutableValue<
double>());
1241 else if (tag ==
"MINSTEPSIZE1")
1243 stepSizeList.set(
"Min Step Size", it_tpL->getImmutableValue<
double>());
1245 else if (tag ==
"MAXSTEPSIZE1")
1247 stepSizeList.set(
"Max Step Size", it_tpL->getImmutableValue<
double>());
1249 else if (tag ==
"AGGRESSIVENESS1")
1251 stepSizeList.set(
"Aggressiveness", it_tpL->getImmutableValue<
double>());
1253 else if (tag ==
"MAXVALUE1")
1255 stepperList.set(
"Max Value", it_tpL->getImmutableValue<
double>());
1257 else if (tag ==
"BIFPARAM")
1259 stepperList.set(
"Bifurcation Parameter", it_tpL->stringValue());
1261 else if (tag ==
"MAXSTEPS")
1263 stepperList.set(
"Max Steps", it_tpL->getImmutableValue<
int>());
1265 else if (tag ==
"MAXNLITERS")
1267 stepperList.set(
"Max Nonlinear Iterations", it_tpL->getImmutableValue<
int>());
1269 else if (tag ==
"STEPCONTROL")
1271 if (it_tpL->isNumeric())
1273 int iType = it_tpL->getImmutableValue<
int>();
1275 stepSizeList.set(
"Method",
"Adaptive");
1277 stepSizeList.set(
"Method",
"Constant");
1281 ExtendedString p(it_tpL->stringValue());
1283 if (p.substr(0,3) ==
"ADA")
1285 stepSizeList.set(
"Method",
"Adaptive");
1287 else if (p.substr(0,3) ==
"CON")
1289 stepSizeList.set(
"Method",
"Constant");
1293 std::string message =
"Unknown specification in .options for 'stepcontrol': ";
1294 message += it_tpL->stringValue();
1295 message +=
". Legal choices are ADAPTIVE or CONSTANT, which may be abbreviated to three characters.";
1296 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1300 else if (tag ==
"POWERNODE")
1302 stepperList.set(
"Power Node", it_tpL->stringValue());
1304 else if (tag ==
"VOLTAGELIST")
1306 ExtendedString p(it_tpL->stringValue());
1308 if (p.substr(0,3) ==
"DOF")
1312 else if (p.substr(0,3) ==
"NOD")
1318 std::string message =
"Unknown specification in .options loca for 'voltagelist': ";
1319 message += it_tpL->stringValue();
1320 message +=
". Legal choices are DOFS or NODES, which may be abbreviated to three characters.";
1321 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1324 else if(tag ==
"VOLTAGESCALEFACTOR")
1329 else if (std::string(tag,0,10) ==
"PARAMLIST")
1332 Xyce::dout() <<
"tag = " << tag << std::endl;
1340 std::string tmp =tag +
" is not a recognized loca option.\n";
1341 N_ERH_ErrorMgr::report (N_ERH_ErrorMgr::USR_WARNING_0, tmp);
1351 stepperList.set(
"Continuation Method",
"Natural");
1352 stepperList.set(
"Skip df/dp",
true);
1355 if (!predictorGiven)
1357 predictorList.set(
"Method",
"Tangent");
1376 value =
vectorParams[tag][index].getImmutableValue<
double>();
1423 std::string msg =
"N_NLS_NOX::ParameterSet::getVectorParam - ";
1424 msg +=
"the parameter \"";
1426 msg +=
"\" is required for parameter continuation!";
1427 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, msg);
1444 Teuchos::RefCountPtr<N_NLS_NOX::XyceTests> testPtr =
1446 if (Teuchos::is_null(testPtr))
1448 const std::string message =
"N_NLS_NOX::getStatusTestReturnCode - Dynamic cast on Xyce Tests check failed.";
1449 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1452 return testPtr->getXyceReturnCode();
1467 Teuchos::RefCountPtr<N_NLS_NOX::XyceTests> testPtr =
1469 if (Teuchos::is_null(testPtr))
1471 const std::string message =
"N_NLS_NOX::setStatusTestReturnCode - Dynamic cast on Xyce Tests check failed.";
1472 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1475 return testPtr->setReturnCodes (retCodesTmp);
1489 Teuchos::RefCountPtr<N_NLS_NOX::XyceTests> testPtr =
1491 if (Teuchos::is_null(testPtr))
1493 const std::string message =
"N_NLS_NOX::getMaxNormF - Dynamic cast on Xyce Tests check failed.";
1494 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1497 return testPtr->getMaxNormF();
1511 Teuchos::RefCountPtr<N_NLS_NOX::XyceTests> testPtr =
1513 if (Teuchos::is_null(testPtr))
1515 const std::string message =
"N_NLS_NOX::getMaxNormFindex - Dynamic cast on Xyce Tests check failed.";
1516 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1519 return testPtr->getMaxNormFindex ();
1548 Teuchos::RefCountPtr<N_NLS_NOX::AugmentLinSys>
1551 Teuchos::RefCountPtr<N_NLS_NOX::AugmentLinSys> als;
1555 Teuchos::RefCountPtr<Epetra_MapColoring> color_map =
1556 Teuchos::rcp(ls->builder().createSolnColoring());
1560 als = Teuchos::rcp(
new N_NLS_NOX::
1562 ls->getRHSVector()) );
1566 als = Teuchos::rcp(
new N_NLS_NOX::
1578 Teuchos::RefCountPtr<Epetra_MapColoring> color_map =
1579 Teuchos::rcp(ls->builder().createSolnColoring());
1588 als = Teuchos::rcp(
new N_NLS_NOX::
1589 GStepping(ls->getQueryUtil()->vnodeGIDVec(),
1597 std::string message =
"N_NLS_NOX::createAugmentLinearSystem - The \'continuation\' ";
1598 message +=
"parameter in the .options nox list must be set to PSEUDO or NATURAL for ";
1599 message +=
"this function to be called!";
1600 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1614 Teuchos::RefCountPtr<N_NLS_NOX::AugmentLinSys>
1616 #ifdef Xyce_PARALLEL_MPI
1617 const Xyce::NodeNamePairMap & allNodes, N_PDS_Comm * pdsCommPtr
1619 const Xyce::NodeNamePairMap & allNodes
1623 Teuchos::RefCountPtr<N_NLS_NOX::AugmentLinSys> als;
1625 #ifdef Xyce_PARALLEL_MPI
1643 Teuchos::RefCountPtr<N_NLS_NOX::AugmentLinSys>
1645 bool gminStepping)
const
1647 Teuchos::RefCountPtr<N_NLS_NOX::AugmentLinSys> als;
1649 Teuchos::RefCountPtr<Epetra_MapColoring> ICcolor_map =
1650 Teuchos::rcp(ls->builder().createInitialConditionColoring());
1652 if (gminStepping==
false)
1660 Teuchos::RefCountPtr<Epetra_MapColoring> GMINcolor_map =
1661 Teuchos::rcp(ls->builder().createSolnColoring());
1677 ls->getQueryUtil()->vnodeGIDVec(),