<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <p>great!  Thank you all for this information!  Indeed MATPYTHON
      cover our needs!</p>
    <p>:)<br>
    </p>
    <p>Eric</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 2024-12-03 01:36, Stefano Zampini
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAGPUish5TG4xRNZzTEUmBoytp9rGv6HWXrpis=HA0eZQ0czdtg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Eric</div>
        <div><br>
        </div>
        <div>the python equivalent of a MATSHELL is MATPYTHON, where you
          are in control of the implementation of the matrix vector
          product and other operations, see <a href="https://urldefense.us/v3/__https://petsc.org/release/petsc4py/petsc_python_types.html*petsc-python-matrix-type__;Iw!!G_uCfscf7eWS!ZD3aymPzmAu2afLqaAuAYv18OwPDU-6XWUzuj2lTZ7oyjCjYPx39HcSblHApdBD0BtxMNmBq8_BssfuDCbR1d2QRvp0ds5fft1-XkhiS$" moz-do-not-send="true" class="moz-txt-link-freetext">https://petsc.org/release/petsc4py/petsc_python_types.html#petsc-python-matrix-type</a></div>
        <div><br>
        </div>
        <div>This should cover your needs, let me know if you need
          methods that are not wrapped<br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">Il giorno mar 3 dic 2024 alle
          ore 09:15 Pierre Jolivet <<a href="mailto:pierre@joliv.et"
            moz-do-not-send="true" class="moz-txt-link-freetext">pierre@joliv.et</a>>
          ha scritto:<br>
        </div>
        <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="auto">
            <div dir="ltr"><br>
            </div>
            <div dir="ltr"><br>
              <blockquote type="cite">On 2 Dec 2024, at 11:15 PM, Eric
                Chamberland via petsc-users <<a
                  href="mailto:petsc-users@mcs.anl.gov" target="_blank"
                  moz-do-not-send="true" class="moz-txt-link-freetext">petsc-users@mcs.anl.gov</a>>
                wrote:<br>
                <br>
              </blockquote>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <p>Hello,</p>
                <p>We were exploring the use of the <code>MatCreateComposite</code>
                  function with <code>petsc4py</code>, but we noticed
                  that it doesn't seem to be available in the Python
                  interface (<a
href="https://urldefense.us/v3/__https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html__;!!G_uCfscf7eWS!fphemsDPNmxHUr-ybYLt_xWUrP575eKuI4xixwypEzd2g7uc6qMilt8etg13o24gU0vloOVrsHDXwqlgoY1T7jrcQUiv83PrXvNSYlNU$"
                    target="_blank" moz-do-not-send="true">https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html</a>).</p>
                <p>We were wondering if this is due to a technical
                  limitation or if there is a better alternative to
                  achieve the same result.</p>
                <p>Our goal is to create a matrix representing <span><span>PTAP</span>
                  </span>without explicitly computing the product.</p>
                <p>We also considered using <code>MatShell</code>, but
                  it seems that this approach is not supported in <code>petsc4py</code>
                  either.</p>
              </div>
            </blockquote>
            <div>What do you mean?</div>
            <div>You can use either a MatShell or a MatPython in
              petsc4py out of the box.</div>
            <div><br>
            </div>
            <div>Thanks,</div>
            <div>Pierre </div>
            <blockquote type="cite">
              <div dir="ltr">
                <p>On the other hand, we noticed that <code>MatCreateTranspose</code>
                  is implemented, and it aligns somewhat with the kind
                  of operation we're aiming for.</p>
                <p>Any insights or advice you could provide would be
                  greatly appreciated!</p>
                <p>Thank you,</p>
                <p>Eric</p>
                <pre cols="72">-- 
Eric Chamberland, ing., M. Ing
Professionnel de recherche
GIREF/Université Laval
(418) 656-2131 poste 41 22 42</pre>
              </div>
            </blockquote>
          </div>
        </blockquote>
      </div>
      <div><br clear="all">
      </div>
      <br>
      <span class="gmail_signature_prefix">-- </span><br>
      <div dir="ltr" class="gmail_signature">Stefano</div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Eric Chamberland, ing., M. Ing
Professionnel de recherche
GIREF/Université Laval
(418) 656-2131 poste 41 22 42</pre>
  </body>
</html>