<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 2023/10/4 02:47, Matthew Knepley
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMYG4GnsoSn6NZj7MnYmwpMDZW8rZMJuYsxJqTyPkoSyV-Sxpg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">On Tue, Oct 3, 2023 at 1:51 PM Gong Ding <<a
            href="mailto:gongding@cn.cogenda.com" moz-do-not-send="true"
            class="moz-txt-link-freetext">gongding@cn.cogenda.com</a>>
          wrote:<br>
        </div>
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div>
              <p>Hi all,</p>
              <p>I'd like to do a  special jacobian precondition during
                the snes iteration, for which jacobian matrix and RHS
                vector must be modified explicitly.</p>
              <p>In the SNESComputeJacobian, the preconditioner P is
                built after assembly of jacobian matrix.</p>
              <p>I need to multiply P to J and RHS vector  explicitly as
                left precondition before the solve stage of J*dx = rhs.
                <br>
              </p>
              <pre id="m_-9121832340409894909codecell0"><span></span><span></span></pre>
            </div>
          </blockquote>
          <div>What you are proposing is exactly what PETSc does with
            left preconditioning, multiplies both sides by the
            preconditioner. What do you want to change?</div>
        </div>
      </div>
    </blockquote>
    <p>I'd like to multiply precondition matrix into jacobian matrix,
      and do LU factorization to jacobian matrix. not with iterative
      method. Something like <br>
    </p>
    <p>Kelley, C. T. "Newton's Method in Three Precisions." <i>arXiv
        preprint arXiv:2307.16051</i> (2023).</p>
    <p>BTW: does petsc have the plan to support multi-precision?<br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
cite="mid:CAMYG4GnsoSn6NZj7MnYmwpMDZW8rZMJuYsxJqTyPkoSyV-Sxpg@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <div><br>
          </div>
          <div>  Thanks,</div>
          <div><br>
          </div>
          <div>     Matt </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div>
              <pre id="m_-9121832340409894909codecell0"><span>However, I find that petsc evaluates function before jacobian, so P*</span>RHS vector can not be processed at SNESComputeFunction.

As a result,  I must find a hook function after SNESComputeJacobian and before the solve stage. 

Any suggest? 

Gong Ding
<span></span></pre>
            </div>
          </blockquote>
        </div>
        <br clear="all">
        <div><br>
        </div>
        <span class="gmail_signature_prefix">-- </span><br>
        <div dir="ltr" class="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div>What most experimenters take for granted before
                      they begin their experiments is infinitely more
                      interesting than any results to which their
                      experiments lead.<br>
                      -- Norbert Wiener</div>
                    <div><br>
                    </div>
                    <div><a href="http://www.cse.buffalo.edu/~knepley/"
                        target="_blank" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>