<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><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 <petsc-users@mcs.anl.gov> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<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 class="moz-txt-link-freetext" href="https://urldefense.us/v3/__https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html__;!!G_uCfscf7eWS!fphemsDPNmxHUr-ybYLt_xWUrP575eKuI4xixwypEzd2g7uc6qMilt8etg13o24gU0vloOVrsHDXwqlgoY1T7jrcQUiv83PrXvNSYlNU$">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 class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mi>P</mi><mi>T</mi></msup><mi>A</mi><mi>P</mi></mrow></semantics></math></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 class="moz-signature" cols="72">--
Eric Chamberland, ing., M. Ing
Professionnel de recherche
GIREF/Université Laval
(418) 656-2131 poste 41 22 42</pre>
</div></blockquote></body></html>