~kicad/+git/ngspice-mirror-sourceforge:rewrite-sw+2

Last commit made on 2018-03-30
Get this branch:
git clone -b rewrite-sw+2 https://git.launchpad.net/~kicad/+git/ngspice-mirror-sourceforge
Members of KiCad can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
rewrite-sw+2
Repository:
lp:~kicad/+git/ngspice-mirror-sourceforge

Recent commits

bc12b32... by rlar <rlar>

spicelib/devices/{sw,csw}, fix CKTtime += CKTdelmin issue

don't CKTtrunc when we approach the projected switch point by more
than 100 * DBL_EPSILON * CKTtime

to make sure VSRC / ISRC has still room to produce values.

FIXME,
  dctran.c might suffer from a similiar, non sw/csw related issue.
  it might be necessairy to generally replace CKTdelmin by
    MAX(CKTdelmin, HEADROOM * DBL_EPSILON * CKTtime)

f159708... by rlar <rlar>

failing testcase, tran freezes

3a635fc... by rlar <rlar>

davis testcircuit from bug #240, show achieved precision

ae8657f... by rlar <rlar>

testcases

21c4003... by rlar <rlar>

spicelib/devices/{sw,csw}, #13/, improve SW/CSWtrunc()

shrink the timesteps down to CKTdelmin when aproaching a switchpoint,
but not any further.

fixme, thats not entirely save, consider lastChange==0 too !

Thanks to Alan Gillespie for pointing to this place.

624c523... by rlar <rlar>

spicelib/devices/{sw,csw}, #12/, minor, increase similiarity CSW vs SW

to ease diff'ing of those two models

(compile "for i in swacld.c swask.c sw.c swdefs.h swdel.c swdest.c swext.h swinit.c swinit.h switf.h swload.c swmask.c swmdel.c swmpar.c swnoise.c swparam.c swpzld.c swsetup.c swtrunc.c ; do diff -U2 -b -w src/spicelib/devices/sw/$i src/spicelib/devices/csw/c$i ; done" 'diff-mode)

d515a10... by rlar <rlar>

spicelib/devices/{sw,csw}, #10/, bug fix, update CKTstate0[..CSWctrlvalue]

instead of CKTstate1[..CSWswitchstate]

which was introduced in commit:

> commit 0dae4607a01e2bbf93a925f5c37385ad9ce232f2
> Date: Wed Apr 25 18:28:20 2001 +0000
>
> Added a patch to csw and sw from Jon Engelbert dealing with negative hister

13bb4ca... by rlar <rlar>

spicelib/devices/{sw,csw}, #9/, cleanup, rename missleading zero_stateGiven

1d998d0... by rlar <rlar>

spicelib/devices/{sw,csw}, #8/, cleanup, enums

reorder enum values for "state" to simplify boolean expressions,
 and to make the miss-use of a "double" as "enum" less disturbing.
This commit will cause ngspice to exit()
  in certain not thought of cases.

See
> commit 0dae4607a01e2bbf93a925f5c37385ad9ce232f2
> Date: Wed Apr 25 18:28:20 2001 +0000
>
> Added a patch to csw and sw from Jon Engelbert dealing with negative histeresys

which changed "state" to range over {0,1,2,3}
spicelib/devices/{sw,csw}, #8/, cleanup, enums

91d4f74... by rlar <rlar>

spicelib/devices/{sw,csw}, #7/, cleanup, HYST_ON/OFF

clean up the state transition from REALLY_ON/OFF to HYST_ON/OFF