48 #include <Xyce_config.h>
51 #include <N_UTL_Misc.h>
62 #include <N_ERH_ErrorMgr.h>
63 #include <N_IO_CmdParse.h>
64 #include <N_IO_OutputMgr.h>
65 #include <N_UTL_Expression.h>
71 #include <Teuchos_RefCountPtr.hpp>
87 conductanceExtractorPtr_(0x0),
88 nlsSensitivityPtr_(0x0),
98 twoLevelNewtonFlag_(false),
100 noxFlagInner_(false),
101 noxFlagTransient_(false),
102 setupSensFlag_(false),
103 initializeAllFlag_(false),
148 std::string netListFile =
"";
439 for (std::list<N_UTL_Param>::const_iterator it_tpL = OBdcop.getParams().begin();
440 it_tpL != OBdcop.getParams().end(); ++ it_tpL)
442 if (it_tpL->uTag() ==
"NOX")
444 noxFlag_ = it_tpL->getImmutableValue<
int>();
450 std::map<std::string,N_UTL_OptionBlock>::iterator obmIter =
optionBlockMap_.find(
"twolevel") ;
454 N_UTL_OptionBlock OBtwoLevel = obmIter->second;
455 for (std::list<N_UTL_Param>::const_iterator it_tpL = OBtwoLevel.getParams().begin();
456 it_tpL != OBtwoLevel.getParams().end(); ++ it_tpL)
458 if (it_tpL->uTag() ==
"NOX")
467 for (std::list<N_UTL_Param>::const_iterator it_tpL = OBtran.getParams().begin();
468 it_tpL != OBtran.getParams().end(); ++ it_tpL)
470 if (it_tpL->uTag() ==
"NOX")
479 N_UTL_OptionBlock OBhb= obmIter->second;
480 for (std::list<N_UTL_Param>::const_iterator it_tpL = OBhb.getParams().begin();
481 it_tpL != OBhb.getParams().end(); ++ it_tpL)
483 if (it_tpL->uTag() ==
"NOX")
485 noxFlag_ = it_tpL->getImmutableValue<
int>();
500 #ifdef Xyce_DEBUG_NONLINEAR
501 Xyce::dout() <<
"noxFlag is: " << (
noxFlag_ ?
"true" :
"false") << std::endl
502 <<
"noxFlagTransient is: " << (
noxFlagTransient_ ?
"true" :
"false") << std::endl;
524 bool bsuccess =
true;
570 std::map<std::string,N_UTL_OptionBlock>::iterator obmIter =
optionBlockMap_.find(
"dcop") ;
574 const N_UTL_OptionBlock OB = obmIter->second;
576 bsuccess = bsuccess && bs1;
582 const N_UTL_OptionBlock OB = obmIter->second;
584 bsuccess = bsuccess && bs1;
590 const N_UTL_OptionBlock OB = obmIter->second;
592 bsuccess = bsuccess && bs1;
598 const N_UTL_OptionBlock OB = obmIter->second;
600 bsuccess = bsuccess && bs1;
606 const N_UTL_OptionBlock OB = obmIter->second;
608 bsuccess = bsuccess && bs1;
614 const N_UTL_OptionBlock OB = obmIter->second;
616 bsuccess = bsuccess && bs1;
622 const N_UTL_OptionBlock OB = obmIter->second;
624 bsuccess = bsuccess && bs1;
630 const N_UTL_OptionBlock OB = obmIter->second;
632 bsuccess = bsuccess && bs1;
638 const N_UTL_OptionBlock OB = obmIter->second;
640 bsuccess = bsuccess && bs1;
646 const N_UTL_OptionBlock OB = obmIter->second;
648 bsuccess = bsuccess && bs1;
654 const N_UTL_OptionBlock OB = obmIter->second;
656 bsuccess = bsuccess && bs1;
676 bool bsuccess =
true;
708 bool bsuccess =
true;
739 std::map<std::string,N_UTL_OptionBlock>::iterator obmIter =
optionBlockMap_.find(
"transient") ;
743 const N_UTL_OptionBlock OB = obmIter->second;
745 bsuccess = bsuccess && bs1;
899 exprPtr = Teuchos::rcp(
new N_UTL_Expression (std::string(
"0")) );
1060 bool bsuccess =
true;
1078 bool bsuccess =
true;
1096 bool bsuccess =
true;
1101 bsuccess = bsuccess && b1;
1115 std::vector<double> & objectiveVec,
1116 std::vector<double> & dOdpVec,
1117 std::vector<double> & dOdpAdjVec,
1118 std::vector<double> & scaled_dOdpVec,
1119 std::vector<double> & scaled_dOdpAdjVec)
1123 dOdpVec, dOdpAdjVec,
1124 scaled_dOdpVec, scaled_dOdpAdjVec);
1140 std::vector<double> & objectiveVec,
1141 std::vector<double> & dOdpVec,
1142 std::vector<double> & dOdpAdjVec,
1143 std::vector<double> & scaled_dOdpVec,
1144 std::vector<double> & scaled_dOdpAdjVec)
1146 bool bsuccess =
true;
1148 if (!setupSensFlag_)
1150 std::string msg =
"Function Manager::calcSensitivity called,\n";
1151 msg +=
"but Manager::enableSensitivity must be called first.\n";
1152 N_ERH_ErrorMgr::report(N_ERH_ErrorMgr::DEV_FATAL_0, msg);
1155 bsuccess = nlsSensitivityPtr_->solve (objectiveVec,
1156 dOdpVec, dOdpAdjVec,
1157 scaled_dOdpVec, scaled_dOdpAdjVec);
1172 bool bsuccess =
true;
1179 std::map<std::string,N_UTL_OptionBlock>::iterator obmIter =
optionBlockMap_.find(
"sens") ;
1182 const N_UTL_OptionBlock OB = obmIter->second;
1184 bsuccess = bsuccess && bs1;
1190 const N_UTL_OptionBlock OB = obmIter->second;
1192 bsuccess = bsuccess && bs1;
1270 bool bsuccess =
true;
1325 const std::map<std::string,double> & inputMap,
1326 std::vector<double> & outputVector,
1327 std::vector< std::vector<double> > & jacobian
1330 bool bsuccess =
true;
1362 const std::string & isoName,
1363 std::vector< std::vector<double> > & jacobian )
1365 bool bsuccess =
true;