devices/res, #3/6, RESacConduct, collect RESm
Reshape the sourcecode to emphasize the RESm * RESacConduct affiliation. That's a mere rewrite and doesn't change functionality.
This commit is contained in:
parent
7edd241e96
commit
6941c43673
|
|
@ -43,8 +43,7 @@ RESask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
|
||||||
value->rValue = fast->RESresist;
|
value->rValue = fast->RESresist;
|
||||||
return(OK);
|
return(OK);
|
||||||
case RES_ACCONDUCT:
|
case RES_ACCONDUCT:
|
||||||
value->rValue = fast->RESacConduct;
|
value->rValue = fast->RESm * fast->RESacConduct;
|
||||||
value->rValue *= fast->RESm;
|
|
||||||
return (OK);
|
return (OK);
|
||||||
case RES_ACRESIST:
|
case RES_ACRESIST:
|
||||||
value->rValue = fast->RESacResist;
|
value->rValue = fast->RESacResist;
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,6 @@ RESsAcLoad(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
{
|
{
|
||||||
RESmodel *model = (RESmodel *)inModel;
|
RESmodel *model = (RESmodel *)inModel;
|
||||||
RESinstance *here;
|
RESinstance *here;
|
||||||
double vres;
|
|
||||||
double ivres;
|
|
||||||
double value;
|
double value;
|
||||||
double ivalue;
|
double ivalue;
|
||||||
|
|
||||||
|
|
@ -34,14 +32,14 @@ RESsAcLoad(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
here=here->RESnextInstance) {
|
here=here->RESnextInstance) {
|
||||||
|
|
||||||
if(here->RESsenParmNo){
|
if(here->RESsenParmNo){
|
||||||
vres = *(ckt->CKTrhsOld+here->RESposNode) -
|
value = *(ckt->CKTrhsOld+here->RESposNode) -
|
||||||
*(ckt->CKTrhsOld+here->RESnegNode);
|
*(ckt->CKTrhsOld+here->RESnegNode);
|
||||||
ivres = *(ckt->CKTirhsOld+here->RESposNode) -
|
ivalue = *(ckt->CKTirhsOld+here->RESposNode) -
|
||||||
*(ckt->CKTirhsOld+here->RESnegNode);
|
*(ckt->CKTirhsOld+here->RESnegNode);
|
||||||
value = vres * here->RESacConduct * here->RESacConduct;
|
value *= here->RESm * here->RESacConduct;
|
||||||
value = value * here->RESm * here->RESm;
|
value *= here->RESm * here->RESacConduct;
|
||||||
ivalue = ivres * here->RESacConduct * here->RESacConduct;
|
ivalue *= here->RESm * here->RESacConduct;
|
||||||
ivalue = ivalue * here->RESm * here->RESm;
|
ivalue *= here->RESm * here->RESacConduct;
|
||||||
|
|
||||||
/* load the RHS matrix */
|
/* load the RHS matrix */
|
||||||
*(ckt->CKTsenInfo->SEN_RHS[here->RESposNode] +
|
*(ckt->CKTsenInfo->SEN_RHS[here->RESposNode] +
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue