Browse Source

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

pre-master-46
rlar 11 years ago
parent
commit
b4f1c1dda3
  1. 5
      src/spicelib/devices/asrc/asrcload.c
  2. 1
      src/spicelib/devices/asrc/asrcset.c

5
src/spicelib/devices/asrc/asrcload.c

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

1
src/spicelib/devices/asrc/asrcset.c

@ -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…
Cancel
Save