Assembling a matrix

Anirban Chatterjee achatter at cse.psu.edu
Tue Dec 8 16:13:47 CST 2009


Hi Mathew,

This is being done as part of one of my functions and I finally I need 
to get the matrix B to proceed.

--Anirban

Matthew Knepley wrote:
> Are you sure you want to assemble it? Unless you factor it, maybe 
> maintaining it unassembled is better.
>
>   Matt
>
> On Tue, Dec 8, 2009 at 4:05 PM, Anirban Chatterjee 
> <achatter at cse.psu.edu <mailto:achatter at cse.psu.edu>> 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 lead.
> -- Norbert Wiener



More information about the petsc-users mailing list