<div dir="ltr"><div dir="ltr">On Mon, Feb 17, 2020 at 1:59 PM Emmanuel Ayala <<a href="mailto:juaneah@gmail.com">juaneah@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi, thanks for the quick answer.<br><br>I just did it, and it does not work. My problem is GNHEP and I use the default solver (Krylov-Schur). Moreover I run the code with the options: -st_ksp_type preonly -st_pc_type lu -st_pc_factor_mat_solver_type mumps</div></blockquote><div><br></div><div>I guess a better question is: What do you expect to work?</div><div><br></div><div>For a linear solve,</div><div><br></div><div> A x = b</div><div><br></div><div>if a row i is 0 except for a one on the diagonal, then I get</div><div><br></div><div> x_i = b_i</div><div><br></div><div>so hopefully you put the correct boundary value in b_i. For the generalized eigenproblem</div><div><br></div><div> A x = \lambda B x</div><div><br></div><div>if you set row i to the identity in A, and zero in B, we get</div><div><br></div><div> x_i = 0</div><div><br></div><div>and you must put the boundary values into x after you have finished the solve. Is this what you did?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Any other suggestions?</div>Kind regards.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El lun., 17 de feb. de 2020 a la(s) 12:39, Jeremy Theler (<a href="mailto:jeremy@seamplex.com" target="_blank">jeremy@seamplex.com</a>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The usual trick is to set ones in one matrix and zeros in the other<br>
one.<br>
<br>
<br>
On Mon, 2020-02-17 at 12:35 -0600, Emmanuel Ayala wrote:<br>
> Hi everyone,<br>
> <br>
> I have an eigenvalue problem where I need to apply BCs to the<br>
> stiffness and mass matrix. <br>
> <br>
> Usually, for KSP solver, it is enough to set to zero the rows and<br>
> columns related to the boundary conditions. I used to apply it with<br>
> MatZeroRowsColumns, with a 1s on the diagonal. Then the solver works<br>
> well.<br>
> <br>
> There is something similar to KSP for EPS solver ? <br>
> <br>
> I already used MatZeroRowsColumns (for EPS solver), with a 1s on the<br>
> diagonal, and I got wrong result.<br>
> <br>
> Kind regards.<br>
> <br>
> <br>
> <br>
> <br>
<br>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>