I’m able to solve an eigenvalue problem using EPSSolve, but I’m having trouble obtaining the calculated eigenvector and printing it on the screen. In the following code, how could I store the computed eigenvector in my eV object?
Thanks in advance
It can’t be of type Vh since your matrix is of dimension 2 * Vh.ndof. So use instead real[int,int] array(2 * Vh.ndof, nev) and then EPSSolve(..., array = array). And then you can pull the respective rows to get each component.
The notation here seems kind of weird because eV1 and eV2 are actually the same arrays and so eV2 might be used in the last two lines of the following code instead of eV1 with the same effect
Oh, I mistakenly was trying EPSSolve(..., vectors = array) instead of EPSSolve(..., array = array) that resulted in error.
Statement real[int,int] array(2 * Vh.ndof, nev) works correctly along with EPSSolve(..., array = array), and array is the sought eigenvector that can be printed or used in any other way.