<!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">
 https: //petsc. org/release/manualpages/KSP/KSPCR/ The preconditioner must be POSITIVE-DEFINITE and the operator POSITIVE-SEMIDEFINITE. KSPMINRES — PETSc 3. 21. 4 documentation petsc. org The operator and the preconditioner must be symmetric and
</div>
<!-- Preheader Text : END -->

<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerStart</div>

<!--[if ((ie)|(mso))]>
  <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding: 16px 0px 16px 0px; direction: ltr" ><tr><td>
    <table border="0" cellspacing="0" cellpadding="0" style="padding: 0px 10px 5px 6px; width: 100%; border-radius:4px; border-top:4px solid #90a4ae;background-color:#D0D8DC;"><tr><td valign="top">
      <table align="left" border="0" cellspacing="0" cellpadding="0" style="padding: 4px 8px 4px 8px">
        <tr><td style="color:#000000; font-family: 'Arial', sans-serif; font-weight:bold; font-size:14px; direction: ltr">
          This Message Is From an External Sender
        </td></tr>
        <tr><td style="color:#000000; font-weight:normal; font-family: 'Arial', sans-serif; font-size:12px; direction: ltr">
          This message came from outside your organization.
        </td></tr>

      </table>

    </td></tr></table>
  </td></tr></table>
<![endif]-->

<![if !((ie)|(mso))]>
  <div dir="ltr"  id="pfptBanner997kuns" style="all: revert !important; display:block !important; text-align: left !important; margin:16px 0px 16px 0px !important; padding:8px 16px 8px 16px !important; border-radius: 4px !important; min-width: 200px !important; background-color: #D0D8DC !important; background-color: #D0D8DC; border-top: 4px solid #90a4ae !important; border-top: 4px solid #90a4ae;">
    <div id="pfptBanner997kuns" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
      <div id="pfptBanner997kuns" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-weight:bold !important; font-weight:bold; font-size:14px !important; line-height:18px !important; line-height:18px">
        This Message Is From an External Sender
      </div>
      <div id="pfptBanner997kuns" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-weight:normal; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-size:12px !important; line-height:18px !important; line-height:18px; margin-top:2px !important;">
This message came from outside your organization.
      </div>

    </div>

    <div style="clear: both !important; display: block !important; visibility: hidden !important; line-height: 0 !important; font-size: 0.01px !important; height: 0px"> </div>
  </div>
<![endif]>

<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerEnd</div>
<!-- Email Banner : END -->

