[petsc-users] Using MatCreateComposite with petsc4py

Matthew Knepley knepley at gmail.com
Mon Dec 2 16:32:36 CST 2024


On Mon, Dec 2, 2024 at 5:14 PM Eric Chamberland via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> Hello,
>
> We were exploring the use of the MatCreateComposite function with petsc4py,
> but we noticed that it doesn't seem to be available in the Python interface
> (https://urldefense.us/v3/__https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html__;!!G_uCfscf7eWS!aHjys_axrlOjrR_fWK2NdV-rCkGLXuEuWPoyrHbLp_01Vvr48evkik5dT077BtK20PuTlFz8mMpKHhBMaM2o$ 
> <https://urldefense.us/v3/__https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html__;!!G_uCfscf7eWS!fphemsDPNmxHUr-ybYLt_xWUrP575eKuI4xixwypEzd2g7uc6qMilt8etg13o24gU0vloOVrsHDXwqlgoY1T7jrcQUiv83PrXvNSYlNU$>
> ).
>
> We were wondering if this is due to a technical limitation or if there is
> a better alternative to achieve the same result.
>
No, we just forgot to put in this interface. It should be done. It does not
look hard, cutting and pasting from other functions.

  Thanks,

     Matt

> Our goal is to create a matrix representing PTAP without explicitly
> computing the product.
>
> We also considered using MatShell, but it seems that this approach is not
> supported in petsc4py either.
>
> On the other hand, we noticed that MatCreateTranspose is implemented, and
> it aligns somewhat with the kind of operation we're aiming for.
>
> Any insights or advice you could provide would be greatly appreciated!
>
> Thank you,
>
> Eric
>
> --
> Eric Chamberland, ing., M. Ing
> Professionnel de recherche
> GIREF/Université Laval
> (418) 656-2131 poste 41 22 42
>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!aHjys_axrlOjrR_fWK2NdV-rCkGLXuEuWPoyrHbLp_01Vvr48evkik5dT077BtK20PuTlFz8mMpKHripB8Lo$  <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!aHjys_axrlOjrR_fWK2NdV-rCkGLXuEuWPoyrHbLp_01Vvr48evkik5dT077BtK20PuTlFz8mMpKHsRQGEhB$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20241202/28eb8985/attachment.html>


More information about the petsc-users mailing list