<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>OK, thank you Matt.</p>
    <p>Manuel</p>
    <p>---<br>
    </p>
    <div class="moz-cite-prefix">On 3/25/19 6:27 PM, Matthew Knepley
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMYG4GnE9=LWGsYx+myV2s-a30qa1XMkt42B2rkLM51Px=PYkA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">On Mon, Mar 25, 2019 at 8:07 AM Manuel Colera
          Rico via petsc-users <<a
            href="mailto:petsc-users@mcs.anl.gov" moz-do-not-send="true">petsc-users@mcs.anl.gov</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">Hello,<br>
            <br>
            I would like to solve a N*N block system (with N>2) in
            which some of the <br>
            diagonal blocks are null. My system matrix is defined as a
            MatNest. As <br>
            N>2, I can't use "pc_fieldsplit_type schur" nor <br>
            "pc_fieldsplit_detect_saddle_point". The other algorithms
            ("additive", <br>
            "multiplicative" and "symmetric_multiplicative") don't work
            either as <br>
            they need each A_ii to be non-zero.<br>
            <br>
            Is there any built-in function in PETSc for this? If not,
            could you <br>
            please suggest a workaround?<br>
          </blockquote>
          <div><br>
          </div>
          <div>You can just shove all of the rows with nonzero diagonal
            in one field, and all with zero diagonal in another, and do
            Schur. This is what<br>
          </div>
          <div><br>
          </div>
          <div>  -pc_fieldsplit_detect_saddle_point</div>
          <div><br>
          </div>
          <div>does. However, you have to understand the Schur
            complement to solve it efficiently. More generally, you can
            recursively split the matrix,</div>
          <div>which is what I do for many multiphysics problems.</div>
          <div><br>
          </div>
          <div>  Thanks,</div>
          <div><br>
          </div>
          <div>    Matt</div>
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            Thanks and kind regards,<br>
            <br>
            Manuel<br>
            <br>
            ---<br>
            <br>
            <br>
          </blockquote>
        </div>
        <br clear="all">
        <div><br>
        </div>
        -- <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>