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

Eigen problem #22

Closed
pmollo opened this issue Nov 11, 2019 · 0 comments
Closed

Eigen problem #22

pmollo opened this issue Nov 11, 2019 · 0 comments

Comments

@pmollo
Copy link

pmollo commented Nov 11, 2019

Hi,
I have to solve eigen value problems, so I first try to solve a validation example... But it does not work.

Expected behavior
I take a diagonal matrix (4x4) with 4 distinct integers on diagonal, then I use the "EigenValue" function following the help page (https://doc.freefem.org/models/eigen-value-problems.html).
So I expect to find 4 eigen values/vectors, but the function only returns the 3 highest ones.
I try to grow in dimension, but the function always returns the (n-1) highest eigen values.

The code for the example :
`matrix A =
[ [4, 0, 0, 0],
[0, 3 ,0 ,0],
[0, 0, 2, 0],
[0, 0, 0, 5] ];
set(A, solver=UMFPACK);

cout << A << endl;
matrix B =
[ [1, 0, 0, 0],
[0, 1 ,0 ,0],
[0, 0, 1, 0],
[0, 0, 0, 1] ];
set(B, solver=UMFPACK);

// Solve
int Nev = 4 ;
real[int] ev(Nev); //to store eigen values
real[int,int] Vec(Nev,Nev); //to store eigen vectors

int k = EigenValue(A, B, sym=true, value=ev, rawvector=Vec, nev=Nev, maxit=0, ncv=0);
cout << k ;
cout << " vp : " << ev << endl;
cout << " Vp : " << Vec << endl;
`

I try multiple parameters, but I still don't know why it is not working.

Desktop :

  • OS: Ubuntu 18.04
  • Freefem version : v4.4.2

Thank you for your help,
Pierre.

@pmollo pmollo closed this as completed Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant