You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
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 :
Thank you for your help,
Pierre.
The text was updated successfully, but these errors were encountered: