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;
|
||||
return(OK);
|
||||
case RES_ACCONDUCT:
|
||||
value->rValue = fast->RESacConduct;
|
||||
value->rValue *= fast->RESm;
|
||||
value->rValue = fast->RESm * fast->RESacConduct;
|
||||
return (OK);
|
||||
case RES_ACRESIST:
|
||||
value->rValue = fast->RESacResist;
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@ RESsAcLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
{
|
||||
RESmodel *model = (RESmodel *)inModel;
|
||||
RESinstance *here;
|
||||
double vres;
|
||||
double ivres;
|
||||
double value;
|
||||
double ivalue;
|
||||
|
||||
|
|
@ -34,14 +32,14 @@ RESsAcLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
here=here->RESnextInstance) {
|
||||
|
||||
if(here->RESsenParmNo){
|
||||
vres = *(ckt->CKTrhsOld+here->RESposNode) -
|
||||
value = *(ckt->CKTrhsOld+here->RESposNode) -
|
||||
*(ckt->CKTrhsOld+here->RESnegNode);
|
||||
ivres = *(ckt->CKTirhsOld+here->RESposNode) -
|
||||
ivalue = *(ckt->CKTirhsOld+here->RESposNode) -
|
||||
*(ckt->CKTirhsOld+here->RESnegNode);
|
||||
value = vres * here->RESacConduct * here->RESacConduct;
|
||||
value = value * here->RESm * here->RESm;
|
||||
ivalue = ivres * here->RESacConduct * here->RESacConduct;
|
||||
ivalue = ivalue * here->RESm * here->RESm;
|
||||
value *= here->RESm * here->RESacConduct;
|
||||
value *= here->RESm * here->RESacConduct;
|
||||
ivalue *= here->RESm * here->RESacConduct;
|
||||
ivalue *= here->RESm * here->RESacConduct;
|
||||
|
||||
/* load the RHS matrix */
|
||||
*(ckt->CKTsenInfo->SEN_RHS[here->RESposNode] +
|
||||
|
|
|
|||
Loading…
Reference in New Issue