[petsc-users] Use Vectors and Scalars in MatNest matrices

Mark Adams mfadams at lbl.gov
Mon Nov 14 08:05:12 CST 2022


Not exactly.
But you can make a Mat for each.
Mark

On Mon, Nov 14, 2022 at 8:59 AM Thomas Hisch <t.hisch at gmail.com> wrote:

> Hi!
>
> I would like to ask if it is possible to create a MatNest matrix that
> contains matrices, vectors and scalars.
>
> My (jacobian) matrix looks like the following
>
> [[A, B, a, b],
>  [C, D, c, d],
>  [e, f, g, h]]
>
> where A-D are sparse square matrices, a-d are dense column vectors, e,
> f are sparse row vectors and g,h are just scalars.
>
> Is there also a petsc4py example that shows how nest objects should be
> created and how they should be used?
>
> Best regards
> Thomas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221114/8d27eea3/attachment.html>


More information about the petsc-users mailing list