<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Thanks! I will try this.<br>
    <br>
    Tabrez<br>
    <br>
    On 01/15/2013 12:23 PM, Jed Brown wrote:
    <blockquote
cite="mid:CAM9tzSkWvjs1G=M3t8hhr7m9HNOYXiFDe9YqgDEbXw3sZ1dgkg@mail.gmail.com"
      type="cite">
      <div dir="ltr">On Tue, Jan 15, 2013 at 12:09 PM, Tabrez Ali <span
          dir="ltr"><<a moz-do-not-send="true"
            href="mailto:stali@geology.wisc.edu" target="_blank">stali@geology.wisc.edu</a>></span>
        wrote:<br>
        <div class="gmail_extra">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              <div text="#000000" bgcolor="#FFFFFF"> Jed<br>
                <br>
                The problem with MatGetSubMatrix is that iscol isn't
                available easily. I want to get all associated columns
                but according to the man page it is not possible in
                Fortran.<br>
                <br>
                "If iscol is PETSC_NULL then all columns are obtained
                (not supported in Fortran)."<br>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div style="">Well, we could add Fortran support for that
              case (it currently needs a custom binding to do that) or
              you can</div>
            <div style=""><br>
            </div>
            <div style="">call
              MatGetColumnOwnershipRange(A,colstart,colend,ierr)</div>
            <div style="">ncols = colend - colstart</div>
            <div style="">call
              ISCreateStride(comm,ncols,colstart,one,iscol,ierr)</div>
            <div style=""><br>
            </div>
            <div style="">and pass iscol to MatGetSubMatrix(). This is
              what's done internally when you pass iscol=NULL:</div>
            <div style=""><br>
            </div>
            <div style="">
              <div>  if (!iscol) {</div>
              <div>    ierr =
ISCreateStride(((PetscObject)mat)->comm,mat->cmap->n,mat->cmap->rstart,1,&iscoltmp);CHKERRQ(ierr);</div>
              <div><br>
              </div>
            </div>
            <div>
               </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              <div text="#000000" bgcolor="#FFFFFF"> <br>
                Is there a workaround?<span class=""><font
                    color="#888888"><br>
                    <br>
                    Tabrez</font></span>
                <div>
                  <div class="h5"><br>
                    <br>
                    On 01/14/2013 03:38 PM, Jed Brown wrote:
                    <blockquote type="cite">
                      <div dir="ltr">On Mon, Jan 14, 2013 at 3:27 PM,
                        Tabrez Ali <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:stali@geology.wisc.edu"
                            target="_blank">stali@geology.wisc.edu</a>></span>
                        wrote:<br>
                        <div class="gmail_extra">
                          <div class="gmail_quote">
                            <blockquote class="gmail_quote"
                              style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello<br>
                              <br>
                              I am solving a system of equations of the
                              form:<br>
                              <br>
                              |A C| |u1| = |f1|<br>
                              |C'B| |u2|   |f2|<br>
                              <br>
                              After each solve, I need to perform B*f2
                              before updating f. Should I use
                              MatGetSubMatrix/VecGetSubVector followed
                              by MatMult or is there something simpler.<br>
                            </blockquote>
                            <div><br>
                            </div>
                            <div>Yes, or let PCFIELDSPLIT do all the
                              block solver stuff for you.</div>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                    <br>
                    <br>
                  </div>
                </div>
                <div class="im">
                  <pre cols="72">-- 
No one trusts a model except the one who wrote it; Everyone trusts an observation except the one who made it- Harlow Shapley</pre>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>