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

Matthew Knepley knepley at gmail.com
Thu Sep 3 18:58:05 CDT 2015


On Thu, Sep 3, 2015 at 7: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?
>

If you don't know the pattern at the beginning, its the best way.

   Thanks,

     Matt


> Thanks,
> David
>



-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150903/73656be4/attachment.html>


More information about the petsc-users mailing list