devices/asrc, allocate `ASRCacValues' in ASRCsetup()
This commit is contained in:
parent
232debc6ec
commit
b4f1c1dda3
|
|
@ -74,12 +74,9 @@ ASRCload(GENmodel *inModel, CKTcircuit *ckt)
|
|||
here->ASRCprev_value = rhs;
|
||||
|
||||
/* The ac load precomputation and storage */
|
||||
if (ckt->CKTmode & MODEINITSMSIG) {
|
||||
int size = here->ASRCtree->numVars + 1;
|
||||
here->ASRCacValues = TMALLOC(double, size);
|
||||
if (ckt->CKTmode & MODEINITSMSIG)
|
||||
for (i = 0; i < here->ASRCtree->numVars; i++)
|
||||
here->ASRCacValues[i] = asrc_derivs[i];
|
||||
}
|
||||
|
||||
if (here->ASRCtype == ASRC_VOLTAGE) {
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ ASRCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
}
|
||||
|
||||
here->ASRCposptr = TMALLOC(double *, j);
|
||||
here->ASRCacValues = TMALLOC(double *, here->ASRCtree->numVars + 1);
|
||||
|
||||
/* For each controlling variable set the entries
|
||||
in the vector of the positions of the SMP */
|
||||
|
|
|
|||
Loading…
Reference in New Issue