new variant of Hertz, op only once, doesnt sweep with hertz
This commit is contained in:
parent
39cfa283c0
commit
ba47e88b9e
|
|
@ -251,7 +251,7 @@ ACan(CKTcircuit *ckt, int restart)
|
|||
ckt->CKTomega = 2.0 * M_PI *freq;
|
||||
|
||||
/* Update opertating point, if variable 'hertz' is given */
|
||||
if (ckt->CKTvarHertz) {
|
||||
if (0 && ckt->CKTvarHertz) {
|
||||
#ifdef XSPICE
|
||||
/* Call EVTop if event-driven instances exist */
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ ASRCacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
int i, j;
|
||||
double *derivs;
|
||||
double difference;
|
||||
double factor;
|
||||
double factor, rhs;
|
||||
|
||||
NG_IGNORE(ckt);
|
||||
|
||||
|
|
@ -47,7 +47,13 @@ ASRCacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
*/
|
||||
|
||||
j = 0;
|
||||
derivs = here->ASRCacValues;
|
||||
|
||||
if (here->ASRCtree->IFeval(here->ASRCtree, ckt->CKTgmin, &rhs, here->ASRCopValues, asrc_derivs) != OK)
|
||||
return(E_BADPARM);
|
||||
|
||||
derivs = asrc_derivs;
|
||||
|
||||
// mit factor multiplien !!
|
||||
|
||||
if (here->ASRCtype == ASRC_VOLTAGE) {
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ typedef struct sASRCinstance {
|
|||
* in the sparce matrix */
|
||||
double ASRCprev_value; /* Previous value for the convergence test */
|
||||
double *ASRCacValues; /* Store rhs and derivatives for ac anal */
|
||||
double *ASRCopValues; /* Store op for ac anal */
|
||||
|
||||
unsigned ASRCtempGiven : 1; /* indicates temperature specified */
|
||||
unsigned ASRCdtempGiven : 1; /* indicates delta-temp specified */
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ ASRCdestroy(GENmodel **model)
|
|||
for (here = mod->ASRCinstances; here; here = next) {
|
||||
next = here->ASRCnextInstance;
|
||||
FREE(here->ASRCacValues);
|
||||
FREE(here->ASRCopValues);
|
||||
INPfreeTree(here->ASRCtree);
|
||||
if (here->ASRCposptr)
|
||||
free(here->ASRCposptr);
|
||||
|
|
|
|||
|
|
@ -69,8 +69,10 @@ ASRCload(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
/* The ac load precomputation and storage */
|
||||
if (ckt->CKTmode & MODEINITSMSIG)
|
||||
for (i = 0; i < here->ASRCtree->numVars; i++)
|
||||
for (i = 0; i < here->ASRCtree->numVars; i++) {
|
||||
here->ASRCopValues[i] = asrc_vals[i];
|
||||
here->ASRCacValues[i] = asrc_derivs[i];
|
||||
}
|
||||
|
||||
if (here->ASRCtype == ASRC_VOLTAGE) {
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ ASRCmDelete(GENmodel **modList, IFuid modname, GENmodel *killModel)
|
|||
|
||||
for (here = (*model)->ASRCinstances; here; here = here->ASRCnextInstance) {
|
||||
FREE(here->ASRCacValues);
|
||||
FREE(here->ASRCopValues);
|
||||
if (prev)
|
||||
FREE(prev);
|
||||
prev = here;
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ ASRCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
here->ASRCposptr = TMALLOC(double *, j);
|
||||
here->ASRCvars = TMALLOC(int, here->ASRCtree->numVars);
|
||||
here->ASRCacValues = TMALLOC(double, here->ASRCtree->numVars);
|
||||
here->ASRCopValues = TMALLOC(double, here->ASRCtree->numVars);
|
||||
|
||||
/* For each controlling variable set the entries
|
||||
in the vector of the positions of the SMP */
|
||||
|
|
|
|||
Loading…
Reference in New Issue