Browse Source

Change variable 'stepsizelimit', added in commit

c86f6265d ("relieve the step size limitation..." 2019-02-02)
to 'nostepsizelimit', thus keeping the limit, if not set.
Maximum step size is limited to tstep given by .tran tstep tstop <tstart <tmax>>.
May be overridden by giving 'set nostepsizelimit' to (tstop - tstart)/50.
Both may be overriden by setting tmax.
pre-master-46
Holger Vogt 7 years ago
parent
commit
ca5997b705
  1. 7
      src/spicelib/analysis/traninit.c

7
src/spicelib/analysis/traninit.c

@ -23,10 +23,11 @@ int TRANinit(CKTcircuit *ckt, JOB *anal)
ckt->CKTinitTime = job->TRANinitTime; ckt->CKTinitTime = job->TRANinitTime;
ckt->CKTmaxStep = job->TRANmaxStep; ckt->CKTmaxStep = job->TRANmaxStep;
/* The following code has been taken from macspice 3f4 (A. Wilson)
in the file traninit.new.c - Seems interesting */
/* Maximum step size is limited to tstep given by .tran tstep tstop <tstart <tmax>>.
May be overridden by giving 'set nostepsizelimit' to (tstop - tstart)/50.
Both may be overriden by setting tmax. */
if(ckt->CKTmaxStep == 0) { if(ckt->CKTmaxStep == 0) {
if ((ckt->CKTstep < ( ckt->CKTfinalTime - ckt->CKTinitTime )/50.0) && cp_getvar("stepsizelimit", CP_BOOL, NULL, 0))
if ((ckt->CKTstep < ( ckt->CKTfinalTime - ckt->CKTinitTime )/50.0) && !cp_getvar("nostepsizelimit", CP_BOOL, NULL, 0))
ckt->CKTmaxStep = ckt->CKTstep; ckt->CKTmaxStep = ckt->CKTstep;
else else
ckt->CKTmaxStep = ( ckt->CKTfinalTime - ckt->CKTinitTime )/50.0; ckt->CKTmaxStep = ( ckt->CKTfinalTime - ckt->CKTinitTime )/50.0;

Loading…
Cancel
Save