[petsc-users] Adding rows and columns to a matrix

David Knezevic david.knezevic at akselos.com
Thu Sep 3 20:17:28 CDT 2015


On Thu, Sep 3, 2015 at 8:11 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>   You might also consider the MatNest object. It's job is to help
> construct matrices that have a natural set of sub matrices such as yours.
> Also look at MatGetLocalSubMat()
>


OK, thanks for the pointers.

Best regards,
David




>
> > On Sep 3, 2015, at 6:52 PM, David Knezevic <david.knezevic at akselos.com>
> wrote:
> >
> > I need to add Lagrange multipliers to an existing system of equations,
> which requires me to expand the matrix.
> >
> > I figured I would allocate a new larger matrix with the appropriate
> non-zero structure, and then copy the entries from the smaller matrix over
> to it. But I was wondering if there might be a better way to do this?
> >
> > Thanks,
> > David
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150903/eabf033d/attachment.html>


More information about the petsc-users mailing list