46 #include <Xyce_config.h>
52 #include <N_UTL_Misc.h>
70 #include "N_ERH_ErrorMgr.h"
71 #include "N_UTL_Param.h"
72 #include "N_PDS_fwd.h"
73 #include "N_UTL_OptionBlock.h"
76 #include "N_LOA_Loader.h"
85 #include "N_LAS_Builder.h"
86 #include "N_LAS_System.h"
87 #include "N_LAS_QueryUtil.h"
88 #include "Epetra_MapColoring.h"
90 using namespace N_NLS_NOX;
101 allParams_(Teuchos::rcp(new Teuchos::ParameterList)),
102 noxParams_(allParams_->sublist(
"NOX")),
103 locaParams_(allParams_->sublist(
"LOCA")),
104 debugParams_(allParams_->sublist(
"DEBUG")),
105 comboPtr_(Teuchos::rcp(new NOX::StatusTest::Combo(NOX::StatusTest::Combo::OR))),
107 isStatusTestsSet_(false),
110 voltageListType_(VLT_None),
111 gstepping_minimum_conductance_(0.0),
112 savedLocaOptions_(false),
114 debugMinTimeStep_(0),
115 debugMaxTimeStep_(N_UTL_MachineDependentParams::IntMax()),
117 debugMaxTime_(N_UTL_MachineDependentParams::DoubleMax()),
118 screenOutputFlag_(false),
119 voltageScaleFactor_(1.0)
125 #ifdef Xyce_VERBOSE_NOX
127 .set(
"Output Information",
129 NOX::Utils::Warning +
130 NOX::Utils::OuterIteration +
131 NOX::Utils::OuterIterationStatusTest +
132 NOX::Utils::InnerIteration +
133 NOX::Utils::Details +
134 NOX::Utils::StepperIteration +
135 NOX::Utils::StepperDetails +
136 NOX::Utils::Parameters
140 #ifdef Xyce_VERBOSE_NONLINEAR
142 .set(
"Output Information",
144 NOX::Utils::Warning +
145 NOX::Utils::OuterIteration +
146 NOX::Utils::StepperIteration
150 .set(
"Output Information", NOX::Utils::Error);
164 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
165 noxParams_.sublist(
"Line Search").set(
"Method",
"Full Step");
181 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
182 noxParams_.sublist(
"Line Search").set(
"Method",
"Full Step");
197 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
198 noxParams_.sublist(
"Line Search").set(
"Method",
"Full Step");
199 noxParams_.sublist(
"Direction").sublist(
"Newton")
200 .sublist(
"Linear Solver").set(
"Tolerance", 1.0e-12);
205 noxParams_.sublist(
"Line Search").sublist(
"Polynomial")
206 .set(
"Recovery Step Type",
"Last Computed Step");
210 Teuchos::ParameterList& stepperList =
locaParams_.sublist(
"Stepper");
211 Teuchos::ParameterList& predictorList =
locaParams_.sublist(
"Predictor");
212 Teuchos::ParameterList& stepSizeList =
locaParams_.sublist(
"Step Size");
214 stepperList.set(
"Continuation Method",
"Natural");
215 stepperList.set(
"Skip df/dp",
true);
216 predictorList.set(
"Method",
"Tangent");
262 noxParams_.sublist(
"Printing").set(
"MyPID", myPID);
263 noxParams_.sublist(
"Printing").set(
"Output Processor",
265 locaParams_.sublist(
"Utilities").set(
"MyPID", myPID);
266 locaParams_.sublist(
"Utilities").set(
"Output Processor",
280 N_LOA_Loader& loader, std::vector<char> & varTypeVec
281 #ifdef Xyce_NLS_MASKED_WRMS_NORMS
282 ,
bool nonTrivialDeviceMaskFlag, N_LAS_Vector * maskVectorPtr)
402 bool isTransient =
false;
409 Teuchos::RefCountPtr<N_NLS_NOX::XyceTests> allTests;
410 if( statusTestParams_.get(
"FASTTESTS",
false) )
414 statusTestParams_.get(
"RHSTOL", 1.0e-6),
415 N_UTL_MachineDependentParams::MachineEpsilon(),
417 statusTestParams_.get(
"ABSTOL", 1.0e-12),
418 statusTestParams_.get(
"RELTOL", 1.0e-3),
419 statusTestParams_.get(
"DELTAXTOL", 1.0),
420 statusTestParams_.get(
"MAXSTEP", 200),
423 0.5*N_UTL_MachineDependentParams::DoubleMax(),
426 statusTestParams_.get(
"ENFORCEDEVICECONV", 1),
427 statusTestParams_.get(
"SMALLUPDATETOL", 1.0e-6),
430 statusTestParams_.get(
"VOLTZEROTOL", 1.0e-6),
431 statusTestParams_.get(
"CURRZEROTOL", 1.0e-6)
432 #ifdef Xyce_NLS_MASKED_WRMS_NORMS
433 , nonTrivialDeviceMaskFlag, maskVectorPtr
441 statusTestParams_.get(
"RHSTOL", 1.0e-6),
442 N_UTL_MachineDependentParams::MachineEpsilon(),
444 statusTestParams_.get(
"ABSTOL", 1.0e-12),
445 statusTestParams_.get(
"RELTOL", 1.0e-3),
446 statusTestParams_.get(
"DELTAXTOL", 1.0),
447 statusTestParams_.get(
"MAXSTEP", 200),
450 0.5*N_UTL_MachineDependentParams::DoubleMax(),
453 statusTestParams_.get(
"ENFORCEDEVICECONV", 1),
454 statusTestParams_.get(
"SMALLUPDATETOL", 1.0e-6),
456 #ifdef Xyce_NLS_MASKED_WRMS_NORMS
457 , nonTrivialDeviceMaskFlag, maskVectorPtr
461 tests_.push_back(allTests);
462 comboPtr_->addStatusTest(allTests);
463 isStatusTestsSet_ =
true;
479 const std::string message =
"Error: N_NLS::NOX::ParameterSet::getStatusTests() - Status tests are not set!";
480 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
549 "Tag \"" + tag +
"\" is unsupported by the NOX interface at this time.\n";
550 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, warning);
570 int maxSearchStep = 2;
572 double AZ_tol = 1.0e-12;
573 int recoveryStepType = 0;
574 double recoveryStep = 1.0;
579 for (std::list<N_UTL_Param>::const_iterator it_tpL = OB.getParams().begin();
580 it_tpL != OB.getParams().end(); ++ it_tpL)
582 const std::string tag = it_tpL->uTag();
590 else if (tag ==
"RELTOL")
594 else if (tag ==
"DELTAXTOL")
598 else if (tag ==
"RHSTOL")
602 else if (tag ==
"MAXSTEP")
606 else if (tag ==
"SMALLUPDATETOL")
612 else if (tag ==
"ENFORCEDEVICECONV")
616 else if (tag ==
"FASTTESTS")
620 else if (tag ==
"VOLTZEROTOL")
624 else if (tag ==
"ABSZEROTOL")
630 else if (tag ==
"LINOPT")
634 else if (tag ==
"CONSTRAINTBT")
638 else if (tag ==
"CONSTRAINTMAX")
642 else if (tag ==
"CONSTRAINTMIN")
646 else if (tag ==
"CONSTRAINTCHANGE")
650 else if (tag ==
"NORMLVL")
652 if (it_tpL->getImmutableValue<
int>() != 2)
655 else if (tag ==
"DEBUGLEVEL")
659 else if (tag ==
"SCREENOUTPUT")
663 else if (tag ==
"DEBUGMINTIMESTEP")
667 else if (tag ==
"DEBUGMAXTIMESTEP")
671 else if (tag ==
"DEBUGMINTIME")
675 else if (tag ==
"DEBUGMAXTIME")
679 else if (tag ==
"DLSDEBUG")
683 else if (tag ==
"NLSTRATEGY")
685 int val = it_tpL->getImmutableValue<
int>();
688 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
689 noxParams_.sublist(
"Direction").set(
"Method",
"Newton");
693 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
695 .set(
"Method",
"Steepest Descent");
699 noxParams_.set(
"Nonlinear Solver",
"Trust Region Based");
703 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
705 .set(
"Method",
"Modified-Newton");
709 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
710 noxParams_.sublist(
"Direction").set(
"Method",
"Quasi-Newton");
714 noxParams_.set(
"Nonlinear Solver",
"Line Search Based");
715 noxParams_.sublist(
"Direction").set(
"Method",
"Broyden");
719 noxParams_.set(
"Nonlinear Solver",
"Tensor Based");
720 noxParams_.sublist(
"Direction").set(
"Method",
"Tensor");
721 noxParams_.sublist(
"Direction").sublist(
"Tensor")
722 .sublist(
"Linear Solver").set(
"Compute Step",
"Newton");
723 noxParams_.sublist(
"Direction").sublist(
"Tensor")
724 .sublist(
"Linear Solver").set(
"Reorthogonalize",
"Always");
725 noxParams_.sublist(
"Line Search").set(
"Method",
"Tensor");
726 noxParams_.sublist(
"Line Search").sublist(
"Tensor")
727 .set(
"Submethod",
"Full Step");
733 "NLStrategy = 7 is no longer supported.\n";
734 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, warning);
740 "NLStrategy = 8 is no longer supported.\n";
741 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, warning);
746 "NLStrategy is not found!\n";
747 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, warning);
752 else if (tag ==
"SEARCHMETHOD")
754 int val = it_tpL->getImmutableValue<
int>();
757 noxParams_.sublist(
"Line Search").set(
"Method",
"Full Step");
761 noxParams_.sublist(
"Line Search").set(
"Method",
"Backtrack");
765 noxParams_.sublist(
"Line Search").set(
"Method",
"Polynomial");
766 noxParams_.sublist(
"Line Search").sublist(
"Polynomial")
767 .set(
"Interpolation Type",
"Quadratic");
771 noxParams_.sublist(
"Line Search").set(
"Method",
"Polynomial");
772 noxParams_.sublist(
"Line Search").sublist(
"Polynomial")
773 .set(
"Interpolation Type",
"Cubic");
778 .set(
"Method",
"More'-Thuente");
782 std::ostringstream ost;
783 ost <<
"N_NLS_NOX::ParameterSet::parseOptionBlock_ - "
784 <<
"SEARCHMETHOD = " << val
785 <<
" not supported by Xyce at this time." << std::endl;
786 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, ost.str());
791 else if (tag ==
"TRMINRADIUS")
794 .set(
"Minimum Trust Region Radius", it_tpL->getImmutableValue<
double>());
796 else if (tag ==
"TRMAXRADIUS")
799 .set(
"Maximum Trust Region Radius", it_tpL->getImmutableValue<
double>());
801 else if (tag ==
"TRMINIMPROVEMENTRATIO")
804 .set(
"Minimum Improvement Ratio", it_tpL->getImmutableValue<
double>());
806 else if (tag ==
"TRCONTRACTIONRATIO")
809 .set(
"Contraction Trigger Ratio", it_tpL->getImmutableValue<
double>());
811 else if (tag ==
"TRCONTRACTIONFACTOR")
814 .set(
"Contraction Factor", it_tpL->getImmutableValue<
double>());
816 else if (tag ==
"TREXPANSIONRATIO")
819 .set(
"Expansion Trigger Ratio", it_tpL->getImmutableValue<
double>());
821 else if (tag ==
"TREXPANSIONFACTOR")
824 .set(
"Expansion Factor", it_tpL->getImmutableValue<
double>());
826 else if (tag ==
"TRRECOVERYSTEP")
829 .set(
"Recovery Step", it_tpL->getImmutableValue<
double>());
833 else if (tag ==
"NOX")
844 else if (tag ==
"CONTINUATION")
846 if (it_tpL->isNumeric())
848 noxSolver = it_tpL->getImmutableValue<
int>();
852 ExtendedString p(it_tpL->stringValue());
854 if (p.substr(0,4) ==
"STAN")
858 else if (p.substr(0,3) ==
"NAT")
862 else if (p.substr(0,3) ==
"MOS")
866 else if (p.substr(0,4) ==
"GMIN")
870 else if (p.substr(0,6) ==
"NEWMOS")
874 else if (p.substr(0,9) ==
"BSIM3INV1")
878 else if (p.substr(0,9) ==
"BSIM3INV2")
882 else if (p.substr(0,9) ==
"BLOCKGAIN")
886 else if (p.substr(0,4) ==
"TEST")
890 else if (p.substr(0,6) ==
"PSEUDO")
894 else if (p.substr(0,5) ==
"POWER")
898 else if (p.substr(0,3) ==
"ART")
904 std::string message =
"Unknown specification in .options for 'continuation': ";
905 message += it_tpL->stringValue();
906 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
911 #ifndef Xyce_NOX_LOCA_ARTIFICIAL_HOMOTOPY_SUPPORT
914 Xyce::Report::UserFatal0() <<
"Nonlinear Solver (NOX::Interface) Artificial parameter continuation requires "
915 <<
"building xyce with the define: -DXyce_NOX_LOCA_ARTIFICIAL_HOMOTOPY_SUPPORT to "
916 <<
"allow LOCA to augment the diagonal of Jacobian! Either rebuild Xyce or do not "
917 <<
"run Xyce with \"continuation=33\"";
925 else if (tag ==
"MAXSEARCHSTEP")
927 maxSearchStep = it_tpL->getImmutableValue<
int>();
929 else if (tag ==
"IN_FORCING")
931 in_Forcing = it_tpL->getImmutableValue<
int>();
933 else if (tag ==
"AZ_TOL")
935 AZ_tol = it_tpL->getImmutableValue<
double>();
937 else if (tag ==
"RECOVERYSTEPTYPE")
939 recoveryStepType = it_tpL->getImmutableValue<
int>();
941 else if (tag ==
"RECOVERYSTEP")
943 recoveryStep = it_tpL->getImmutableValue<
double>();
945 else if (tag ==
"MEMORY")
947 memory = it_tpL->getImmutableValue<
int>();
952 else if (tag ==
"MAXSEARCHSTEP")
954 maxSearchStep = it_tpL->getImmutableValue<
int>();
956 else if (tag ==
"IN_FORCING")
958 in_Forcing = it_tpL->getImmutableValue<
int>();
960 else if (tag ==
"AZ_TOL")
962 AZ_tol = it_tpL->getImmutableValue<
double>();
964 else if (tag ==
"RECOVERYSTEPTYPE")
966 recoveryStepType = it_tpL->getImmutableValue<
int>();
968 else if (tag ==
"RECOVERYSTEP")
970 recoveryStep = it_tpL->getImmutableValue<
double>();
972 else if (tag ==
"MEMORY")
974 memory = it_tpL->getImmutableValue<
int>();
980 Xyce::Report::UserWarning() << tag <<
" is not a recognized nonlinear solver option.\n" << std::endl;
995 std::string directionMethod =
996 noxParams_.sublist(
"Direction").get(
"Method",
"Newton");
998 std::string lineSearchMethod =
999 noxParams_.sublist(
"Line Search").get(
"Method",
"Full Step");
1002 noxParams_.sublist(
"Line Search").sublist(lineSearchMethod)
1003 .set(
"Max Iters", maxSearchStep);
1006 if (in_Forcing == 0)
1008 noxParams_.sublist(
"Direction").sublist(directionMethod)
1009 .set(
"Forcing Term Method",
"Constant");
1011 else if (in_Forcing == 1)
1013 noxParams_.sublist(
"Direction").sublist(directionMethod)
1014 .set(
"Forcing Term Method",
"Type 1");
1015 noxParams_.sublist(
"Direction").sublist(
"Newton")
1016 .set(
"Forcing Term Minimum Tolerance", AZ_tol);
1020 noxParams_.sublist(
"Direction").sublist(directionMethod)
1021 .set(
"Forcing Term Method",
"Type 2");
1022 noxParams_.sublist(
"Direction").sublist(
"Newton")
1023 .set(
"Forcing Term Minimum Tolerance", AZ_tol);
1027 if (recoveryStepType == 1)
1030 noxParams_.sublist(
"Line Search").sublist(lineSearchMethod)
1031 .set(
"Recovery Step Type",
"Constant");
1036 noxParams_.sublist(
"Line Search").sublist(lineSearchMethod)
1037 .set(
"Recovery Step Type",
"Last Computed Step");
1041 noxParams_.sublist(
"Line Search").sublist(lineSearchMethod)
1042 .set(
"Recovery Step", recoveryStep);
1045 if ((directionMethod ==
"Quasi-Newton") ||
1046 (directionMethod ==
"Broyden"))
1047 noxParams_.sublist(
"Direction").sublist(directionMethod)
1048 .set(
"Memory", memory);
1064 Teuchos::ParameterList& stepperList =
locaParams_.sublist(
"Stepper");
1065 Teuchos::ParameterList& predictorList =
locaParams_.sublist(
"Predictor");
1066 Teuchos::ParameterList& stepSizeList =
locaParams_.sublist(
"Step Size");
1068 bool stepperGiven=
false;
1069 bool predictorGiven=
false;
1077 for (std::list<N_UTL_Param>::const_iterator it_tpL = OB.getParams().begin();
1078 it_tpL != OB.getParams().end(); ++ it_tpL)
1080 const std::string tag = it_tpL->uTag();
1081 std::string baseTag=tag.substr(0,8);
1082 bool isVectorParam=
false;
1083 if (baseTag ==
"CONPARAM" ||
1084 baseTag ==
"MINVALUE" ||
1085 baseTag ==
"MAXVALUE" ||
1086 baseTag ==
"INITIALV" ||
1087 baseTag ==
"INITIALS" ||
1088 baseTag ==
"MINSTEPS" ||
1089 (baseTag ==
"MAXSTEPS" && tag.substr(0,11)==
"MAXSTEPSIZE")||
1090 baseTag ==
"AGGRESSI")
1092 if (baseTag ==
"INITIALV")
1094 baseTag =
"INITIALVALUE";
1096 else if (baseTag ==
"INITIALS")
1098 baseTag =
"INITIALSTEPSIZE";
1100 else if (baseTag ==
"MINSTEPS")
1102 baseTag =
"MINSTEPSIZE";
1104 else if (baseTag ==
"MAXSTEPS")
1106 baseTag =
"MAXSTEPSIZE";
1108 else if (baseTag ==
"AGGRESSI")
1110 baseTag =
"AGGRESSIVENESS";
1113 std::string num=tag.substr(baseTag.size(),tag.size()-baseTag.size());
1114 int index=ExtendedString(num).Ival();
1118 if (tag ==
"STEPPER")
1121 if (it_tpL->isNumeric())
1123 int iType = it_tpL->getImmutableValue<
int>();
1126 stepperList.set(
"Continuation Method",
"Arc Length");
1127 stepperList.set(
"Skip df/dp",
false);
1131 stepperList.set(
"Continuation Method",
"Natural");
1132 stepperList.set(
"Skip df/dp",
true);
1137 ExtendedString p(it_tpL->stringValue());
1139 if (p.substr(0,3) ==
"ARC")
1141 stepperList.set(
"Continuation Method",
"Arc Length");
1142 stepperList.set(
"Skip df/dp",
false);
1144 else if (p.substr(0,3) ==
"NAT")
1146 stepperList.set(
"Continuation Method",
"Natural");
1147 stepperList.set(
"Skip df/dp",
true);
1151 std::string message =
"Unknown specification in .options for 'stepper': ";
1152 message += it_tpL->stringValue();
1153 message +=
". Legal choices are ARCLENGTH or NATURAL, which may be abbreviated to three characters.";
1154 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1158 else if (tag ==
"PREDICTOR")
1160 predictorGiven=
true;
1161 if (it_tpL->isNumeric())
1163 int iType = it_tpL->getImmutableValue<
int>();
1166 predictorList.set(
"Method",
"Tangent");
1168 else if (iType == 2)
1170 predictorList.set(
"Method",
"Secant");
1172 else if (iType == 3)
1174 predictorList.set(
"Method",
"Random");
1178 predictorList.set(
"Method",
"Constant");
1183 ExtendedString p(it_tpL->stringValue());
1185 if (p.substr(0,3) ==
"TAN")
1187 predictorList.set(
"Method",
"Tangent");
1189 else if (p.substr(0,3) ==
"SEC")
1191 predictorList.set(
"Method",
"Secant");
1193 else if (p.substr(0,3) ==
"RAN")
1195 predictorList.set(
"Method",
"Random");
1197 else if (p.substr(0,3) ==
"CON")
1199 predictorList.set(
"Method",
"Constant");
1203 std::string message =
"Unknown specification in .options for 'predictor': ";
1204 message += it_tpL->stringValue();
1205 message +=
". Legal choices are TANGENT, SECANT, RANDOM, CONSTANT, which may be abbreviated to three characters.";
1206 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1213 else if (tag ==
"CONPARAM1")
1215 stepperList.set(
"Continuation Parameter", it_tpL->stringValue());
1217 else if (tag ==
"INITIALVALUE1")
1219 stepperList.set(
"Initial Value", it_tpL->getImmutableValue<
double>());
1221 else if (tag ==
"MINVALUE1")
1224 stepperList.set(
"Min Value", it_tpL->getImmutableValue<
double>());
1226 else if (tag ==
"RESIDUALCONDUCTANCE")
1231 std::string message =
"You have specified a non-zero value for the GMIN Stepping residual conductance (RESIDUALCONDUCTANCE= ";
1232 message += it_tpL->stringValue();
1233 message +=
").\nThis 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.\n";
1234 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::USR_WARNING_0, message);
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 ();
1543 Teuchos::RefCountPtr<N_NLS_NOX::AugmentLinSys>
1546 Teuchos::RefCountPtr<N_NLS_NOX::AugmentLinSys> als;
1550 Teuchos::RefCountPtr<Epetra_MapColoring> color_map =
1551 Teuchos::rcp(ls->builder().createSolnColoring());
1555 als = Teuchos::rcp(
new N_NLS_NOX::
1557 ls->getRHSVector()) );
1561 als = Teuchos::rcp(
new N_NLS_NOX::
1573 Teuchos::RefCountPtr<Epetra_MapColoring> color_map =
1574 Teuchos::rcp(ls->builder().createSolnColoring());
1583 als = Teuchos::rcp(
new N_NLS_NOX::
1584 GStepping(ls->getQueryUtil()->vnodeGIDVec(),
1592 std::string message =
"N_NLS_NOX::createAugmentLinearSystem - The \'continuation\' ";
1593 message +=
"parameter in the .options nox list must be set to PSEUDO or NATURAL for ";
1594 message +=
"this function to be called!";
1595 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL, message);
1609 Teuchos::RefCountPtr<N_NLS_NOX::AugmentLinSys>
1611 #ifdef Xyce_PARALLEL_MPI
1612 Xyce::NodeNamePairMap & allNodes, N_PDS_Comm * pdsCommPtr
1614 Xyce::NodeNamePairMap & allNodes
1618 Teuchos::RefCountPtr<N_NLS_NOX::AugmentLinSys> als;
1620 #ifdef Xyce_PARALLEL_MPI
1638 Teuchos::RefCountPtr<N_NLS_NOX::AugmentLinSys>
1640 bool gminStepping)
const
1642 Teuchos::RefCountPtr<N_NLS_NOX::AugmentLinSys> als;
1644 Teuchos::RefCountPtr<Epetra_MapColoring> ICcolor_map =
1645 Teuchos::rcp(ls->builder().createInitialConditionColoring());
1647 if (gminStepping==
false)
1655 Teuchos::RefCountPtr<Epetra_MapColoring> GMINcolor_map =
1656 Teuchos::rcp(ls->builder().createSolnColoring());
1672 ls->getQueryUtil()->vnodeGIDVec(),