46 #include <Xyce_config.h>
64 #include <N_ERH_ErrorMgr.h>
68 #include <N_LAS_Vector.h>
69 #include <N_LAS_Matrix.h>
70 #include <N_UTL_FeatureTest.h>
71 #include <N_UTL_Math.h>
79 namespace MutIndNonLin2 {
88 .setDescription(
"Coupling coefficient");
94 .setDescription(
"Nonlinear coupling flag");
119 .setDescription(
"Coupling coefficient");
132 .setDescription(
"Thermal energy parameter");
137 .setDescription(
"Mean magnetic cross-sectional area");
142 .setDescription(
"Domain coupling parameter");
147 .setDescription(
"Modeling constant");
152 .setDescription(
"Modeling constant");
157 .setDescription(
"Domain flesing parameter");
162 .setDescription(
"Smoothing coefficient for voltage difference over first inductor");
167 .setDescription(
"Effective air gap");
172 .setDescription(
"Domain anisotropy parameter");
177 .setDescription(
"Domain anisotropy parameter");
182 .setDescription(
"Saturation magnetization");
187 .setDescription(
"for pspice compatibility -- ignored");
192 .setDescription(
"for pspice compatibility -- ignored");
197 .setDescription(
"Total mean magnetic path");
202 .setDescription(
"Smoothing coefficient for voltage difference over first inductor");
207 .setDescription(
"Reference temperature");
212 .setDescription(
"First order temperature coeff.");
217 .setDescription(
"Second order temperature coeff.");
222 .setDescription(
"Tolerance for nonlinear zero crossing");
227 .setDescription(
"M-variable scaling.");
232 .setDescription(
"R-variable scaling");
237 .setDescription(
"M-equation scaling");
242 .setDescription(
"R-equation scaling");
247 .setDescription(
"Flag to save state variables" );
253 .setDescription(
"Flag to make M calculation implicit" );
259 .setDescription(
"Flag to use 4th order Runge-Kutta integration for dM/dH" );
264 .setDescription(
"Flag to use state vector for derivatives" );
269 .setDescription(
"Flag to use voltage limiting on Mag and R internal variables" );
274 .setDescription(
"Threshold over which newton interation changes in Mag are limited." );
279 .setDescription(
"Threshold over which newton interation changes in R are limited." );
284 .setDescription(
"Flag to save state variables" );
301 :
DeviceInstance(IB, configuration.getInstanceParameters(), factory_block),
303 temp(getDeviceOptions().temp.getImmutableValue<double>()),
306 dP_dBranchCurrentSum(0.0),
309 branchCurrentSum(0.0),
312 oldBranchCurrentSum(0.0),
316 includeDeltaM(false),
317 useRKIntegration(false),
318 outputStateVarsFlag( false )
322 Xyce::dout() <<
"In Instance constructor" << std::endl;
380 LO[i].resize( numInductors );
382 dHe_dI.resize(numInductors);
386 dP_dI.resize( numInductors );
401 std::string filename(
"Inductor_" );
402 filename.append(
getName().getEncodedName() );
403 filename.append(
".dat" );
405 replace( filename.begin(), filename.end(),
'%',
'_' );
406 replace( filename.begin(), filename.end(),
':',
'_' );
409 outputFileStreamPtr->open( filename.c_str() );
410 if( !(*outputFileStreamPtr) )
412 UserError(*
this) <<
"Could not open file " << filename <<
" for output of state variables";
415 (*outputFileStreamPtr).setf(std::ios::scientific, std::ios::floatfield );
416 (*outputFileStreamPtr).width(20);
417 (*outputFileStreamPtr).precision(12);
476 jacStamp[2*numInductors + i].resize(numInductors + 2);
483 jacStamp[2*i ][0] = 2*numInductors + i;
485 jacStamp[2*i+1][0] = 2*numInductors + i;
498 jacStamp[2*numInductors + i][0] = 2*i;
499 jacStamp[2*numInductors + i][1] = 2*i + 1;
502 jacStamp[2*numInductors + i][j+2] = 2*numInductors + j;
519 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
521 Xyce::dout() <<
"Instance::Instance----------" << std::endl;
522 Xyce::dout() <<
"numExtVars = " <<
numExtVars <<
", " << ibev << std::endl
523 <<
"numIntVars = " <<
numIntVars <<
", " << ibiv << std::endl
525 <<
"numInductors = " << numInductors << std::endl
526 <<
"jacStamp = " << std::endl;
527 for(
int i = 0; i<
jacStamp.size(); ++i )
529 Xyce::dout() <<
"jacStamp[ " << i <<
" ] = { ";
530 for(
int j=0; j<
jacStamp[i].size(); ++j)
533 if( j != (
jacStamp[i].size() -1 ) )
535 Xyce::dout() <<
", ";
538 Xyce::dout() <<
" }" << std::endl;
560 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
561 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
562 for ( ; currentInductor != endInductor ; ++currentInductor)
564 if (*currentInductor != NULL)
566 delete *currentInductor;
567 *currentInductor = NULL;
582 const std::vector<int> & extLIDVecRef)
595 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
596 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
599 while( currentInductor != endInductor )
601 (*currentInductor)->li_Pos =
extLIDVec[ i++ ];
602 (*currentInductor)->li_Neg =
extLIDVec[ i++ ];
603 (*currentInductor)->li_Branch = intLIDVec[ j++ ];
614 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
616 Xyce::dout() <<
"Instance::registerLIDs------------------------" << std::endl;
619 while( currentInductor != endInductor )
621 Xyce::dout() <<
"Inductor [ " << i++ <<
" ] "
622 <<
" li_Pos = " << (*currentInductor)->li_Pos
623 <<
" li_Neg = " << (*currentInductor)->li_Neg
624 <<
" li_Branch = " << (*currentInductor)->li_Branch << std::endl;
629 Xyce::dout() <<
" li_deltaMagVar = " <<
li_deltaMagVar << std::endl;
644 for (std::vector<InductorInstanceData *>::const_iterator it =
instanceData.begin(), end =
instanceData.end(); it != end; ++it)
663 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
665 Xyce::dout() <<
"Instance::registerStateLIDs-------------------" << std::endl;
693 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
695 Xyce::dout() <<
"Instance::registerJacLIDs ----------------------------" << std::endl;
697 Xyce::dout() <<
"jacLIDVec = " << std::endl;
698 for(
int i = 0; i<
jacStamp.size(); ++i )
700 Xyce::dout() <<
"jacLIDVec[ " << i <<
" ] = { ";
701 for(
int j=0; j<jacLIDVec[i].size(); ++j)
703 Xyce::dout() << jacLIDVec[i][j];
704 if( j != ( jacLIDVec[i].size() -1 ) )
706 Xyce::dout() <<
", ";
709 Xyce::dout() <<
" }" << std::endl;
713 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
714 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
716 while( currentInductor != endInductor )
718 (*currentInductor)->APosEquBraVarOffset = jacLIDVec[ 2*i ][ 0 ];
719 (*currentInductor)->ANegEquBraVarOffset = jacLIDVec[ 2*i + 1 ][ 0 ];
720 (*currentInductor)->vPosOffset = jacLIDVec[ 2*
numInductors + i ][ 0 ];
721 (*currentInductor)->vNegOffset = jacLIDVec[ 2*
numInductors + i ][ 1 ];
723 (*currentInductor)->ABraEquPosNodeOffset = jacLIDVec[ 2*
numInductors + i ][ 0 ];
724 (*currentInductor)->ABraEquNegNodeOffset = jacLIDVec[ 2*
numInductors + i ][ 1 ];
729 (*currentInductor)->ABraEquBraVarOffset = jacLIDVec[ 2*numInductors + i ][ j + 2 ];
731 (*currentInductor)->inductorCurrentOffsets[ j ] = jacLIDVec[ 2*numInductors + i ][ j + 2 ];
748 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
752 while( currentInductor != endInductor )
754 Xyce::dout() <<
"Inductor [ " << i <<
" ] " << (*currentInductor)->name << std::endl
755 <<
" APosEquBraVarOffset = " << (*currentInductor)->APosEquBraVarOffset << std::endl
756 <<
" ANegEquBraVarOffset = " << (*currentInductor)->ANegEquBraVarOffset << std::endl
757 <<
" vPosOffset = " << (*currentInductor)->vPosOffset << std::endl
758 <<
" vNegOffset = " << (*currentInductor)->vNegOffset << std::endl
759 <<
" ABraEquPosNodeOffset = " << (*currentInductor)->ABraEquPosNodeOffset << std::endl
760 <<
" ABraEquNegNodeOffset = " << (*currentInductor)->ABraEquNegNodeOffset << std::endl
761 <<
" ABraEquBraVarOffset = " << (*currentInductor)->ABraEquBraVarOffset << std::endl
762 <<
" magOffset = " << (*currentInductor)->magOffset << std::endl;
763 Xyce::dout() <<
"\tInductor branch offsets = { ";
766 Xyce::dout() << (*currentInductor)->inductorCurrentOffsets[ j ] <<
", ";
768 Xyce::dout() <<
"} " << std::endl;
772 Xyce::dout() << std::endl;
776 Xyce::dout() <<
"deltaMEquInductorOffsets = ";
817 bool bsuccess =
true;
822 std::vector< InductorInstanceData* >::iterator currentData =
instanceData.begin();
827 (*currentData)->L = ((*currentData)->baseL)*factor;
847 bool bsuccess =
true;
848 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
850 Xyce::dout() <<
"Instance::updateIntermediateVars" << std::endl;
884 double qV = (DeltaV / Vinf) * (V1Pos - V1Neg);
886 double tanh_qV = 0.0;
903 double H = Happ - (Gap / Path) * latestMag * Ms;
904 double He = H + Alpha * latestMag * Ms;
906 double H = Happ - (Gap / Path) * latestMag;
907 double He = H + Alpha * latestMag;
910 double Heo = BetaH*A;
913 double gap_path = Gap / Path;
915 double Heo2 = Heo*Heo;
916 double sq_Heo2He2 = sqrt(Heo2 + He2);
919 double Man = Ms * He / ( A + sq_Heo2He2 );
921 double delM = Man - latestMag*Ms;
923 double delM = Man - latestMag;
926 double delM2 = delM*delM;
927 double delM02 = delM0*delM0;
928 double sq_delM02delM2 = sqrt( delM02 + delM2 );
933 double Mirrp = (delM * tanh_qV + sq_delM02delM2 ) / (2*( Kirr- Alpha * sq_delM02delM2));
934 double Manp = Ms * (A + Heo2/sq_Heo2He2) / pow(A + sq_Heo2He2, 2.0);
935 P = ( C * Manp + (1 - C) * Mirrp) / ((1 + (gap_path - Alpha) * C * Manp + gap_path * (1-C) * Mirrp)*Ms);
937 double Mirrp = (delM * tanh_qV + sq_delM02delM2 ) / (2*( Kirr- Alpha * sq_delM02delM2));
938 double Manp = Ms*(A + Heo2/sq_Heo2He2) / pow(A + sq_Heo2He2, 2.0);
939 P = ( C * Manp + (1 - C) * Mirrp) / (1 + (gap_path - Alpha) * C * Manp + gap_path * (1-C) * Mirrp);
970 if( fabs( MagVarUpdate ) > 0.25 * Ms )
987 double dP_Denom = 1.0 + (gap_path - Alpha)*C*Manp + gap_path * (1.0-C) * Mirrp;
995 dManp_dI[i] = ( -Ms * He / (pow(A + sq_Heo2He2, 2.0)*sq_Heo2He2)) *
996 ( (Heo2 / (Heo2 + He2)) + (2.0*(A + Heo2 / sq_Heo2He2)/(A+sq_Heo2He2)) ) *
dHe_dI[i];
998 ddelM_dI[i] = (Ms / (A + sq_Heo2He2)) * (1.0 - He2/((A + sq_Heo2He2)*sq_Heo2He2)) *
dHe_dI[i];
1000 dMirrp_dI[i] = (1.0/(2.0*(Kirr - Alpha*sq_delM02delM2))) *
1001 (tanh_qV + delM/sq_delM02delM2 +
1002 (2.0*Alpha*delM*(delM*tanh_qV +
1003 sq_delM02delM2)/(2.0*(Kirr-Alpha*sq_delM02delM2)*sq_delM02delM2))) *
ddelM_dI[i];
1006 ( (C*Manp + (1.0-C)*Mirrp)/pow(dP_Denom,2.0) ) *
1028 std::vector< InductorInstanceData* >::iterator
1030 std::vector< InductorInstanceData* >::iterator
1035 while( currentInductor != endInductor )
1067 bool bsuccess =
true;
1068 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1070 Xyce::dout() <<
"Instance::updatePrimaryState---------------" << std::endl
1071 <<
"\tname = " <<
getName() << std::endl;
1081 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
1082 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
1084 while( currentInductor != endInductor )
1086 double current = solVector[ ( (*currentInductor)->li_Branch) ];
1087 if( (
getSolverState().dcopFlag) && ((*currentInductor)->ICGiven) )
1089 current = (*currentInductor)->IC;
1092 staVector[((*currentInductor)->li_currentState)] = current;
1111 bool bsuccess =
true;
1145 for(
int i=0; i<2; i++)
1174 bool bsuccess =
true;
1176 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1178 Xyce::dout() <<
"Instance::loadDAEQVector------------------------" << std::endl
1179 <<
"\tname = " <<
getName() << std::endl;
1194 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
1195 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
1197 while( currentInductor != endInductor )
1199 if( (
getSolverState().dcopFlag) && (*currentInductor)->ICGiven ==
true )
1225 while( currentInductor != endInductor )
1228 (*daeQVecPtr)[((*currentInductor)->li_Branch)] +=
LOI[ i ];
1256 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1258 Xyce::dout() <<
"Instance::loadDAEFVector------------------------" << std::endl
1259 <<
"\tname = " <<
getName() << std::endl;
1270 double mid = 1.0 + (1.0 - (Gap / Path))*
P;
1273 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
1274 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
1276 while( currentInductor != endInductor )
1278 double current = solVector[(*currentInductor)->li_Branch];
1279 double vNodePos = solVector[(*currentInductor)->li_Pos];
1280 double vNodeNeg = solVector[(*currentInductor)->li_Neg];
1283 (*daeFVecPtr)[((*currentInductor)->li_Pos)] += current;
1285 (*daeFVecPtr)[((*currentInductor)->li_Neg)] += -current;
1287 (*daeFVecPtr)[((*currentInductor)->li_Branch)] += -((vNodePos - vNodeNeg)/mid);
1318 bool bsuccess =
true;
1321 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1323 Xyce::dout() <<
"Instance::loadDAEdQdx-----------------------" << std::endl
1324 <<
"\tname = " <<
getName() << std::endl;
1329 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
1330 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
1332 while( currentInductor != endInductor )
1336 (*dQdxMatPtr)[((*currentInductor)->li_Branch)]
1337 [(*currentInductor)->inductorCurrentOffsets[j]] +=
LO[i][j];
1362 bool bsuccess =
true;
1364 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1366 Xyce::dout() <<
"Instance::loadDAEdFdx----------------------" << std::endl
1367 <<
"\tname = " <<
getName() << std::endl;
1381 #ifdef MS_FACTORING2
1382 double mid = 1.0 + (1.0 - (Gap/Path))*
P*
model_.
Ms;
1384 double mid = 1.0 + (1.0 - (Gap/Path))*
P;
1387 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
1388 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
1389 while( currentInductor != endInductor )
1392 (*dFdxMatPtr)[((*currentInductor)->li_Pos)] [((*currentInductor)->APosEquBraVarOffset)] += 1.0;
1393 (*dFdxMatPtr)[((*currentInductor)->li_Neg)] [((*currentInductor)->ANegEquBraVarOffset)] += -1.0;
1394 (*dFdxMatPtr)[((*currentInductor)->li_Branch)][((*currentInductor)->ABraEquPosNodeOffset)] += -1.0/mid;
1395 (*dFdxMatPtr)[((*currentInductor)->li_Branch)][((*currentInductor)->ABraEquNegNodeOffset)] += 1.0/mid;
1397 double delV = solVector[(*currentInductor)->li_Pos] - solVector[(*currentInductor)->li_Neg];
1402 (*dFdxMatPtr)[((*currentInductor)->li_Branch)][(*currentInductor)->inductorCurrentOffsets[j]] +=
1403 delV * (1.0 - (Gap/Path)) *
dP_dI[j]/(mid*mid);
1439 bool bsuccess =
true;
1444 #ifdef MS_FACTORING2
1447 double latestMag =
MagVar;
1452 (*outputFileStreamPtr)
1459 (*outputFileStreamPtr)
1483 bool bsuccess =
true;
1500 varTypeVec[i] =
'I';
1518 template <
typename ScalarT>
1520 const ScalarT & Mag,
const ScalarT & CurrentSum,
1521 const ScalarT & Vpos,
const ScalarT & Vneg)
1540 ScalarT qV = (DeltaV / Vinf) * (Vpos - Vneg);
1542 ScalarT tanh_qV = 0.0;
1545 ScalarT tanh_qV = tanh(qV);
1556 ScalarT Happ = CurrentSum / Path;
1558 #ifdef MS_FACTORING2
1559 ScalarT H = Happ - (Gap / Path) * Mag * Ms;
1560 ScalarT He = H + Alpha * Mag * Ms;
1562 ScalarT H = Happ - (Gap / Path) * Mag;
1563 ScalarT He = H + Alpha * Mag;
1566 ScalarT Heo = BetaH*A;
1569 ScalarT gap_path = Gap / Path;
1570 ScalarT He2 = He*He;
1571 ScalarT Heo2 = Heo*Heo;
1572 ScalarT sq_Heo2He2 = sqrt(Heo2 + He2);
1575 ScalarT Man = Ms * He / ( A + sq_Heo2He2 );
1576 #ifdef MS_FACTORING2
1577 ScalarT delM = Man - Mag*Ms;
1579 ScalarT delM = Man - Mag;
1582 ScalarT delM2 = delM*delM;
1583 ScalarT delM02 = delM0*delM0;
1584 ScalarT sq_delM02delM2 = sqrt( delM02 + delM2 );
1586 #ifdef MS_FACTORING2
1587 ScalarT Mirrp = (delM * tanh_qV + sq_delM02delM2 ) / (2*( Kirr- Alpha * sq_delM02delM2));
1588 ScalarT Manp = Ms * (A + Heo2/sq_Heo2He2) / pow(A + sq_Heo2He2, 2.0);
1589 ScalarT Pval = ( C * Manp + (1 - C) * Mirrp) / ((1 + (gap_path - Alpha) * C * Manp + gap_path * (1-C) * Mirrp)*Ms);
1591 ScalarT Mirrp = (delM * tanh_qV + sq_delM02delM2 ) / (2*( Kirr- Alpha * sq_delM02delM2));
1592 ScalarT Manp = Ms*(A + Heo2/sq_Heo2He2) / pow(A + sq_Heo2He2, 2.0);
1593 ScalarT Pval = ( C * Manp + (1 - C) * Mirrp) / (1 + (gap_path - Alpha) * C * Manp + gap_path * (1-C) * Mirrp);
1623 std::vector<Instance*>::iterator iter;
1627 for (iter=first; iter!=last; ++iter)
1629 (*iter)->processParams();
1647 :
DeviceModel(MB, configuration.getModelParameters(), factory_block),
1663 useRKIntegration(0),
1665 tnom(getDeviceOptions().tnom)
1705 std::vector<Instance*>::iterator iter;
1709 for (iter=first; iter!=last; ++iter)
1727 std::vector<Instance*>::const_iterator iter;
1735 os <<
"Number of MutIndNonLin instances: " << isize << std::endl;
1736 os <<
" name=\t\tmodelName\tParameters" << std::endl;
1737 for (i=0, iter=first; iter!=last; ++iter, ++i)
1739 os <<
" " << i <<
": " << (*iter)->getName() <<
"\t";
1765 for (std::vector<Instance *>::const_iterator it = instanceContainer.begin(); it != instanceContainer.end(); ++it)
1779 .registerDevice(
"min", 2)
1780 .registerModelType(
"min", 2);
const InstanceName & getName() const
std::vector< double > dP_dI
static void loadModelParameters(ParametricData< Model > &model_parameters)
void registerLIDs(const std::vector< int > &intLIDVecRef, const std::vector< int > &extLIDVecRef)
Teuchos::RCP< std::ofstream > outputFileStreamPtr
bool updatePrimaryState()
bool updateDependentParameters()
const SolverState & solverState_
Descriptor & addPar(const char *parName, T default_value, T U::*varPtr)
Adds the parameter description to the parameter map.
std::vector< double > LOI
std::vector< double > inductorCurrents
std::vector< std::string > couplingInductor
Linear::Vector * nextSolVectorPtr
std::vector< int > deltaMEquInductorOffsets
std::vector< double > branchCurrentSumHistory
std::vector< double > dManp_dI
bool given(const std::string ¶meter_name) const
void varTypes(std::vector< char > &varTypeVec)
Linear::Vector * daeQVectorPtr
bool updateSecondaryState()
Pure virtual class to augment a linear system.
void registerStateLIDs(const std::vector< int > &staLIDVecRef)
std::vector< double > ddelM_dI
void addInternalNode(Util::SymbolTable &symbol_table, int index, const InstanceName &instance_name, const std::string &lead_name)
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
void updateInductanceMatrix()
bool outputPlotFiles(bool force_final_output)
std::vector< double > couplingCoefficient
virtual void registerJacLIDs(const JacobianStamp &jacLIDVec)
bool updateTemperature(const double &temp_tmp)
std::vector< Instance * > instanceContainer
bool useRKIntegrationGiven
double tnom
nominal temperature for device params.
std::vector< Param > params
Parameters from the line.
Linear::Vector * lastSolVectorPtr
std::vector< InductorInstanceData * > instanceData
bool updateIntermediateVars()
void setParams(const std::vector< Param > ¶ms)
std::vector< double > dHe_dI
const std::string & getName() const
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
const DeviceOptions & getDeviceOptions() const
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
const std::vector< std::vector< int > > & jacobianStamp() const
const DeviceOptions & deviceOptions_
int deltaMEquDeltaMOffset
Linear::Vector * nextStaVectorPtr
static Config< T > & addConfiguration()
Adds the device to the Xyce device configuration.
Linear::Matrix * dFdxMatrixPtr
double oldBranchCurrentSum
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
The Device class is an interface for device implementations.
virtual std::ostream & printOutInstances(std::ostream &os) const
bool processInstanceParams()
processInstanceParams
std::vector< std::vector< int > > jacStamp
std::vector< std::string > inductorsNode1
Class Configuration contains device configuration data.
std::vector< std::string > inductorNames
std::vector< double > PFunctionHistory
std::vector< double > inductorInductances
const SolverState & getSolverState() const
void registerJacLIDs(const std::vector< std::vector< int > > &jacLIDVec)
std::vector< int > inductorCurrentOffsets
bool processParams()
processParams
Instance(const Configuration &configuration, const InstanceBlock &IB, Model &Iiter, const FactoryBlock &factory_block)
Linear::Vector * daeFVectorPtr
ScalarT Pcalc(const ScalarT &Mag, const ScalarT &CurrentSum, const ScalarT &Vpos, const ScalarT &Vneg)
const ExternData & extData
std::vector< std::vector< double > > LO
ModelBlock represents a .MODEL line from the netlist.
Manages parameter binding for class C.
std::vector< std::string > inductorsNode2
InstanceBlock represent a device instance line from the netlist.
double currTime_
DeviceEntity for expression time, breakpoints DeviceMgr for dependent parameters, breakpoints...
std::vector< Param > params
std::vector< double > dMirrp_dI
Linear::Matrix * dQdxMatrixPtr
std::vector< double > inductanceVals
void setModParams(const std::vector< Param > ¶ms)