[petsc-users] Solving singular system via direct solvers
Matthew Knepley
knepley at gmail.com
Tue Jul 12 06:24:40 CDT 2022
On Tue, Jul 12, 2022 at 4:34 AM Ye Changqing <Ye_Changqing at outlook.com>
wrote:
> Dear all,
>
> I have a linear system constructed from discretizing a Neumann boundary
> value problem, and I want to solve it with a direct solver (to build up my
> own preconditioner). Usually, KSP returns a good solution without '-inf',
> while sometimes it fails. I referred to the corresponding chapter in the
> manual and found options '-pc_factor_shift_type' and
> '-pc_factor_shift_amount'. Could I use those options in my codes rather
> than runtime?
>
Yes. Those change the problem to be non-singular and then solve it. Is that
what you want?
> Moreover, In my case, the program did not throw an error or warning due to
> '-inf' in the solution, I also wondered how to check the solution is 'good'?
>
As Jose says, are you checking for non-convergence?
Thanks,
Matt
> Thanks,
> Changqing
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220712/04685a6b/attachment.html>
More information about the petsc-users
mailing list