From ca5997b705e5e893bcd9a5f3621811180527ac72 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sat, 20 Jul 2019 15:33:10 +0200 Subject: [PATCH] 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 >. May be overridden by giving 'set nostepsizelimit' to (tstop - tstart)/50. Both may be overriden by setting tmax. --- src/spicelib/analysis/traninit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/spicelib/analysis/traninit.c b/src/spicelib/analysis/traninit.c index 135ed12dc..ce5f4ec83 100644 --- a/src/spicelib/analysis/traninit.c +++ b/src/spicelib/analysis/traninit.c @@ -23,10 +23,11 @@ int TRANinit(CKTcircuit *ckt, JOB *anal) ckt->CKTinitTime = job->TRANinitTime; 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 >. + May be overridden by giving 'set nostepsizelimit' to (tstop - tstart)/50. + Both may be overriden by setting tmax. */ 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; else ckt->CKTmaxStep = ( ckt->CKTfinalTime - ckt->CKTinitTime )/50.0;