Assembling a matrix

Matthew Knepley knepley at
Tue Dec 8 16:10:14 CST 2009

Are you sure you want to assemble it? Unless you factor it, maybe
maintaining it unassembled is better.


On Tue, Dec 8, 2009 at 4:05 PM, Anirban Chatterjee <achatter at>wrote:

> Hi,
> I have an nxn matrix A, a column vector v and a scalar c. I want to
> assemble a matrix B as follows,
> B = [A v;
>       v^T c]
> Can someone tell me the easiest and most efficient way to do this.
> --Anirban

What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the petsc-users mailing list