Browse Source

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.
pre-master-46
Holger Vogt 7 years ago
parent
commit
d4c3d9ceb2
  1. 3
      src/spicelib/analysis/traninit.c
  2. 2
      src/spinit.in
  3. 1
      visualc/spinit_all
  4. 1
      visualc/spinitd
  5. 1
      visualc/spinitd64
  6. 1
      visualc/spinitr
  7. 1
      visualc/spinitr64

3
src/spicelib/analysis/traninit.c

@ -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;

2
src/spinit.in

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

1
visualc/spinit_all

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

1
visualc/spinitd

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

1
visualc/spinitd64

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

1
visualc/spinitr

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

1
visualc/spinitr64

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

Loading…
Cancel
Save