-
Notifications
You must be signed in to change notification settings - Fork 135
Open
Description
hello, I used the GenEigsRealShiftSolver to compute a large sym matrix (3362*3362), the eigenvalues and eigenvectors are different to the results get in Matlab.
Here is part of the code(it's used to calculate the mode profiles in Computational Electromagnetics):
double shift = (guess * k0) * (guess * k0);
DenseSymShiftSolve<double> op(P0);
SymEigsShiftSolver<DenseSymShiftSolve<double>> eigs(op, nmodes, 2*nmodes+1, shift);
ArrayXXd evalues;
MatrixXd evectors;
eigs.init();
eigs.compute(SortRule::LargestMagn,100000000,1e-8,SortRule::LargestMagn);
if (eigs.info() == CompInfo::Successful)
{
evalues = eigs.eigenvalues().real();
evectors = eigs.eigenvectors().real();
}
I think the Maximum number of iterations is big enough, and the difference between the results from this and matlab is obvious.
Metadata
Metadata
Assignees
Labels
No labels