devices/asrc, allocate `ASRCacValues' in ASRCsetup()

This commit is contained in:
rlar 2015-04-12 20:47:59 +02:00
parent 232debc6ec
commit b4f1c1dda3
2 changed files with 2 additions and 4 deletions

View File

@ -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) {

View File

@ -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 */