[petsc-users] Example for MatSeqAIJKron?

Yuyun Yang yyang85 at alumni.stanford.edu
Mon Dec 5 02:48:35 CST 2022


Great, thank you!

From: Pierre Jolivet <pierre at joliv.et>
Date: Monday, December 5, 2022 at 4:34 PM
To: Yuyun Yang <yyang85 at alumni.stanford.edu>
Cc: petsc-users <petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] Example for MatSeqAIJKron?
Dear Yuyun,
Here is the simple example that I wrote to test the function: https://petsc.org/release/src/mat/tests/ex248.c.html
You can stick to MatCreate(), but this will only work if the type of your Mat is indeed MatSeqAIJ.
If you need this for other types, let us know.

Thanks,
Pierre


On 5 Dec 2022, at 9:12 AM, Yuyun Yang <yyang85 at alumni.stanford.edu> wrote:

Dear PETSc team,

Is there an example for using MatSeqAIJKron? I’m using MatCreate for all matrices in the code, and wonder if I need to switch to MatCreateSeqAIJ in order to use this function? Just want to compute simple Kronecker products of a sparse matrix with an identity matrix.

Thank you,
Yuyun

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221205/a64a305d/attachment.html>


More information about the petsc-users mailing list