~kicad/+git/ngspice-mirror-sourceforge:fix-niiter

Last commit made on 2018-01-30
Get this branch:
git clone -b fix-niiter 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:
fix-niiter
Repository:
lp:~kicad/+git/ngspice-mirror-sourceforge

Recent commits

689fa40... by rlar <rlar>

for testing, explicitly destroy CKTrhs

which is expected not to be used when returning from NIiter()

c9428f0... by rlar <rlar>

some comments to describe state of CKTrhs CKTrhsOld at various points

esp, note the split usage
  CKTload() fills the right hand side of the matrix equation into CKTrhs
  then the equation is solved and the result (no longer a right and side)
    is stored in CKTrhs, and finally deployed in CKTrhsOld

7fd4a22... by rlar <rlar>

ni/niiter.c, bug fix, CKTrhsOld is meant to return the solution

when solving
  circuitmatrix . x = rhs
in function NIiter()

The result es expected to be delivered in CKTrhsOld.
CKTrhs is meant to store leftover garbage when returning from NIiter()

this can be seen most notably in CKTdump(), and in other iters,
  for example NIacIter()

as a consequence the solution of the second to last iteration
  was used, instead of the very last iteration.
This can be quite inaccurate if the second to last iteration
  was marked CKTnoncon by somebody.
In my case this was the caused by the convlimit option in xpsice
  which intentionally uses incorrect values and correctly markes
  the results unusable with CKTnoncon.

caf3115... by rlar <rlar>

cleanup, emphasise CKTrhs being an array

when accessing slot [0]

560cb6e... by Holger Vogt

plotting/grid.c, bug fix, avoid string buffer overflow

Prevent a crash of example/FFT_test.cir.
Buffer 'buf' in function drawlingrid() has been too small.
Increase 'buf' size, and add some protection.

The example file examples/plot/test-small-plot.cir
shows the limits of plotting:
  difference in two numbers at digit 14 is plotted well.
                            at digit 15 is plotted with bugs.
                            at digit 16 is reduced to integer.

consider compiling with
  -O1 -D_FORTIFY_SOURCE=2
for gcc, and
  /GS
for visual studio.

c892b2d... by rlar <rlar>

analysis/acan.c, check for valid startfreq

an 'ac dec' or 'ac oct' can not have a startfreq <= 0

c5d8ad7... by rlar <rlar>

analysis/acsetp.c, ac analysis, allow frequency=0

57a0a5d... by rlar <rlar>

devices/bjt/bjttemp.c, bug fix, capacity temperature dependency

Fix a very old bug in the implementation of the
  gummel-poon model formulas for the junction capacities.
  (already in spice3f4)
For unknown reasons, the same formulas in the
  diode mos1 mos2 mos6 jfet models
have been implemented correctly right from the beginning,
the typo was bjt specific.

Many Thanks for the concise and precise Bug Report
  provided by Schabo Rumanus on the ngspice-users mailing list
> To: <email address hidden>
> Subject: [Ngspice-users] Temperatursimulation von Sperrschichtkapazitäten

Many Thanks to Dietmar Warning for his thorough verification
  of this commit.

f0159cb... by rlar <rlar>

numparam/spicenum.c, stripbraces(), bug fix

overwriting SPICE_DSTRING `dstr_p' may invalidate `s'

This bug was injected with the introduction of SPICE_DSTRING in :
> commit 76feebbbfad30a449a182367a9aa2d732c6cd587
> Date: Thu Feb 25 21:43:03 2010 +0000
> various bug fixes

84761c1... by rlar <rlar>

fix erfc() usage in cider

cider relied on our broken ngspice variant of erfc() which behaved as
  erfc_ngspice(x) = erfc(fabs(x))

Note:
  apart from cider, erfc is used in
    devices/ltra/ltramisc.c
      always with positive argument
  and
    src/frontend/spec.c
      again always with positive argument
Thus, the difference in implementation
 never mathered anywhere except in cider