<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Le 13/01/2014 22:15, Matthew Knepley a
      écrit :<br>
    </div>
    <blockquote
cite="mid:CAMYG4GnAY3Pk_ZW8w_Yjrj8fyaz_4AsbamEWO2T8Jb3CWo+s8w@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Mon, Jan 13, 2014 at 2:27 PM, Rémi
            Lacroix <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:remi.lacroix@inria.fr" target="_blank">remi.lacroix@inria.fr</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div text="#000000" bgcolor="#FFFFFF">
                <div>Le 13/01/2014 19:00, Matthew Knepley a écrit :<br>
                </div>
                <blockquote type="cite">
                  <div dir="ltr">
                    <div class="gmail_extra">
                      <div class="gmail_quote">On Mon, Jan 13, 2014 at
                        9:47 AM, Rémi Lacroix <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:remi.lacroix@inria.fr"
                            target="_blank">remi.lacroix@inria.fr</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">Hello,<br>
                          <br>
                          I would like to permute an index set with
                          another index set, just like you can do for
                          vectors using VecScatter.<br>
                          <br>
                          I have two index sets IS1 and IS2 which share
                          the same size but have different parallel
                          layouts. I often need to permute
                          vectors/matrices using those two index sets
                          (as in first permute with IS1 then permute the
                          result with IS2). Since I don't use the
                          intermediate result, I would like to permute
                          IS1 with IS2 to get a new index set so that I
                          can permute directly my vectors/matrices with
                          it. Is that possible using Petsc?<br>
                        </blockquote>
                        <div><br>
                        </div>
                        <div>We do not have this particular composition
                          in our interface. However, you could
                          accomplish this using PetscSF.</div>
                        <div><br>
                        </div>
                        <div>  Thanks,
                          <div><br>
                          </div>
                          <div>     Matt</div>
                        </div>
                      </div>
                    </div>
                  </div>
                </blockquote>
                <br>
                Thanks for the quick answer.<br>
                <br>
                So basically I need to have a look at the underlying
                mechanism of VecScatter and implement something similar
                for IS. How complex would it be in practice?</div>
            </blockquote>
            <div><br>
            </div>
            <div>Using the PetscSF interface instead of VecScatter
              should not be too hard.</div>
            <div><br>
            </div>
            <div>   Matt</div>
          </div>
        </div>
      </div>
    </blockquote>
    In fact this is quite easier than I expected it to be.<br>
    <br>
    I have a quick question though. Is it safe to access the row layout
    of a matrix using "mat->rmap"? I wasn't able to find a function
    to do this. This way I would be able to use "PetscSFSetGraphLayout"
    directly.<br>
    <br>
    Rémi<br>
  </body>
</html>