<!-- BaNnErBlUrFlE-BoDy-end -->
<html><head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
  #pfptBanner997kuns { all: revert !important; display: block !important; 
    visibility: visible !important; opacity: 1 !important; 
    background-color: #D0D8DC !important; 
    max-width: none !important; max-height: none !important }
  .pfptPrimaryButton997kuns:hover, .pfptPrimaryButton997kuns:focus {
    background-color: #b4c1c7 !important; }
  .pfptPrimaryButton997kuns:active {
    background-color: #90a4ae !important; }
</style>

<!-- BaNnErBlUrFlE-HeAdEr-end -->
<meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div><a href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/KSP/KSPCR/__;!!G_uCfscf7eWS!ZQFXJM_C7qCPyXSN6vUgcQaTYavgEpmvtDdWSpbY1dR7m_6DlTM1CF00dL26gVO4tjPEFFvV79SEmjS1tbaF0nc$">https://petsc.org/release/manualpages/KSP/KSPCR/</a><div><br></div><div><span style="font-size: 16px; caret-color: rgb(34, 40, 50); color: rgb(34, 40, 50); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; background-color: rgb(255, 255, 255);">The preconditioner must be POSITIVE-DEFINITE and the operator POSITIVE-SEMIDEFINITE.</span></div><div><font color="#222832" face="-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" size="3"><span style="caret-color: rgb(34, 40, 50); background-color: rgb(255, 255, 255);"><br></span></font></div><div><div style="display: block;"><div style="-webkit-user-select: all; -webkit-user-drag: element; display: inline-block;" class="apple-rich-link" draggable="true" role="link" data-url="https://petsc.org/release/manualpages/KSP/KSPMINRES/"><a style="border-radius:10px;font-family:-apple-system, Helvetica, Arial, sans-serif;display:block;-webkit-user-select:none;width:300px;user-select:none;-webkit-user-modify:read-only;user-modify:read-only;overflow:hidden;text-decoration:none;" class="lp-rich-link" rel="nofollow" href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/KSP/KSPMINRES/__;!!G_uCfscf7eWS!ZQFXJM_C7qCPyXSN6vUgcQaTYavgEpmvtDdWSpbY1dR7m_6DlTM1CF00dL26gVO4tjPEFFvV79SEmjS1rmWgN0k$" dir="ltr" role="button" draggable="false" width="300"><table style="table-layout:fixed;border-collapse:collapse;width:300px;background-color:#E5E6E9;font-family:-apple-system, Helvetica, Arial, sans-serif;" class="lp-rich-link-emailBaseTable" cellpadding="0" cellspacing="0" border="0" width="300"><tbody><tr><td vertical-align="center"><table bgcolor="#E5E6E9" cellpadding="0" cellspacing="0" width="300" style="font-family:-apple-system, Helvetica, Arial, sans-serif;table-layout:fixed;background-color:rgba(229, 230, 233, 1);" class="lp-rich-link-captionBar"><tbody><tr><td style="padding:8px 0px 8px 0px;" class="lp-rich-link-captionBar-textStackItem"><div style="max-width:100%;margin:0px 16px 0px 16px;overflow:hidden;" class="lp-rich-link-captionBar-textStack"><div style="word-wrap:break-word;font-weight:500;font-size:12px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-topCaption-leading"><a rel="nofollow" href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/KSP/KSPMINRES/__;!!G_uCfscf7eWS!ZQFXJM_C7qCPyXSN6vUgcQaTYavgEpmvtDdWSpbY1dR7m_6DlTM1CF00dL26gVO4tjPEFFvV79SEmjS1rmWgN0k$" style="text-decoration: none" draggable="false"><font color="#000000" style="color: rgba(0, 0, 0, 1);">KSPMINRES — PETSc 3.21.4 documentation</font></a></div><div style="word-wrap:break-word;font-weight:400;font-size:11px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-bottomCaption-leading"><a rel="nofollow" href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/KSP/KSPMINRES/__;!!G_uCfscf7eWS!ZQFXJM_C7qCPyXSN6vUgcQaTYavgEpmvtDdWSpbY1dR7m_6DlTM1CF00dL26gVO4tjPEFFvV79SEmjS1rmWgN0k$" style="text-decoration: none" draggable="false"><font color="#3E3E3E" style="color: rgba(0, 0, 0, 0.756863);">petsc.org</font></a></div></div></td><td style="padding:6px 12px 6px 0px;" class="lp-rich-link-captionBar-rightIconItem" width="36"><a rel="nofollow" href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/KSP/KSPMINRES/__;!!G_uCfscf7eWS!ZQFXJM_C7qCPyXSN6vUgcQaTYavgEpmvtDdWSpbY1dR7m_6DlTM1CF00dL26gVO4tjPEFFvV79SEmjS1rmWgN0k$" draggable="false"><img style="pointer-events:none !important;display:inline-block;width:36px;height:36px;border-radius:3px;" width="36" height="36" draggable="false" class="lp-rich-link-captionBar-rightIcon" alt="petsc_favicon.png" src="cid:A98BB9BF-AA7A-41B8-B91D-D1DD61695831"></a></td></tr></tbody></table></td></tr></tbody></table></a></div></div><font color="#222832" face="-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" size="3"><span style="background-color: rgb(255, 255, 255);"><div><font color="#222832" face="-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" size="3"><span style="background-color: rgb(255, 255, 255);"><br></span></font></div><div><font color="#222832" face="-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" size="3"><span style="background-color: rgb(255, 255, 255);"><br></span></font></div></span></font><span style="font-size: 16px; caret-color: rgb(34, 40, 50); color: rgb(34, 40, 50); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; background-color: rgb(255, 255, 255);">The operator and the preconditioner must be symmetric and the preconditioner must be positive definite for this method.</span></div><div><font color="#222832" face="-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol"><span style="background-color: rgb(255, 255, 255);"><font size="3"><br></font></span></font></div><div><div style="display: block;"><div style="-webkit-user-select: all; -webkit-user-drag: element; display: inline-block;" class="apple-rich-link" draggable="true" role="link" data-url="https://petsc.org/release/manualpages/KSP/KSPSYMMLQ/"><a style="border-radius:10px;font-family:-apple-system, Helvetica, Arial, sans-serif;display:block;-webkit-user-select:none;width:300px;user-select:none;-webkit-user-modify:read-only;user-modify:read-only;overflow:hidden;text-decoration:none;" class="lp-rich-link" rel="nofollow" href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/KSP/KSPSYMMLQ/__;!!G_uCfscf7eWS!ZQFXJM_C7qCPyXSN6vUgcQaTYavgEpmvtDdWSpbY1dR7m_6DlTM1CF00dL26gVO4tjPEFFvV79SEmjS1uMjjdeU$" dir="ltr" role="button" draggable="false" width="300"><table style="table-layout:fixed;border-collapse:collapse;width:300px;background-color:#E5E6E9;font-family:-apple-system, Helvetica, Arial, sans-serif;" class="lp-rich-link-emailBaseTable" cellpadding="0" cellspacing="0" border="0" width="300"><tbody><tr><td vertical-align="center"><table bgcolor="#E5E6E9" cellpadding="0" cellspacing="0" width="300" style="font-family:-apple-system, Helvetica, Arial, sans-serif;table-layout:fixed;background-color:rgba(229, 230, 233, 1);" class="lp-rich-link-captionBar"><tbody><tr><td style="padding:8px 0px 8px 0px;" class="lp-rich-link-captionBar-textStackItem"><div style="max-width:100%;margin:0px 16px 0px 16px;overflow:hidden;" class="lp-rich-link-captionBar-textStack"><div style="word-wrap:break-word;font-weight:500;font-size:12px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-topCaption-leading"><a rel="nofollow" href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/KSP/KSPSYMMLQ/__;!!G_uCfscf7eWS!ZQFXJM_C7qCPyXSN6vUgcQaTYavgEpmvtDdWSpbY1dR7m_6DlTM1CF00dL26gVO4tjPEFFvV79SEmjS1uMjjdeU$" style="text-decoration: none" draggable="false"><font color="#000000" style="color: rgba(0, 0, 0, 1);">KSPSYMMLQ — PETSc 3.21.4 documentation</font></a></div><div style="word-wrap:break-word;font-weight:400;font-size:11px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-bottomCaption-leading"><a rel="nofollow" href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/KSP/KSPSYMMLQ/__;!!G_uCfscf7eWS!ZQFXJM_C7qCPyXSN6vUgcQaTYavgEpmvtDdWSpbY1dR7m_6DlTM1CF00dL26gVO4tjPEFFvV79SEmjS1uMjjdeU$" style="text-decoration: none" draggable="false"><font color="#3E3E3E" style="color: rgba(0, 0, 0, 0.756863);">petsc.org</font></a></div></div></td><td style="padding:6px 12px 6px 0px;" class="lp-rich-link-captionBar-rightIconItem" width="36"><a rel="nofollow" href="https://urldefense.us/v3/__https://petsc.org/release/manualpages/KSP/KSPSYMMLQ/__;!!G_uCfscf7eWS!ZQFXJM_C7qCPyXSN6vUgcQaTYavgEpmvtDdWSpbY1dR7m_6DlTM1CF00dL26gVO4tjPEFFvV79SEmjS1uMjjdeU$" draggable="false"><img style="pointer-events:none !important;display:inline-block;width:36px;height:36px;border-radius:3px;" width="36" height="36" draggable="false" class="lp-rich-link-captionBar-rightIcon" alt="petsc_favicon.png" src="cid:F3677267-15FF-4E5E-A6D3-4DF3C7E0FF84"></a></td></tr></tbody></table></td></tr></tbody></table></a></div></div><font color="#222832" face="-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol"><span style="background-color: rgb(255, 255, 255);"><font size="3"><div><font color="#222832" face="-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol"><span style="background-color: rgb(255, 255, 255);"><font size="3"><br></font></span></font></div></font></span></font><span style="font-size: 16px; caret-color: rgb(34, 40, 50); color: rgb(34, 40, 50); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; background-color: rgb(255, 255, 255);">The preconditioner must be POSITIVE-DEFINITE.</span></div><div><span style="font-size: 16px; caret-color: rgb(34, 40, 50); color: rgb(34, 40, 50); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; background-color: rgb(255, 255, 255);"><br></span></div><div><span style="font-size: 16px; caret-color: rgb(34, 40, 50); color: rgb(34, 40, 50); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; background-color: rgb(255, 255, 255);">Of course you can always use KSPGMRES or KSPBCGS</span></div><div><font color="#222832" face="-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol"><span style="background-color: rgb(255, 255, 255);"><font size="3"><br id="lineBreakAtBeginningOfMessage"></font></span></font><div><br><blockquote type="cite"><div>On Aug 5, 2024, at 2:27 PM, Константин Мурусидзе <konstantin.murusidze@math.msu.ru> wrote:</div><br class="Apple-interchange-newline"><div>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?<br><br>--<br>Отправлено из мобильной Яндекс Почты<br><br>05.08.2024, 18:51, "Barry Smith" <bsmith@petsc.dev>:<br><blockquote>PCFactorSetShiftType() only works for certain preconditioners, ILU. <div><br></div><div>If the matrix is not symmetric it also doesn't help.</div><div><br></div><div>Are you sure the matrix is symmetric positive definite?</div><div><br></div><div><br><div><blockquote><br><br></blockquote><div><blockquote><div>On Aug 5, 2024, at 4:43 AM, Константин Мурусидзе <<a href="mailto:konstantin.murusidze@math.msu.ru">konstantin.murusidze@math.msu.ru</a>> wrote:</div><br class="34bd394265c9c48ce7af3175baf9655dApple-interchange-newline"><div><div>After this procedure I saw "Linear solution did not converge due to DIVERGED_INDEFINITE_MAT". Then as shown on <a href="https://urldefense.us/v3/__https://petsc.org/main/manualpages/KSP/KSP_DIVERGED_INDEFINITE_PC/__;!!G_uCfscf7eWS!ZQFXJM_C7qCPyXSN6vUgcQaTYavgEpmvtDdWSpbY1dR7m_6DlTM1CF00dL26gVO4tjPEFFvV79SEmjS1OqyHDu0$">https://petsc.org/main/manualpages/KSP/KSP_DIVERGED_INDEFINITE_PC/</a>​  I wrote such line PetscCall(PCFactorSetShiftType(pc, MAT_SHIFT_POSITIVE_DEFINITE)); but nothing changed and I still have divergence</div><div><br></div><div><br></div><div>22.07.2024, 17:22, "Barry Smith" <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>>:</div><blockquote><div><br></div>   Run with -ksp_monitor_true_residual -ksp_converged_reason -ksp_view to see why it is stopping at 38 iterations.<div><br></div><div>   Barry</div><div><br id="cb7fb53d8024ab49fb3b5cd6352ceef1197d38eabd6a1f130a6b8653e70493blineBreakAtBeginningOfMessage"><div><br><blockquote><div>On Jul 22, 2024, at 7:37 AM, Константин Мурусидзе <<a href="mailto:konstantin.murusidze@math.msu.ru">konstantin.murusidze@math.msu.ru</a>> wrote:</div><br class="ac421fd3c4a8b6b63a73dee5a39abd5034bd394265c9c48ce7af3175baf9655dApple-interchange-newline"><div><div id="32a490392017c3f1a52f2e9921263c8a8853c347f276207aa3e14a8120b15c37pfptBannerrgpugnr" dir="ltr" style="background-color:rgb( 208 , 216 , 220 ) !important;border-radius:4px !important;border-top-color:rgb( 144 , 164 , 174 ) !important;border-top-style:solid !important;border-top-width:4px !important;display:block !important;font-family:'revert' !important;margin-bottom:16px !important;margin-left:0px !important;margin-right:0px !important;margin-top:16px !important;min-width:200px !important;padding-bottom:8px !important;padding-left:16px !important;padding-right:16px !important;padding-top:8px !important;text-align:left !important"><div id="32a490392017c3f1a52f2e9921263c8a8853c347f276207aa3e14a8120b15c37pfptBannerrgpugnr" style="display:block !important;float:left !important;font-family:'unset' !important;margin-bottom:1px !important;margin-left:0px !important;margin-right:0px !important;margin-top:0px !important;max-width:600px !important"><div id="32a490392017c3f1a52f2e9921263c8a8853c347f276207aa3e14a8120b15c37pfptBannerrgpugnr" style="background-color:rgb( 208 , 216 , 220 ) !important;display:block !important;font-family:'arial' , sans-serif !important;font-size:14px !important;font-weight:bold !important;line-height:18px !important;visibility:visible !important">This Message Is From an External Sender</div><div id="32a490392017c3f1a52f2e9921263c8a8853c347f276207aa3e14a8120b15c37pfptBannerrgpugnr" style="background-color:rgb( 208 , 216 , 220 ) !important;display:block !important;font-family:'arial' , sans-serif !important;font-size:12px !important;line-height:18px !important;margin-top:2px !important;visibility:visible !important">This message came from outside your organization.</div></div><div style="clear:both !important;display:block !important;font-size:0.01px !important;height:0px;line-height:0 !important;visibility:hidden !important"></div></div><div style="font-family:'helvetica';font-size:18px;font-style:normal;font-weight:400;text-align:start;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>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.</div></div></div></blockquote></div><br></div></blockquote></div></blockquote></div><br></div></div></blockquote></div></blockquote></div><br></div></body></html>