relieve the step size limitation (formerly set to TSTEP in tran simulation).

However not all examples will do without, thus the variable 'stepsizelimit'
is set in spinit. Unset it in .spiceinit to get the new behavior.
Of course then you might add the limit by setting TMAX in the tran command.
This commit is contained in:
Holger Vogt 2019-02-02 09:36:59 +01:00
parent 6a14271894
commit c86f6265db
7 changed files with 9 additions and 1 deletions

View File

@ -7,6 +7,7 @@ Modified: 2000 AlansFixes
#include "ngspice/cktdefs.h"
#include "ngspice/trandefs.h"
#include "ngspice/iferrmsg.h"
#include "ngspice/cpextern.h"
/*
* this used to be in setup, but we need it here now
@ -25,7 +26,7 @@ int TRANinit(CKTcircuit *ckt, JOB *anal)
/* The following code has been taken from macspice 3f4 (A. Wilson)
in the file traninit.new.c - Seems interesting */
if(ckt->CKTmaxStep == 0) {
if (ckt->CKTstep < ( ckt->CKTfinalTime - ckt->CKTinitTime )/50.0)
if ((ckt->CKTstep < ( ckt->CKTfinalTime - ckt->CKTinitTime )/50.0) && cp_getvar("stepsizelimit", CP_BOOL, NULL, 0))
ckt->CKTmaxStep = ckt->CKTstep;
else
ckt->CKTmaxStep = ( ckt->CKTfinalTime - ckt->CKTinitTime )/50.0;

View File

@ -13,6 +13,8 @@ set x11lineararcs
** default (if compiled with --enable-openmp) is: 2
*set num_threads=4
set interactive
* step size is limited to TSTEP in tansient simulation
set stepsizelimit
strcmp __flag $program "ngspice"
if $__flag = 0

View File

@ -13,6 +13,7 @@ set filetype=ascii
** default (if compiled with --enable-openmp) is: 2
set num_threads=4
set interactive
set stepsizelimit
strcmp __flag $program "ngspice"
if $__flag = 0

View File

@ -13,6 +13,7 @@ set filetype=ascii
** default (if compiled with --enable-openmp) is: 2
set num_threads=4
set interactive
set stepsizelimit
strcmp __flag $program "ngspice"
if $__flag = 0

View File

@ -13,6 +13,7 @@ set filetype=ascii
** default (if compiled with --enable-openmp) is: 2
set num_threads=4
set interactive
set stepsizelimit
strcmp __flag $program "ngspice"
if $__flag = 0

View File

@ -13,6 +13,7 @@ set filetype=ascii
** default (if compiled with --enable-openmp) is: 2
set num_threads=4
set interactive
set stepsizelimit
strcmp __flag $program "ngspice"
if $__flag = 0

View File

@ -13,6 +13,7 @@ set filetype=ascii
** default (if compiled with --enable-openmp) is: 2
set num_threads=4
set interactive
set stepsizelimit
strcmp __flag $program "ngspice"
if $__flag = 0