move instance m-factor into ressetup

This commit is contained in:
h_vogt 2013-05-07 23:09:57 +02:00 committed by rlar
parent 4b8f031971
commit 0facd43319
2 changed files with 4 additions and 18 deletions

View File

@ -26,8 +26,6 @@ RESload(GENmodel *inModel, CKTcircuit *ckt)
for (here = model->RESinstances; here != NULL ; for (here = model->RESinstances; here != NULL ;
here = here->RESnextInstance) { here = here->RESnextInstance) {
if(!here->RESmGiven) here->RESm = 1.0;
here->REScurrent = (*(ckt->CKTrhsOld+here->RESposNode) - here->REScurrent = (*(ckt->CKTrhsOld+here->RESposNode) -
*(ckt->CKTrhsOld+here->RESnegNode)) * here->RESconduct; *(ckt->CKTrhsOld+here->RESnegNode)) * here->RESconduct;

View File

@ -29,20 +29,8 @@ RESsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit*ckt, int *state)
for (here = model->RESinstances; here != NULL ; for (here = model->RESinstances; here != NULL ;
here=here->RESnextInstance) { here=here->RESnextInstance) {
/* if(!here->RESmGiven)
* Paolo Nenzi 2003 here->RESm = 1.0;
* The following lines are needed if I will move the defaulting code
* from REStemp to RESsetup, as in other (more recent ?) spice devices
*
* ------------------------------------------LEGACY CODE - Francesco Lannutti - October 22, 2012
* if (here->RESowner != ARCHme)
* goto matrixpointers;
*
* matrixpointers:
* ------------------------------------------
*
* put here instance parameter defaulting.
*/
/* macro to make elements with built in test for out of memory */ /* macro to make elements with built in test for out of memory */
#define TSTALLOC(ptr,first,second) \ #define TSTALLOC(ptr,first,second) \