convergence failure in apf/eigen()
For a 3x3 input matrix A = 22391.839134, -79303.375391, 44018.262128 , -79303.375391, 294606.941173, -172004.515247, 44018.262128, -172004.515247, 521170.455823
the eigen function https://github.com/SCOREC/core/blob/30a332d97469e9719313e312512b2d407e912f54/apf/apfMatrix.cc#L68
fails to converge at https://github.com/SCOREC/core/blob/30a332d97469e9719313e312512b2d407e912f54/apf/apfMatrix.cc#L76
However it was confirmed externally that performing eigen value decomposition for this input A is possible.
Yeah, the following octave code appears to have no problem with it:
(ins)>> A = [[22391.839134, -79303.375391, 44018.262128],
[-79303.375391, 294606.941173, -172004.515247],
[44018.262128, -172004.515247, 521170.455823]]
(ins)>> [v, lambda] = eig(A)
v =
9.6457e-01 -2.3116e-01 1.2717e-01
2.6377e-01 8.3470e-01 -4.8342e-01
5.5972e-03 4.9983e-01 8.6610e-01
lambda =
Diagonal Matrix
9.6070e+02 0 0
0 2.1357e+05 0
0 0 6.2364e+05
@cwsmith and @joshia5 It seems that the way QR decomposition is implemented in PUMI has a difficulty when matrix entities are large numbers. Fixing that might take a while for me. I will let you know once that is done.
In the mean time, you can get around this error by doing the following (so @joshia5 can move forward with his pumi tests):
- Divide all the elements of
Mby a large factor (1000.0 for example). - Then use the eigen decomposition
- Multiply the eigen values by the same factor (1000.0). Eigen vectors are the same for both the scaled down M and original M, so nothing needs to be done there.
@mortezah ok, thanks