46 #include <Xyce_config.h>
50 #if defined(HAVE_UNORDERED_MAP)
51 #include <unordered_map>
52 using std::unordered_map;
53 #elif defined(HAVE_TR1_UNORDERED_MAP)
54 #include <tr1/unordered_map>
55 using std::tr1::unordered_map;
57 #error neither unordered_map or tr1/unordered_map found
67 #include <N_LAS_Vector.h>
68 #include <N_UTL_BreakPoint.h>
69 #include <N_UTL_Diagnostic.h>
70 #include <N_UTL_Expression.h>
71 #include <N_UTL_FeatureTest.h>
88 const std::string & netlist_filename,
90 : parametricData_(parametric_data),
91 solState_(solver_state),
92 globals_(solver_state.getGlobals()),
93 devOptions_(device_options),
95 netlistLocation_(netlist_filename, netlist_line)
131 DevelFatal(*this).in(
"DeviceEntity::scaleParam") <<
"Unrecognized parameter " << paramName;
138 DevelFatal(*this).in(
"DeviceEntity::scaleParam") <<
"Original value not available for parameter " << paramName;
142 if (!param.
isType<
double>())
144 DevelFatal(*this).in(
"DeviceEntity::scaleParam") <<
"Can scale only double parameters, parameter " << paramName <<
" is not double";
151 if (param.hasGivenMember())
152 param.setGiven(*
this,
true);
176 DevelFatal(*this).in(
"DeviceEntity::scaleParam") <<
"Unrecognized parameter " << paramName;
183 DevelFatal(*this).in(
"DeviceEntity::scaleParam") <<
"Original value not available for parameter " << paramName;
187 if (!param.
isType<
double>())
189 DevelFatal(*this).in(
"DeviceEntity::scaleParam") <<
"Can scale only double parameters, parameter " << paramName <<
" is not double";
217 DevelFatal(*this).in(
"DeviceEntity::scaleDefaultParam") <<
"Device does not have a default parameter";
237 DevelFatal(*this).in(
"DeviceEntity::analyticSensitivityAvailable") <<
"Unrecognized parameter " << paramName;
257 DevelFatal(*this).in(
"DeviceEntity::analyticSensitivityAvailableDefaultParam")
258 <<
"Device does not have a default parameter";
274 std::vector<double> & dfdpVec,
275 std::vector<double> & dqdpVec,
276 std::vector<double> & dbdpVec,
277 std::vector<int> & FindicesVec,
278 std::vector<int> & QindicesVec,
279 std::vector<int> & BindicesVec)
284 DevelFatal(*this).in(
"DeviceEntity::analyticSensitivityAvailable") <<
"Unrecognized parameter " << paramName;
291 FindicesVec, QindicesVec, BindicesVec);
304 std::vector<double> & dfdpVec,
305 std::vector<double> & dqdpVec,
306 std::vector<double> & dbdpVec,
307 std::vector<int> & FindicesVec,
308 std::vector<int> & QindicesVec,
309 std::vector<int> & BindicesVec)
313 DevelFatal(*this).in(
"DeviceEntity::getAnalyticSensitivityDefaultParam")
314 <<
"Device does not have a default parameter";
319 dfdpVec, dqdpVec, dbdpVec, FindicesVec, QindicesVec, BindicesVec);
345 Xyce::dout() <<
"DeviceEntity::setParam with paramname = " << paramName <<
" value = " << val <<
" overrideOriginal = " << overrideOriginal << std::endl;
357 if (param.
isType<
double>())
358 param.
value<
double>(*this) = val;
359 else if (param.
isType<
int>())
360 param.
value<
int>(*this) = static_cast <
int> (val);
361 else if (param.
isType<
long>())
362 param.
value<
long>(*
this) = static_cast <
long> (val);
363 else if (param.
isType<
bool>())
364 param.
value<
bool>(*
this) = (val != 0);
366 DevelFatal0(*
this) <<
"Illegal type for parameter " << paramName;
377 Xyce::dout() <<
" Overriding original value for parameter " << paramName <<
" with value " << val << std::endl;
396 const std::string & param_name)
const
417 const std::string & name,
418 double & result)
const
428 if (param.
isType<
double>())
429 val = param.
value<
double>(*this);
430 else if (param.
isType<
int>())
431 val = static_cast <
double> (param.
value<
int>(*this));
432 else if (param.
isType<
long>())
433 val = static_cast <double> (param.
value<
long>(*
this));
434 else if (param.
isType<
bool>())
436 if (param.
value<
bool>(*
this))
443 DevelFatal(*this).in(
"DeviceEntity::getParam") <<
"Illegal type for parameter " << name;
469 DevelFatal(*this).in(
"DeviceEntity::setDefaultParam") <<
"Device does not have a default parameter";
519 dependentParam.
expr->evaluateFunction (rval);
536 std::vector<double> *res,
549 dependentParam.
expr->evaluateFunction (rval);
568 std::vector<std::string> instances, leads, names, variables;
570 dependentParam.
name = par.tag();
573 dependentParam.
expr =
new Util::Expression (
"(" + par.stringValue() +
")+CONSTCtoK");
574 dependentParam.
expr->make_constant (std::string(
"CONSTCTOK"),
CONSTCtoK);
578 dependentParam.
expr =
new Util::Expression (par.getValue<Util::Expression>());
586 dependentParam.
expr->get_names(XEXP_NODE, names);
587 dependentParam.
expr->get_names(XEXP_LEAD, leads);
588 dependentParam.
expr->get_names(XEXP_INSTANCE, instances);
589 dependentParam.
expr->get_names(XEXP_VARIABLE, variables);
592 std::vector<std::string>::iterator iterS;
596 if (names.size() > 0 || instances.size() > 0)
598 UserError0(*
this) <<
"Parameter " << par.tag() <<
" is not allowed to depend on voltage/current values";
603 if (dependentParam.
expr->get_num(XEXP_SPECIAL) > 0)
605 UserError0(*
this) <<
"Parameter " << par.tag() <<
" is not allowed to depend on time";
611 if (leads.size() > 0)
615 for (std::vector<std::string>::const_iterator n_i=leads.begin(); n_i != leads.end(); ++n_i)
617 index = n_i->find_last_of(
":");
618 if (index == std::string::npos )
621 type = (*n_i)[index+1];
623 if (type !=
'B' && type !=
'E' && type !=
'H')
625 UserError(*
this) <<
"Illegal use of lead current specification in expression '" << dependentParam.
expr->get_expression()
626 <<
"' in parameter " << par.tag();
629 names.insert( names.end(), leads.begin(), leads.end() );
632 names.insert( names.end(), instances.begin(), instances.end() );
635 dependentParam.
n_vars = names.size();
636 dependentParam.
vals.resize(dependentParam.
n_vars);
637 int expVarLen = dependentParam.
lo_var+dependentParam.
n_vars;
642 if (!variables.empty())
643 names.insert( names.end(), variables.begin(), variables.end() );
645 if ( !names.empty() )
649 dependentParam.
expr->order_names( names );
651 for (
int i=0 ; i<dependentParam.
n_vars ; ++i)
654 if (dependentParam.
n_vars > 0)
656 std::vector<double> zeros;
657 zeros.resize(dependentParam.
n_vars);
658 for (
int i=0 ; i<dependentParam.
n_vars ; ++i)
660 dependentParam.
expr->set_vars(zeros);
664 if (!variables.empty())
666 for (iterS=variables.begin() ; iterS!=variables.end() ; ++iterS)
671 UserError(*
this) <<
"Global parameter " << *iterS <<
" not found";
674 dependentParam.
expr->set_var(*iterS, (*global_param_it).second);
694 bool changed =
false;
696 for ( ; dpIter != end ; ++dpIter)
701 if (dpIter->n_vars > 0)
703 int hi = dpIter->lo_var+dpIter->n_vars;
704 for (
int i = dpIter->lo_var; i < hi; ++i)
709 if (dpIter->expr->set_vars(
eVarVals))
712 dpIter->expr->evaluateFunction (rval);
713 if (dpIter->vectorIndex==-1)
714 *(dpIter->resultU.result) = rval;
716 (*(dpIter->resultU.resVec))[dpIter->vectorIndex] = rval;
736 bool changed =
false;
738 for ( ; dpIter != end ; ++dpIter)
740 if (!dpIter->global_params.empty())
742 std::vector<std::string>::iterator gp=dpIter->global_params.begin();
743 std::vector<std::string>::iterator gend=dpIter->global_params.end();
744 for ( ; gp != gend; ++gp)
746 if (global_map.find(*gp) == global_map.end())
748 DevelFatal(*this).in(
"DeviceEntity::updateGlobalParameters") <<
"Failed to find global parameter " << *gp;
750 if (dpIter->expr->set_var(*gp, global_map[*gp]))
770 bool changed =
false;
774 for ( ; dpIter != end; ++dpIter)
778 dpIter->expr->evaluateFunction (rval);
779 if (dpIter->vectorIndex == -1)
780 *(dpIter->resultU.result) = rval;
782 (*(dpIter->resultU.resVec))[dpIter->vectorIndex] = rval;
800 bool changed =
false;
804 for ( ; dpIter != end; ++dpIter)
806 if (dpIter->expr->set_sim_time(
getSolverState().currTime_ ) || dpIter->expr->set_temp(tempIn))
808 dpIter->expr->evaluateFunction (rval);
809 if (dpIter->vectorIndex == -1)
810 *(dpIter->resultU.result) = rval;
812 (*(dpIter->resultU.resVec))[dpIter->vectorIndex] = rval;
833 for ( ; dpIter != end; ++dpIter)
835 bTime = dpIter->expr->get_break_time();
837 breakPointTimes.push_back(Util::BreakPoint(bTime));
853 ParameterMap::const_iterator it =
getParameterMap().find(parameter_name);
855 DevelFatal0(*this).in(
"DeviceEntity::given") <<
"Unrecognized parameter " << parameter_name;
871 std::vector<std::string> composite_name_list;
872 unordered_map<std::string, std::vector<CompositeParam *>, HashNoCase, EqualNoCase> composite_parameter_map;
873 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
875 Xyce::dout() << std::endl <<
"In DeviceEntity::setParams, for ";
877 Xyce::dout() <<
" parameters are:" << std::endl;
878 for (std::vector<Param>::const_iterator it = begin; it != end; ++it)
880 const Param ¶m = *it;
881 Xyce::dout() <<
"Param = " << param.tag() <<
", Type = ";
882 int tmpType = param.getType();
886 Xyce::dout() <<
"STR";
889 Xyce::dout() <<
"DBLE";
892 Xyce::dout() <<
"INT";
895 Xyce::dout() <<
"LNG";
898 Xyce::dout() <<
"EXPR";
901 Xyce::dout() <<
"BOOL";
904 Xyce::dout() <<
"STR_VEC";
907 Xyce::dout() <<
"INT_VEC";
910 Xyce::dout() <<
"DBLE_VEC";
912 case Util::DBLE_VEC_IND:
913 Xyce::dout() <<
"DBLE_VEC_IND";
915 case Util::COMPOSITE:
916 Xyce::dout() <<
"COMPOSITE";
919 Xyce::dout() <<
"Unknown";
921 Xyce::dout() <<
", Value = " << param.stringValue();
925 Xyce::dout() <<
" given=TRUE";
929 Xyce::dout() <<
" given=FALSE";
934 Xyce::dout() <<
" default=TRUE" << std::endl;
938 Xyce::dout() <<
" default=FALSE" << std::endl;
941 Xyce::dout() << std::endl;
944 for (std::vector<Param>::const_iterator param_it = begin; param_it != end; ++param_it)
946 Param ¶m =
const_cast<Param &
>(*param_it);
948 const std::string &tag = param.tag();
951 ParameterMap::const_iterator entity_parameter_it = entity.
getParameterMap().find(tag);
954 const Descriptor &descriptor = *(*entity_parameter_it).second;
961 else if (descriptor.
getGiven(entity))
970 if ( param.getType() == Util::EXPR )
972 if (descriptor.
isType<
double>())
977 else if (descriptor.
isType<std::vector<double> >())
979 int ind = (descriptor.
value<std::vector<double> >(entity)).size();
981 (descriptor.
value<std::vector<double> >(entity)).push_back(val);
985 DevelFatal(entity).in(
"DeviceEntity::setParams") <<
"Non double param " << tag <<
" cannot be set to expression";
990 if (descriptor.
isType<
double>())
992 if (!param.isNumeric())
994 UserError(entity) <<
"Cannot convert parameter " << tag <<
" to a numeric value from " << param.stringValue();
998 descriptor.
value<
double>(entity) = param.getImmutableValue<
double>();
1008 else if (descriptor.
isType<std::string>())
1010 descriptor.
value<std::string>(entity) = param.stringValue();
1012 else if (descriptor.
isType<
int>())
1014 if (!param.isInteger())
1016 UserError(entity) <<
"Cannot convert parameter " << tag <<
" to an integer value from " << param.stringValue();
1019 descriptor.
value<
int>(entity) = param.getImmutableValue<
int>();
1025 else if (descriptor.
isType<
long>())
1027 if (!param.isInteger())
1029 UserError(entity) <<
"Cannot convert parameter " << tag <<
" to an integer value from " << param.stringValue();
1032 descriptor.
value<
long>(entity) = param.getImmutableValue<
long>();
1038 else if (descriptor.
isType<
bool>())
1040 if (!param.isBool())
1042 UserError(entity) <<
"Cannot convert parameter " << tag <<
" to a logical value from " << param.stringValue();
1045 descriptor.
value<
bool>(entity) = param.getImmutableValue<
bool>();
1048 if (descriptor.
value<
bool>(entity))
1058 else if (descriptor.
isType<std::vector<int> >())
1060 if (param.getType() == Util::INT_VEC)
1062 (descriptor.
value<std::vector<int> >(entity)) = param.getValue<std::vector<int> >();
1064 else if (param.getType() == Util::INT)
1066 (descriptor.
value<std::vector<int> >(entity)).push_back(param.getImmutableValue<
int>());
1069 else if (descriptor.
isType<std::vector<double> >())
1071 if (param.getType() == Util::DBLE_VEC)
1073 (descriptor.
value<std::vector<double> >(entity)) = param.getValue<std::vector<double> >();
1075 else if (param.getType() == Util::DBLE)
1077 (descriptor.
value<std::vector<double> >(entity)).push_back(param.getImmutableValue<
double>());
1080 else if (descriptor.
isType<std::vector<std::string> >())
1082 if (param.getType() == Util::STR_VEC)
1084 (descriptor.
value<std::vector<std::string> >(entity)) = param.getValue<std::vector<std::string> >();
1086 else if (param.getType() == Util::STR)
1088 (descriptor.
value<std::vector<std::string> >(entity)).push_back(param.stringValue());
1093 composite_parameter_map[tag].clear();
1094 composite_name_list.push_back(tag);
1105 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
1107 Xyce::dout() <<
"pushing back composite " << tag << std::endl;
1112 DevelFatal(entity).in(
"DeviceEntity::setParams") <<
"Unknown type";
1119 else if (param.stringValue() ==
"VECTOR")
1126 bool vc_stat =
false;
1128 std::string::size_type dot = tag.find_first_of(
'.');
1129 if (dot != std::string::npos)
1131 for (std::vector<std::string>::const_iterator it = composite_name_list.begin(); it != composite_name_list.end(); ++it)
1133 const std::string &composite_name = *it;
1135 if (tag.find(composite_name) == 0)
1137 std::string param_name(tag.begin() + dot + 1, tag.end());
1143 std::istringstream is(std::string(tag.begin() + composite_name.size(), tag.begin() + dot));
1147 if (param_name ==
"NAME")
1149 if (n != composite_parameter_map[composite_name].size())
1151 DevelFatal(entity).in(
"DeviceEntity::setParams") <<
"Error filling 'NAME' vector param " << composite_name;
1154 std::string name = param.stringValue();
1156 composite_parameter_map[composite_name].push_back(composite);
1161 if (n >= composite_parameter_map[composite_name].size())
1163 DevelFatal(entity).in(
"DeviceEntity::setParams") <<
"Internal error in vector-composite, 'NAME' must come first " << composite_name;
1172 DevelFatal(entity) <<
"Undefined parameter " << tag <<
", this parameter is in metadata, but not recognized in constructor";
1177 if (!composite_name_list.empty())
1179 for (std::vector<std::string>::const_iterator name_it = composite_name_list.begin(); name_it != composite_name_list.end(); ++name_it)
1181 const std::string &vcs = *name_it;
1183 for (std::vector<CompositeParam *>::iterator it = composite_parameter_map[vcs].begin(); it != composite_parameter_map[vcs].end(); ++it)
1185 (*it)->processParams();
1204 ParameterMap::const_iterator p_i = composite_param.
getParameterMap().find(pName);
1210 if (ndParam.
given())
1212 else if (p.
getGiven(composite_param))
1220 p.
value<
double>(composite_param) = ndParam.getImmutableValue<
double>();
1226 else if (p.
isType<std::string>())
1228 p.
value<std::string>(composite_param) = ndParam.stringValue();
1230 else if (p.
isType<
int>())
1232 p.
value<
int>(composite_param) = ndParam.getImmutableValue<
int>();
1236 else if (p.
isType<
long>())
1238 p.
value<
long>(composite_param) = ndParam.getImmutableValue<
long>();
1242 else if (p.
isType<
bool>())
1244 p.
value<
bool>(composite_param) = (ndParam.getImmutableValue<
double>() != 0.0);
1247 if (p.
value<
bool>(composite_param))
1253 else if (p.
isType<std::vector<double> >())
1255 (p.
value<std::vector<double> >(composite_param)).push_back(ndParam.getImmutableValue<
double>());
1257 else if (p.
isType<std::vector<std::string> >())
1259 p.
value<std::vector<std::string> >(composite_param).push_back(ndParam.stringValue());
1263 Report::DevelFatal().in(
"CompositeParam::setParams") <<
"Unknown parameter type for " << pName;
1269 Report::DevelFatal().in(
"CompositeParam::setParams") <<
"Undefined parameter " << pName << std::endl
1270 <<
"This parameter is in metadata, but not recognized in constructor";
1277 for (ParameterMap::const_iterator it = parameter_map.begin(); it != parameter_map.end(); ++it)
1281 if (param.
isType<
double>())
1287 val = getDefaultValue<double>(param) -
CONSTCtoK;
1289 val = getDefaultValue<double>(param);
1290 param_list.push_back(
Param((*it).first, val));
1292 else if (param.
getVec() > 0)
1297 std::string vPar((*it).first.substr(0, (*it).first.size()-1));
1298 param_list.push_back(
Param(vPar,
"VECTOR"));
1303 double val = getDefaultValue<double>(param);
1304 param_list.push_back(
Param((*it).first, val));
1307 else if (param.
isType<
bool>())
1310 param_list.push_back(
Param((*it).first, getDefaultValue<bool>(param)));
1311 else if (param.
getVec() > 0)
1315 std::string vPar((*it).first.substr(0, (*it).first.size()-1));
1316 param_list.push_back(
Param(vPar,
"VECTOR"));
1321 bool val = getDefaultValue<bool>(param);
1322 param_list.push_back(
Param((*it).first, val));
1325 else if (param.
isType<
int>())
1328 param_list.push_back(
Param((*it).first, getDefaultValue<int>(param)));
1329 else if (param.
getVec() > 0)
1333 std::string vPar((*it).first.substr(0, (*it).first.size()-1));
1334 param_list.push_back(
Param(vPar,
"VECTOR"));
1336 int val = getDefaultValue<int>(param);
1337 param_list.push_back(
Param((*it).first, val));
1340 else if (param.
isType<std::string>())
1343 param_list.push_back(
Param((*it).first, getDefaultValue<std::string>(param)));
1344 else if (param.
getVec() > 0)
1348 std::string vPar((*it).first.substr(0, (*it).first.size()-1));
1349 param_list.push_back(
Param(vPar,
"VECTOR"));
1351 std::string val = getDefaultValue<std::string>(param);
1352 param_list.push_back(
Param((*it).first, val));
1355 else if (param.
isType<std::vector<std::string> >())
1357 Param vc((*it).first, std::vector<std::string>());
1358 param_list.push_back(vc);
1360 else if (param.
isType<std::vector<double> >())
1362 Param vc((*it).first, std::vector<double>());
1363 param_list.push_back(vc);
1367 Param vc2((*it).first,
"VECTOR-COMPOSITE");
1369 param_list.push_back(vc2);
1371 std::vector<Param> compositeParams;
1376 Report::DevelFatal().in(
"populateParams") <<
"Vector-composite map for device type entity empty.";
1384 for (ParameterMap::const_iterator it4 = e.find(
"NAME"); it4 != e.end();) {
1387 compositeParams.push_back(
Param((*it4).first, getDefaultValue<double>(p)));
1388 else if (p.
isType<
bool>())
1389 compositeParams.push_back(
Param((*it4).first, getDefaultValue<bool>(p)));
1390 else if (p.
isType<
int>())
1391 compositeParams.push_back(
Param((*it4).first, getDefaultValue<int>(p)));
1392 else if (p.
isType<std::string>())
1393 compositeParams.push_back(
Param((*it4).first, getDefaultValue<std::string>(p)));
1394 if ((*it4).first ==
"NAME")
1398 if (it4 != e.end() && (*it4).first ==
"NAME")
1402 composite_param_map[(*it).first] = compositeParams;
1407 Xyce::dout() <<
"In final else clause of DeviceEntity::getParams().";
1408 if( param.
isType<std::vector<std::string> >() )
1409 Xyce::dout() <<
" type is STR_VEC ";
1410 if( param.
isType<std::vector<double> >() )
1411 Xyce::dout() <<
" type is DBLE_VEC ";
1412 Xyce::dout() << it->first <<
" this item is NOT being added to default parameter list." << std::endl;
int getVec() const
Gets the vector length of a vectorized parameter.
std::string defaultParamName_
bool updateDependentParameters()
bool getParam(const std::string ¶mName, double &result) const
void setOriginalValue(ParameterBase ¶meter_base, int serial_number, double value)
Set a parameter's original value.
bool given(const std::string ¶meter_name) const
Pure virtual class to augment a linear system.
unordered_map< std::string, Descriptor *, HashNoCase, EqualNoCase > ParameterMap
virtual CompositeParam * constructComposite(const std::string &composite_name, const std::string ¶m_name)
Parameter can only be set to a constant from netlist.
DeviceEntity(ParametricData< void > ¶metric_data, const SolverState &solver_state, const DeviceOptions &device_options, const std::string &netlist_filename, int netlist_line)
bool getAnalyticSensitivityAvailable() const
returns a boolean to indicate if analytic sensitivities are available w.r.t. this parameter...
bool getGiven(ParameterBase &entity) const
Tests if the parameter has been given by the netlist.
bool getAnalyticSensitivity(const std::string ¶mName, std::vector< double > &dfdpVec, std::vector< double > &dqdpVec, std::vector< double > &dbdpVec, std::vector< int > &FindicesVec, std::vector< int > &QindicesVec, std::vector< int > &BindicesVec)
std::vector< double > * resVec
bool isTempParam(const std::string &name)
Returns true if the name is TNOM or TEMP.
bool scaleDefaultParam(double val)
double setDependentParameter(Util::Param &, double *, ParameterType::ExprAccess)
void setDefault(bool is_default)
const ParameterMap & getParameterMap() const
std::vector< double > vals
double getOriginalValue(ParameterBase ¶meter_base, int serial_number)
Retrieve a parameter's original value.
void setParameters(CompositeParam &composite_param, const std::string &pName, const Param &ndParam)
bool hasGivenMember() const
Tests if parameter has a given data member.
bool findParam(const std::string ¶m_name) const
const T & value(const ParameterBase &entity) const
Returns the value of the parameter for the entity.
union Xyce::Device::Depend::resUnion resultU
Class ParametricData manages the configuration information and the parameter binding map...
std::vector< std::string > global_params
ExprAccess getExpressionAccess() const
Gets the expression access which describes the usage of the paramter.
bool setDefaultParam(double val, bool overrideOriginal=false)
std::vector< Depend > dependentParams_
const ParametricData< U > * getCompositeParametricData() const
Return the composite parameter.
void setValueGiven(ParameterBase ¶meter_base, int serial_number, bool value)
Set the given value state of a parameter.
Class Descriptor describes the parameters stored in the ParametricData parameter map.
void setDefaultParameters(ParameterBase ¶meter_base, ParameterMap::const_iterator begin, ParameterMap::const_iterator end, const DeviceOptions &device_options)
Set the default values for the parameter.
std::vector< int > expVarLIDs
bool wasValueGiven(const ParameterBase ¶meter_base, int serial_number)
Return true if a value was provided for the device.
bool hasCompositeData() const
bool getParamBreakpoints(std::vector< Util::BreakPoint > &)
std::vector< int > expVarGIDs
bool getAnalyticSensitivity(const ParameterBase &entity1, const std::string &name, std::vector< double > &dfdp, std::vector< double > &dqdp, std::vector< double > &dbdp, std::vector< int > &Findices, std::vector< int > &Qindices, std::vector< int > &Bindices) const
returns analytic sensitivity, evaluated at the most recent solve point.
bool analyticSensitivityAvailable(const std::string ¶mName)
std::vector< double > eVarVals
const SolverState & getSolverState() const
bool hasOriginalValueStored() const
Returns whether an original value has been stored.
virtual std::ostream & printName(std::ostream &os) const =0
int getSerialNumber() const
Gets the serial number used to store and retireve given boolean fromt he GivenValueMap.
void populateParams(const ParameterMap ¶meter_map, std::vector< Param > ¶m_list, CompositeParamMap &composite_param_map)
std::map< std::string, std::vector< Param >, LessNoCase > CompositeParamMap
unordered_map< std::string, double, HashNoCase, EqualNoCase > GlobalParameterMap
void setGiven(ParameterBase &entity, bool value) const
Sets the given state of the parameter to value.
std::vector< double > expVarVals
bool scaleParam(const std::string ¶mName, double val, double val0)
double getDefaultParam() const
bool setParam(const std::string ¶mName, double val, bool overrideOriginal=false)
bool getAnalyticSensitivityDefaultParam(std::vector< double > &dfdpVec, std::vector< double > &dqdpVec, std::vector< double > &dbdpVec, std::vector< int > &FindicesVec, std::vector< int > &QindicesVec, std::vector< int > &BindicesVec)
bool analyticSensitivityAvailableDefaultParam()
bool isType() const
Tests entry data type.
GlobalParameterMap global_params
Parameter may be specified as a solution dependent expression from netlist.
Manages parameter binding for class C.
bool updateGlobalParameters(GlobalParameterMap &)
std::vector< std::string > expVarNames
CompositeParam is the base class for classes that wish to only manage the processing of parameter dat...
const ParameterMap & getParameterMap() const
getParameterMap returns the parameter map which describes the parameters.