https://urldefense.us/v3/__https://petsc.org/release/manualpages/KSP/KSPCR/__;!!G_uCfscf7eWS!ZQFXJM_C7qCPyXSN6vUgcQaTYavgEpmvtDdWSpbY1dR7m_6DlTM1CF00dL26gVO4tjPEFFvV79SEmjS1tbaF0nc$
The preconditioner must be POSITIVE-DEFINITE and the operator POSITIVE-SEMIDEFINITE. https://urldefense.us/v3/__https://petsc.org/release/manualpages/KSP/KSPMINRES/__;!!G_uCfscf7eWS!ZQFXJM_C7qCPyXSN6vUgcQaTYavgEpmvtDdWSpbY1dR7m_6DlTM1CF00dL26gVO4tjPEFFvV79SEmjS1rmWgN0k$  The operator and the preconditioner must be symmetric and the preconditioner must be positive definite for this method. https://urldefense.us/v3/__https://petsc.org/release/manualpages/KSP/KSPSYMMLQ/__;!!G_uCfscf7eWS!ZQFXJM_C7qCPyXSN6vUgcQaTYavgEpmvtDdWSpbY1dR7m_6DlTM1CF00dL26gVO4tjPEFFvV79SEmjS1uMjjdeU$  The preconditioner must be POSITIVE-DEFINITE. Of course you can always use KSPGMRES or KSPBCGS > On Aug 5, 2024, at 2:27 PM, Константин Мурусидзе > <[email protected]> wrote: > > I know that matrix is symmetric, but it isn’t positive definite. Is it > possible to solve such problem, maybe with another solver or preconditioner? > > -- > Отправлено из мобильной Яндекс Почты > > 05.08.2024, 18:51, "Barry Smith" <[email protected]>: > PCFactorSetShiftType() only works for certain preconditioners, ILU. > > If the matrix is not symmetric it also doesn't help. > > Are you sure the matrix is symmetric positive definite? > > > > > On Aug 5, 2024, at 4:43 AM, Константин Мурусидзе > <[email protected] <mailto:[email protected]>> > wrote: > > After this procedure I saw "Linear solution did not converge due to > DIVERGED_INDEFINITE_MAT". Then as shown on > https://urldefense.us/v3/__https://petsc.org/main/manualpages/KSP/KSP_DIVERGED_INDEFINITE_PC/__;!!G_uCfscf7eWS!ZQFXJM_C7qCPyXSN6vUgcQaTYavgEpmvtDdWSpbY1dR7m_6DlTM1CF00dL26gVO4tjPEFFvV79SEmjS1OqyHDu0$ > I wrote such line PetscCall(PCFactorSetShiftType(pc, > MAT_SHIFT_POSITIVE_DEFINITE)); but nothing changed and I still have divergence > > > 22.07.2024, 17:22, "Barry Smith" <[email protected] <mailto:[email protected]>>: > > Run with -ksp_monitor_true_residual -ksp_converged_reason -ksp_view to see > why it is stopping at 38 iterations. > > Barry > > > On Jul 22, 2024, at 7:37 AM, Константин Мурусидзе > <[email protected] <mailto:[email protected]>> > wrote: > > This Message Is From an External Sender > This message came from outside your organization. > Good afternoon. I am a student at the Faculty of Mathematics and for my > course work I need to solve SLAE with a relative accuracy of 1e-8 or more. To > do this, I created the function PetscCall(KSPSetTolerances(ksp, 1.e-8, > PETSC_DEFAULT, PETSC_DEFAULT, 100000));. But in the end, only 38 iterations > were made and the relative norm ||Ax-b||/||b|| it turns out 4.54011. If you > reply to my email, I can give you more information about the solver settings. > >
