45 #include <Xyce_config.h>
48 #include <N_UTL_Math.h>
60 #include <N_ERH_ErrorMgr.h>
62 #include <N_LAS_Vector.h>
63 #include <N_LAS_Matrix.h>
65 #include <N_UTL_Expression.h>
66 #include <N_UTL_FeatureTest.h>
94 APosEquBraVarOffset(-1),
95 ANegEquBraVarOffset(-1),
96 ABraEquPosNodeOffset(-1),
97 ABraEquNegNodeOffset(-1),
98 ABraEquBraVarOffset(-1),
104 f_PosEquBraVarPtr(0),
105 f_NegEquBraVarPtr(0),
106 f_BraEquPosNodePtr(0),
107 f_BraEquNegNodePtr(0),
108 f_BraEquBraVarPtr(0),
113 q_PosEquBraVarPtr(0),
114 q_NegEquBraVarPtr(0),
115 q_BraEquPosNodePtr(0),
116 q_BraEquNegNodePtr(0),
117 q_BraEquBraVarPtr(0),
125 namespace MutIndLin {
133 .setDescription(
"Coupling value");
159 .setDescription(
"Coupling coefficient");
172 .setDescription(
"Reference temperature");
177 .setDescription(
"First order temperature coeff.");
182 .setDescription(
"Second order temperature coeff.");
198 :
DeviceInstance(IB, configuration.getInstanceParameters(), factory_block),
202 mutualCupGiven(false),
204 temp(getDeviceOptions().temp.getImmutableValue<double>()),
272 bool foundDuplicateInductorName=
false;
281 foundDuplicateInductorName=
true;
288 if( foundDuplicateInductorName )
300 int indexInductorOne = -1;
301 int indexInductorTwo = -1;
306 indexInductorOne = j;
310 indexInductorTwo = j;
312 if( indexInductorOne != -1 && indexInductorTwo != -1 )
344 int indexPairCounter=0;
350 int indexInductorOne = -1;
351 int indexInductorTwo = -1;
356 indexInductorOne = k;
360 indexInductorTwo = k;
362 if( indexInductorOne != -1 && indexInductorTwo != -1 )
369 indexPairs[indexPairCounter].first = indexInductorOne;
370 indexPairs[indexPairCounter].second = indexInductorTwo;
371 if( indexPairCounter < (numUniquePairs-1) )
390 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
392 Xyce::dout() <<
"mutualCouplingCoef: " << std::endl;
399 Xyce::dout() << std::endl;
401 Xyce::dout() <<
"index pairs = ";
406 Xyce::dout() << std::endl;
410 dIdt.resize( numInductors );
413 LOI.resize( numInductors );
414 LO.resize( numInductors );
417 LO[i].resize( numInductors );
460 jacStamp.resize( 3 * numInductors );
465 jacStamp[2*numInductors + i].resize(numInductors + 2);
467 jacStamp[2*i ][0] = 2*numInductors + i;
468 jacStamp[2*i+1][0] = 2*numInductors + i;
469 jacStamp[2*numInductors + i][0] = 2*i;
470 jacStamp[2*numInductors + i][1] = 2*i + 1;
473 jacStamp[2*numInductors + i][j+2] = 2*numInductors + j;
482 std::vector<Depend>::const_iterator d;
486 for (d=begin; d != end; ++d)
489 if (d->name ==
"COUPLING" && d->vectorIndex != -1)
499 expPtrs[d->vectorIndex] = d->expr;
502 int indexInductorOne =
indexPairs[d->vectorIndex].first;
503 int indexInductorTwo =
indexPairs[d->vectorIndex].second;
506 int inductorOneBranchSize =
jacStamp[2*numInductors+
507 indexInductorOne].size();
508 int inductorTwoBranchSize =
jacStamp[2*numInductors+
509 indexInductorTwo].size();
510 jacStamp[2*numInductors+indexInductorOne].resize(inductorOneBranchSize+
512 jacStamp[2*numInductors+indexInductorTwo].resize(inductorTwoBranchSize+
514 for (
int i=0; i<d->n_vars; i++)
516 jacStamp[2*numInductors+indexInductorOne][inductorOneBranchSize+i]
518 jacStamp[2*numInductors+indexInductorTwo][inductorTwoBranchSize+i]
528 std::pair<int,int>(d->vectorIndex,i));
530 std::pair<int,int>(d->vectorIndex,i));
537 <<
": Parameter " << d->name <<
" value " << d->expr->get_expression() <<
" fails sanity check.";
549 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
551 Xyce::dout() <<
"Instance::Instance-----------------" << std::endl;
552 Xyce::dout() <<
"numExtVars = " <<
numExtVars << std::endl
555 <<
"numInductors = " << numInductors << std::endl
556 <<
"jacStamp = " << std::endl;
557 for(
int i = 0; i<
jacStamp.size(); ++i )
559 Xyce::dout() <<
"jacStamp[ " << i <<
" ] = { ";
560 for(
int j=0; j<
jacStamp[i].size(); ++j)
563 if( j != (
jacStamp[i].size() -1 ) )
565 Xyce::dout() <<
", ";
568 Xyce::dout() <<
" }" << std::endl;
584 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
585 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
586 for ( ; currentInductor != endInductor ; ++currentInductor)
588 delete *currentInductor;
601 const std::vector<int> & extLIDVecRef)
614 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
615 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
618 while( currentInductor != endInductor )
620 (*currentInductor)->li_Pos =
extLIDVec[ i++ ];
621 (*currentInductor)->li_Neg =
extLIDVec[ i++ ];
622 (*currentInductor)->li_Branch = intLIDVec[ j++ ];
626 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
628 Xyce::dout() <<
"Instance::registerLIDs----------------------------" << std::endl;
631 while( currentInductor != endInductor )
633 Xyce::dout() <<
"Inductor [ " << i++ <<
" ] "
634 <<
" li_Pos = " << (*currentInductor)->li_Pos
635 <<
" li_Neg = " << (*currentInductor)->li_Neg
636 <<
" li_Branch = " << (*currentInductor)->li_Branch << std::endl;
655 if(
getName().getSubcircuitName() ==
"" )
717 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
719 Xyce::dout() <<
"Instance::registerJacLIDs ----------------------------" << std::endl;
721 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
722 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
724 while( currentInductor != endInductor )
726 (*currentInductor)->APosEquBraVarOffset = jacLIDVec[ 2*i ][ 0 ];
727 (*currentInductor)->ANegEquBraVarOffset = jacLIDVec[ 2*i + 1 ][ 0 ];
728 (*currentInductor)->ABraEquPosNodeOffset = jacLIDVec[ 2*
numInductors + i ][ 0 ];
729 (*currentInductor)->ABraEquNegNodeOffset = jacLIDVec[ 2*
numInductors + i ][ 1 ];
734 (*currentInductor)->ABraEquBraVarOffset = jacLIDVec[ 2*numInductors + i ][ j + 2 ];
736 (*currentInductor)->inductorCurrentOffsets[ j ] = jacLIDVec[ 2*numInductors + i ][ j + 2 ];
739 int numdepvars=(*currentInductor)->depVarPairs.size();
740 (*currentInductor)->ABraEquDepVarOffsets.resize(numdepvars);
741 for (
int j = 0; j < numdepvars; ++j)
743 (*currentInductor)->ABraEquDepVarOffsets[j] =
744 jacLIDVec[2*numInductors+i][numInductors+2+j];
750 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
752 Xyce::dout() <<
"Instance::registerJacLIDs--------------------------" << std::endl;
755 while( currentInductor != endInductor )
757 Xyce::dout() <<
"Inductor [ " << i <<
" ] " << (*currentInductor)->name
758 <<
" APosEquBraVarOffset = " << (*currentInductor)->APosEquBraVarOffset
759 <<
" ANegEquBraVarOffset = " << (*currentInductor)->ANegEquBraVarOffset
760 <<
" ABraEquPosNodeOffset = " << (*currentInductor)->ABraEquPosNodeOffset
761 <<
" ABraEquNegNodeOffset = " << (*currentInductor)->ABraEquNegNodeOffset
762 <<
" ABraEquBraVarOffset = " << (*currentInductor)->ABraEquBraVarOffset << std::endl;
763 Xyce::dout() <<
"\tInductor branch offsets = { ";
766 Xyce::dout() << (*currentInductor)->inductorCurrentOffsets[ j ] <<
", ";
768 Xyce::dout() <<
"} " << std::endl;
785 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
789 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
790 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
792 while( currentInductor != endInductor )
795 (*currentInductor)->f_PosEquBraVarPtr =
796 &(dFdx[((*currentInductor)->li_Pos)] [((*currentInductor)->APosEquBraVarOffset)] );
798 (*currentInductor)->f_NegEquBraVarPtr =
799 &(dFdx[((*currentInductor)->li_Neg)] [((*currentInductor)->ANegEquBraVarOffset)] );
801 (*currentInductor)->f_BraEquPosNodePtr =
802 &(dFdx[((*currentInductor)->li_Branch)][((*currentInductor)->ABraEquPosNodeOffset)] );
804 (*currentInductor)->f_BraEquNegNodePtr =
805 &(dFdx[((*currentInductor)->li_Branch)][((*currentInductor)->ABraEquNegNodeOffset)] );
815 (*currentInductor)->f_inductorCurrentPtrs[ j ] =
816 &(dFdx[((*currentInductor)->li_Branch)][(*currentInductor)->inductorCurrentOffsets[j]] );
819 int numdepvars=(*currentInductor)->depVarPairs.size();
820 (*currentInductor)->f_BraEquDepVarPtrs.resize(numdepvars);
822 for (
int j = 0; j < numdepvars; ++j)
824 (*currentInductor)->f_BraEquDepVarPtrs[j] =
825 &(dFdx[((*currentInductor)->li_Branch)][(*currentInductor)->ABraEquDepVarOffsets[j]] );
830 (*currentInductor)->q_PosEquBraVarPtr =
831 &(dQdx[((*currentInductor)->li_Pos)] [((*currentInductor)->APosEquBraVarOffset)] );
833 (*currentInductor)->q_NegEquBraVarPtr =
834 &(dQdx[((*currentInductor)->li_Neg)] [((*currentInductor)->ANegEquBraVarOffset)] );
836 (*currentInductor)->q_BraEquPosNodePtr =
837 &(dQdx[((*currentInductor)->li_Branch)][((*currentInductor)->ABraEquPosNodeOffset)] );
839 (*currentInductor)->q_BraEquNegNodePtr =
840 &(dQdx[((*currentInductor)->li_Branch)][((*currentInductor)->ABraEquNegNodeOffset)] );
850 (*currentInductor)->q_inductorCurrentPtrs[ j ] =
851 &(dQdx[((*currentInductor)->li_Branch)][(*currentInductor)->inductorCurrentOffsets[j]] );
854 numdepvars=(*currentInductor)->depVarPairs.size();
855 (*currentInductor)->q_BraEquDepVarPtrs.resize(numdepvars);
857 for (
int j = 0; j < numdepvars; ++j)
859 (*currentInductor)->q_BraEquDepVarPtrs[j] =
860 &(dQdx[((*currentInductor)->li_Branch)][(*currentInductor)->ABraEquDepVarOffsets[j]] );
889 for( i=0; i<j ; ++i )
906 Xyce::dout() <<
"processParams: mutualCouplingCoef: " << std::endl;
913 Xyce::dout() << std::endl;
933 bool bsuccess =
true;
938 std::vector< InductorInstanceData* >::iterator currentData =
instanceData.begin();
943 (*currentData)->L = ((*currentData)->baseL)*factor;
963 bool bsuccess =
true;
984 std::vector< InductorInstanceData* >::iterator
986 std::vector< InductorInstanceData* >::iterator
991 while( currentInductor != endInductor )
1021 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1023 Xyce::dout() <<
"Instance::updatePrimaryState------------------" << std::endl
1024 <<
"\tname = " <<
getName() << std::endl;
1032 for (
int i=0; i<ncoupcoef; ++i)
1042 std::vector< InductorInstanceData* >::iterator
1044 std::vector< InductorInstanceData* >::iterator
1047 while( currentInductor != endInductor )
1049 if( (
getSolverState().dcopFlag) && ((*currentInductor)->ICGiven) )
1079 #ifndef Xyce_NO_MUTINDLIN_MASK
1082 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
1083 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
1084 while( currentInductor != endInductor )
1086 (*maskVectorPtr)[((*currentInductor)->li_Branch)] = 0.0;
1109 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1111 Xyce::dout() <<
"Instance::loadDAEQVector---------------------------" << std::endl
1112 <<
"\tname = " <<
getName() << std::endl;
1135 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
1136 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
1138 while( currentInductor != endInductor )
1140 qVec[(*currentInductor)->li_Branch] +=
LOI[ i ];
1162 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1164 Xyce::dout() <<
"Instance::loadDAEFVector---------------------------" << std::endl
1165 <<
"\tname = " <<
getName() << std::endl;
1172 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
1173 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
1176 while( currentInductor != endInductor )
1178 double current = solVec[(*currentInductor)->li_Branch];
1179 double vNodePos = solVec[(*currentInductor)->li_Pos];
1180 double vNodeNeg = solVec[(*currentInductor)->li_Neg];
1181 fVec[((*currentInductor)->li_Pos)] +=
scalingRHS * current;
1182 fVec[((*currentInductor)->li_Neg)] += -
scalingRHS * current;
1183 fVec[((*currentInductor)->li_Branch)] += -(vNodePos - vNodeNeg);
1185 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1187 Xyce::dout() <<
" Inductor = " << (*currentInductor)->name
1188 <<
"\tcurrent = " << current
1189 <<
"\tvNodePos = " << vNodePos
1190 <<
"\tvNodeNeg = " << vNodeNeg
1212 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1214 Xyce::dout() <<
"Instance::loadDAEdQdx--------------------------" << std::endl
1215 <<
"\tname = " <<
getName() << std::endl;
1225 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
1226 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
1228 while( currentInductor != endInductor )
1232 dQdx[((*currentInductor)->li_Branch)]
1236 int numdepterms=(*currentInductor)->depVarPairs.size();
1237 for (
int j=0 ; j<numdepterms; ++j)
1239 int coefficientNumber=(*currentInductor)->depVarPairs[j].first;
1240 int depVarNumber=(*currentInductor)->depVarPairs[j].second;
1249 otherInductor=
indexPairs[coefficientNumber].second;
1251 otherInductor=
indexPairs[coefficientNumber].first;
1253 dQdx[((*currentInductor)->li_Branch)][(*currentInductor)->ABraEquDepVarOffsets[j]] +=
1283 std::vector< InductorInstanceData* >::iterator currentInductor =
instanceData.begin();
1284 std::vector< InductorInstanceData* >::iterator endInductor =
instanceData.end();
1285 while( currentInductor != endInductor )
1287 dFdx[((*currentInductor)->li_Pos)] [((*currentInductor)->APosEquBraVarOffset)] +=
scalingRHS;
1288 dFdx[((*currentInductor)->li_Neg)] [((*currentInductor)->ANegEquBraVarOffset)] += -
scalingRHS;
1289 dFdx[((*currentInductor)->li_Branch)][((*currentInductor)->ABraEquPosNodeOffset)] += -1.0;
1290 dFdx[((*currentInductor)->li_Branch)][((*currentInductor)->ABraEquNegNodeOffset)] += 1.0;
1311 bool bsuccess =
true;
1328 varTypeVec[i] =
'I';
1355 std::vector<Instance*>::iterator iter;
1359 for (iter=first; iter!=last; ++iter)
1361 (*iter)->processParams();
1379 :
DeviceModel(MB, configuration.getModelParameters(), factory_block),
1382 tnom(getDeviceOptions().tnom)
1412 std::vector<Instance*>::iterator iter;
1416 for (iter=first; iter!=last; ++iter)
1435 std::vector<Instance*>::const_iterator iter;
1443 os <<
"Number of MutIndLin instances: " << isize << std::endl;
1444 os <<
" name=\t\tmodelName\tParameters" << std::endl;
1445 for (i=0, iter=first; iter!=last; ++iter, ++i)
1447 os <<
" " << i <<
": " << (*iter)->getName() <<
"\t";
1473 for (std::vector<Instance *>::const_iterator it = instanceContainer.begin(); it != instanceContainer.end(); ++it)
1497 for (
int i=0; i<ncoupcoef; ++i)
1507 std::vector< InductorInstanceData* >::iterator
1509 std::vector< InductorInstanceData* >::iterator
1513 while( currentInductor != endInductor )
1515 if( (
getSolverState().dcopFlag) && ((*currentInductor)->ICGiven) )
1540 bool Master::loadDAEVectors (
double * solVec,
double * fVec,
double *qVec,
double * bVec,
double * storeLeadF,
double * storeLeadQ,
double * leadF,
double * leadQ,
double * junctionV)
1548 std::vector< InductorInstanceData* >::iterator currentInductor = inst.
instanceData.begin();
1549 std::vector< InductorInstanceData* >::iterator endInductor = inst.
instanceData.end();
1551 while( currentInductor != endInductor )
1553 double current = solVec[(*currentInductor)->li_Branch];
1554 double vNodePos = solVec[(*currentInductor)->li_Pos];
1555 double vNodeNeg = solVec[(*currentInductor)->li_Neg];
1557 fVec[((*currentInductor)->li_Pos)] += inst.
scalingRHS * current;
1558 fVec[((*currentInductor)->li_Neg)] += -inst.
scalingRHS * current;
1559 fVec[((*currentInductor)->li_Branch)] += -(vNodePos - vNodeNeg);
1576 inst.
LOI[ i ] = 0.0;
1587 while( currentInductor != endInductor )
1589 qVec[(*currentInductor)->li_Branch] += inst.
LOI[ li ];
1597 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
1612 std::vector< InductorInstanceData* >::iterator currentInductor = inst.
instanceData.begin();
1613 std::vector< InductorInstanceData* >::iterator endInductor = inst.
instanceData.end();
1614 while( currentInductor != endInductor )
1616 *((*currentInductor)->f_PosEquBraVarPtr) += inst.
scalingRHS;
1617 *((*currentInductor)->f_NegEquBraVarPtr) += -inst.
scalingRHS;
1618 *((*currentInductor)->f_BraEquPosNodePtr) += -1.0;
1619 *((*currentInductor)->f_BraEquNegNodePtr) += 1.0;
1632 while( currentInductor != endInductor )
1636 *((*currentInductor)->q_inductorCurrentPtrs[j]) += inst.
mutualCouplingCoef[li][j] * inst.
LO[li][j];
1639 int numdepterms=(*currentInductor)->depVarPairs.size();
1640 for (
int j=0 ; j<numdepterms; ++j)
1642 int coefficientNumber=(*currentInductor)->depVarPairs[j].first;
1643 int depVarNumber=(*currentInductor)->depVarPairs[j].second;
1651 if (li==inst.
indexPairs[coefficientNumber].first)
1652 otherInductor=inst.
indexPairs[coefficientNumber].second;
1654 otherInductor=inst.
indexPairs[coefficientNumber].second;
1656 *((*currentInductor)->q_BraEquDepVarPtrs[j]) +=
1681 int sizeInstances = instanceContainer_.size();
1682 for (
int i=0; i<sizeInstances; ++i)
1684 Instance & inst = *(instanceContainer_.at(i));
1686 std::vector< InductorInstanceData* >::iterator currentInductor = inst.
instanceData.begin();
1687 std::vector< InductorInstanceData* >::iterator endInductor = inst.
instanceData.end();
1688 while( currentInductor != endInductor )
1690 dFdx[((*currentInductor)->li_Pos)] [((*currentInductor)->APosEquBraVarOffset)] += inst.
scalingRHS;
1691 dFdx[((*currentInductor)->li_Neg)] [((*currentInductor)->ANegEquBraVarOffset)] += -inst.
scalingRHS;
1692 dFdx[((*currentInductor)->li_Branch)][((*currentInductor)->ABraEquPosNodeOffset)] += -1.0;
1693 dFdx[((*currentInductor)->li_Branch)][((*currentInductor)->ABraEquNegNodeOffset)] += 1.0;
1706 while( currentInductor != endInductor )
1710 dQdx[((*currentInductor)->li_Branch)]
1711 [(*currentInductor)->inductorCurrentOffsets[j]] += inst.
mutualCouplingCoef[i][j] * inst.
LO[i][j];
1714 int numdepterms=(*currentInductor)->depVarPairs.size();
1715 for (
int j=0 ; j<numdepterms; ++j)
1717 int coefficientNumber=(*currentInductor)->depVarPairs[j].first;
1718 int depVarNumber=(*currentInductor)->depVarPairs[j].second;
1726 if (i==inst.
indexPairs[coefficientNumber].first)
1727 otherInductor=inst.
indexPairs[coefficientNumber].second;
1729 otherInductor=inst.
indexPairs[coefficientNumber].second;
1731 dQdx[((*currentInductor)->li_Branch)][(*currentInductor)->ABraEquDepVarOffsets[j]] +=
1754 .registerDevice(
"mil", 1)
1755 .registerModelType(
"mil", 1);
const InstanceName & getName() const
std::vector< double * > f_inductorCurrentPtrs
std::vector< std::vector< double > > mutualCouplingCoef
bool updateDependentParameters()
const DeviceOptions & deviceOptions_
Descriptor & addPar(const char *parName, T default_value, T U::*varPtr)
Adds the parameter description to the parameter map.
double * daeQVectorRawPtr
const std::string & getSubcircuitName() const
Decodes the device name.
std::vector< int > devConMap
bool given(const std::string ¶meter_name) const
Pure virtual class to augment a linear system.
Devices and models are each named.
const std::vector< std::string > & getDepSolnVars()
void addInternalNode(Util::SymbolTable &symbol_table, int index, const InstanceName &instance_name, const std::string &lead_name)
const std::string & getEncodedName() const
Return the instance name encoded as: [s:]*xname [s:]*Ytype!name [s:]*Utype!name!count.
std::vector< std::vector< int > > jacStamp
void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
InstanceVector::const_iterator getInstanceEnd() const
Returns an iterator to the ending of the vector of all instances created for this device...
const std::vector< Depend > & getDependentParams()
std::vector< std::vector< double > > couplingCoefficientVarDerivs
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
virtual void registerJacLIDs(const JacobianStamp &jacLIDVec)
const std::vector< std::vector< int > > & jacobianStamp() const
std::vector< std::string > inductorsNode1
std::vector< std::string > inductorNames
double tnom
nominal temperature for device params.
InstanceVector::const_iterator getInstanceBegin() const
Returns an iterator to the beginning of the vector of all instances created for this device...
bool updateTemperature(const double &temp_tmp)
Instance(const Configuration &configuration, const InstanceBlock &IB, Model &Iiter, const FactoryBlock &factory_block)
std::vector< Param > params
Parameters from the line.
void setParams(const std::vector< Param > ¶ms)
const std::string & getName() const
double * daeFVectorRawPtr
virtual bool loadDAEMatrices(Linear::Matrix &dFdx, Linear::Matrix &dQdx)
Populates the device's Jacobian object with these pointers.
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
bool processInstanceParams()
processInstanceParams
void varTypes(std::vector< char > &varTypeVec)
const DeviceOptions & getDeviceOptions() const
std::vector< std::string > couplingInductor
bool updateIntermediateVars()
bool updatePrimaryState()
Linear::Vector * deviceErrorWeightMask_
std::vector< std::pair< int, int > > depVarPairs
static Config< T > & addConfiguration()
Adds the device to the Xyce device configuration.
std::vector< double > LOI
std::vector< double > inductorCurrents
Linear::Matrix * dFdxMatrixPtr
static void loadModelParameters(ParametricData< Model > &model_parameters)
void registerLIDs(const std::vector< int > &intLIDVecRef, const std::vector< int > &extLIDVecRef)
virtual bool loadDAEVectors(double *solVec, double *fVec, double *qVec, double *bVec, double *storeLeadF, double *storeLeadQ, double *leadF, double *leadQ, double *junctionV)
Populates the device's ExternData object with these pointers.
bool processParams()
processParams
The Device class is an interface for device implementations.
const SolverState & solverState_
std::vector< double > inductanceVals
Class Configuration contains device configuration data.
virtual std::ostream & printOutInstances(std::ostream &os) const
std::vector< double > dIdt
const SolverState & getSolverState() const
std::vector< int > inductorCurrentOffsets
std::vector< double > inductorInductances
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
#define Xyce_NONPOINTER_MATRIX_LOAD
std::vector< double * > q_inductorCurrentPtrs
std::string spiceInternalName(const InstanceName &instance_name, const std::string &lead)
std::vector< double > couplingCoefficient
void registerJacLIDs(const std::vector< std::vector< int > > &jacLIDVec)
std::vector< std::pair< int, int > > indexPairs
const ExternData & extData
ModelBlock represents a .MODEL line from the netlist.
std::vector< Util::Expression * > expPtrs
Parameter may be specified as a solution dependent expression from netlist.
Manages parameter binding for class C.
InstanceBlock represent a device instance line from the netlist.
std::vector< Instance * > instanceContainer
void updateInductanceMatrix()
std::vector< std::vector< double > > LO
std::vector< Param > params
std::vector< std::vector< double > > mutualCouplingCoefDerivs
Linear::Matrix * dQdxMatrixPtr
void registerStateLIDs(const std::vector< int > &staLIDVecRef)
void loadErrorWeightMask()
std::vector< int > numCoupDepVars
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
std::vector< InductorInstanceData * > instanceData
std::vector< std::string > inductorsNode2
virtual bool updateState(double *solVec, double *staVec, double *stoVec)
Updates the devices state information.
virtual const std::vector< std::string > & getDepSolnVars()
const SolverState & getSolverState() const
Returns the solver state given during device construction.
void setModParams(const std::vector< Param > ¶ms)
double * nextSolVectorRawPtr