[petsc-users] Kronecker Product
Matthew Knepley
knepley at gmail.com
Mon Jan 30 13:30:59 CST 2023
On Mon, Jan 30, 2023 at 2:24 PM Guglielmo, Tyler Hardy via petsc-users <
petsc-users at mcs.anl.gov> wrote:
> Thanks Barry,
>
>
>
> I saw that function, but wasn’t sure how to apply it since the
> documentation says that S and T are dense matrices, but in my case all
> matrices involved are sparse. Is there a way to work around the dense
> requirement?
>
We don't have parallel sparse-sparse. It would not be too hard to write,
but it would be some work.
It is hard to understand the use case. Is one matrix much smaller? If not,
and you inherit the distribution from A, it seems
like it might be very suboptimal, and otherwise you would have to
redistribute on the fly and it would get very complicated.
Thanks,
Matt
> Best,
>
> Tyler
>
>
>
> *From: *Barry Smith <bsmith at petsc.dev>
> *Date: *Monday, January 30, 2023 at 11:12 AM
> *To: *Guglielmo, Tyler Hardy <guglielmo2 at llnl.gov>
> *Cc: *petsc-users at mcs.anl.gov <petsc-users at mcs.anl.gov>
> *Subject: *Re: [petsc-users] Kronecker Product
>
>
>
> Do you need the explicit sparse representation of the Kronecker
> product? Or do you want to apply it as an operator or solve systems with
> it? If the latter you can use
> https://petsc.org/release/docs/manualpages/Mat/MatCreateKAIJ/#matcreatekaij
> <https://urldefense.us/v3/__https:/petsc.org/release/docs/manualpages/Mat/MatCreateKAIJ/*matcreatekaij__;Iw!!G2kpM7uM-TzIFchu!lSQ9WFlYi6PMdfs3WAfEq4ydgCLZtfDgyFy9PjdLNTisCsHtwmVuukcpIv1J0i1EtiQ$>
>
>
>
> Barry
>
>
>
>
>
>
>
> On Jan 30, 2023, at 12:53 PM, Guglielmo, Tyler Hardy via petsc-users <
> petsc-users at mcs.anl.gov> wrote:
>
>
>
> Hi all,
>
>
>
> I am wondering if there is any functionality for taking Kronecker products
> of large sparse matrices that are parallel? MatSeqAIJKron is as close as I
> have found, but it seems like this does not work for parallel matrices.
> Any ideas here?
>
>
>
> An option could be to make A and B sequential, compute the Kronecker
> product, C, then scatter C into a parallel matrix? This seems like a
> horribly inefficient procedure. I’m still fairly new to petsc, so thanks
> for patience :)!
>
>
>
> Best,
>
> Tyler
>
>
>
> +++++++++++++++++++++++++++++
>
> Tyler Guglielmo
>
> Postdoctoral Researcher
>
> Lawrence Livermore National Lab
>
> Office: 925-423-6186
>
> Cell: 210-480-8000
>
> +++++++++++++++++++++++++++++
>
>
>
--
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://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230130/c72b1d5d/attachment-0001.html>
More information about the petsc-users
mailing list