Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convergence failure in apf/eigen() #336

Open
joshia5 opened this issue Mar 30, 2021 · 3 comments
Open

convergence failure in apf/eigen() #336

joshia5 opened this issue Mar 30, 2021 · 3 comments
Labels

Comments

@joshia5
Copy link
Contributor

joshia5 commented Mar 30, 2021

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

int eigen(Matrix3x3 const& A,

fails to converge at

PCU_ALWAYS_ASSERT(converged);

However it was confirmed externally that performing eigen value decomposition for this input A
is possible.

@cwsmith
Copy link
Contributor

cwsmith commented Mar 31, 2021

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 cwsmith added the bug label Mar 31, 2021
@mortezah
Copy link
Contributor

mortezah commented Mar 31, 2021

@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):

  1. Divide all the elements of M by a large factor (1000.0 for example).
  2. Then use the eigen decomposition
  3. 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.

@joshia5
Copy link
Contributor Author

joshia5 commented Apr 2, 2021

@mortezah ok, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants