I did find a couple of logical bug, but that does not solve the problems.
Basically this is one of those cases where I applied a toll to the wrong problems.
in come down to this,
if you have a matrix linear system represented by a M[n x n] matrix.
you can determine If some par5ticaul algorithm will converge by calculation what is called the Spectral radio of the matrix and apply to the algorithm step.
https://en.wikipedia.org/wiki/Spectral_radiusIn general these are pedant exercises with more academic value that practical value until you try to apply the wrong algorithm to a system.
you end up debugging the problem and tweaking it to find a compromise s9olution for one set for problems only to have it fail when applied to a different set of problem, and that was what I did the last two week. Shame on me because I know better than that and I ignored the theory.
you can not really determine the Spectral radio to a system at run time because this required extreme expensive, however a lot of smart people has done these analysis and we can just use the results.
https://en.wikipedia.org/wiki/Jacobi_method and indeed the Spectral radios of any small system with a loop is larger that 1.0, therefore Jacobi a naïve will never work.
for example a very simple system like tow ball on top of each other
will yield a systm like this
M = 2 1
1 1
and the Spectral radio of the system using Jacobi iteration is precisely 1.0
this mean that system will converge astatically in a infinite numeral of iterations.
by any perturbation If the system say the main diagonal becomes say
M = 1.3 1
1 1
and the Spectral radio will be much larger that 1.0 which mean that in theory that system will diverge. There are many, many paper that explain this, and I ignored them, for example
http://mathfaculty.fullerton.edu/mathew ... elMod.html quote:
... The "true" sufficient condition for Jacobi iteration to converge is that the "spectral radius" of is less than 1, where is the diagonal of That is, the magnitude of the largest eigenvalue of M must be less than 1. This condition seems harsh because numerical computation of eigenvalues is an advanced topic compared to solution of a linear system.
which is what I did last night to see if I was doing some wrong or not, in newton this is easy because we have function to calculate then using traditional methods and indeed almost any single matrix has plenty larger than one eigenvalue, even a simple box resting on a floor will have larger than one eigenvalue unless the main diagonal is scaled by some regularizer, therefore Jacobi is just a prohibited algorithm we need something better.
The way to solve the problem is by applying a transformation the system that augment it making a larger much larger system but that has a simple solution because it add sparsity.
These method are available but required some work, I will probably do it but not for 3.14