[petsc-users] eigensolution error with slepc
Manav Bhatia
bhatiamanav at gmail.com
Mon Apr 4 11:43:01 CDT 2016
Thanks!
I upgraded to 3.6.3 and ran the code, and it went through all the load steps without problem.
A followup question:
It seems like the eigenvalues are sorted based on abs(lambda). If I am interested in only the lowest N eigenvalues greater than 0, is there a way to tell slepc to ignore all eigenvalues less than 0?
Thanks,
Manav
> On Apr 4, 2016, at 11:30 AM, Jose E. Roman <jroman at dsic.upv.es> wrote:
>
>
>> El 4 abr 2016, a las 18:23, Manav Bhatia <bhatiamanav at gmail.com> escribió:
>>
>> Thanks, Jose!
>>
>> I am currently running 3.6.2, and will update to 3.6.3.
>>
>> Is there a recommended strategy to automatically switch from GHEP to GNHEP for some subset of problems? Or should I choose to run all my eigenprobelms with GNHEP?
>>
>> Regards,
>> Manav
>
> Well you could consider doing a trick like this:
>
> PetscPushErrorHandler(PetscIgnoreErrorHandler,NULL);
> ierr = EPSSolve(eps);
> PetscPopErrorHandler();
> if (ierr) {
> ierr = EPSSetProblemType(eps,EPS_GNHEP);CHKERRQ(ierr);
> ierr = EPSSolve(eps);CHKERRQ(ierr);
> }
>
> But this is very ugly and does not discriminate one particular error from others. A (costly) alternative would be to compute a rough approximation of the leftmost eigenvalue of your K matrix to see if it is negative.
>
> Jose
>
More information about the petsc-users
mailing list