[petsc-users] Get solution and rhs in the ts monitor
Matthew Knepley
knepley at gmail.com
Thu Nov 10 05:15:36 CST 2022
On Thu, Nov 10, 2022 at 3:18 AM Tang, Qi <tangqi at msu.edu> wrote:
> Hi,
>
> How could I get rhs and solution in a ksp solve of ts?
>
> I am testing a linear problem (TS_Linear) using a bdf integrator. I tried
> to get the operator, rhs, and solution in the ts monitor through TSGetKSP
> and KSPGet***. But r = Ax-b is much larger than the ksp norm. I know the
> solver works fine.
>
Ax - b is the _unpreconditioned_ norm. By default we are printing the
preconditioned norm. You can see the difference by running with
-ksp_monitor_true_residual
Thanks,
Matt
> Did I misunderstand something about how TS works here? Perhaps one of the
> vectors is changed after the ksp solve? If so, is there a simple way to get
> rhs and solution that ksp of ts solved?
>
> Thanks,
> Qi
>
>
>
--
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/20221110/9683437f/attachment.html>
More information about the petsc-users
mailing list