[Ktechlab-devel] ugh

Alan Grimes agrimes at speakeasy.net
Thu Dec 28 16:53:04 UTC 2006


30 hours of debugging, can't think streight...

I was having trouble with the current LU solver so I thought I would
just drop my trusty LU solver that I developed for class last fall. The
conventions I had used for my own code were completely different from
what ktechlab uses... I spent 30 hours baning on a square peg... =\

After untangling the Matrix class, rolling back some noteworthy
optimizations, I exposed a deeper problem. The reason the old class was
glitching out so remarkably was that when it was given a singular
(unsolvable) matrix, it would fudge the numbers by a little bit and
continue on...

When you roll that back, putting anything in the document with any
floating pins and a non-zero conductance will cause it to crash. -- you
can't solve for current when voltage is undefined.

On large circuits such as the moddedkenwood circuit, it is quite solid
now except for some relatively minor numeric drift. I would like to see
that improve but I'm not overly upset about it.

On other circuits, it will crash-on-load if there is anything that isn't
nailed to a voltage source...

This will require changes to Circuit and/or Elementset to handle this
correctly and in a user friendly way... -- ie: if no voltage sources, do
no simulation. or if there's no fixed voltage points in the circuit,
average all voltages so that the voltage in the middle of the battery is 0.

something like that...
but I NEED to take a break right now. I'm not sure when I'll be back.


-- 
|/-\|/-\|




More information about the Ktechlab-devel mailing list