[petsc-users] Eigensolution of Dirichlet Constrained problems

Jose E. Roman jroman at dsic.upv.es
Thu Dec 3 01:53:49 CST 2020

Removing rows and columns is the recommended way.

An alternative is to assemble the matrix with those rows and columns included, then use MatZeroRows() or MatZeroRowsColumns() to zero out the constrained row and set a value alpha in the diagonal entry of that row. In this way, alpha becomes an eigenvalue of the new matrix. The value alpha must be chosen carefully. If it is close to the wanted eigenvalues then it might be returned as a computed eigenvalue. Normally one would set it to be far away from wanted eigenvalues, but care must be taken not to expand the range of the spectrum because this may have an impact on convergence or conditioning.


> El 2 dic 2020, a las 22:54, Manav Bhatia <bhatiamanav at gmail.com> escribió:
> Hi, 
>   When solving an eigenproblem with Dirichlet constraints on some of the DoFs, I have so far been creating a new matrix including only the unconstrained rows/columns and the calling the eigensolver on that. This works without issues. 
>    I am writing to check if there are other recommended ways to handle such constraints in SLEPc. 
> Thanks,
> Manav

More information about the petsc-users mailing list