[petsc-users] About the complex version of gmres.

neil liu liufield at gmail.com
Fri Jun 7 21:53:03 CDT 2024


Thanks  a  lot for your explanation.
Could you please share your petsc code to test this ?

Thanks,

Xiaodong

On Fri, Jun 7, 2024 at 10:12 PM Barry Smith <bsmith at petsc.dev> wrote:

>
>   If I run with -pc_type lu it solves the system
>
>   If I run with the default (ILU) -ksp_monitor_true_residual
> -ksp_converged_reason it does not converge. In fact, it makes no real
> progress to the solution.
>
>   It is always important to use KSPGetConvergedReason() or
> -ksp_converged_reason or -ksp_error_if_not_converged to check that the
> solver has actually converged.
>
>   If I run with -ksp_gmres_restart 100 it converges in 75 iterations.
>
>  Barry
>
>
>
>
> On Jun 7, 2024, at 8:03 PM, neil liu <liufield at gmail.com> wrote:
>
> This Message Is From an External Sender
> This message came from outside your organization.
> Dear Petsc developers,
>
> I am using Petsc to solve a complex system ,AX=B.
>
> A is complex and B is real.
>
> And the petsc was configured with
> Configure options --download-mpich --download-fblaslapack=1 --with-cc=gcc
> --with-cxx=g++ --with-fc=gfortran --download-triangle
> --with-scalar-type=complex
>
> A and B were also imported to matlab and the same system was solved.
> The direct and iterative solver in matlab give the same result, which are
> quite different from the result from Petsc.
> A and B are attached. x from petsc is also attached. I am using only one
> processor.
>
> It is weird.
>
> Thanks a lot.
>
> Xiaodong
> <A.m><xPetsc.m><B.m>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240607/2dec2823/attachment.html>


More information about the petsc-users mailing list