combining matrices
Hong Zhang
hzhang at mcs.anl.gov
Wed Sep 19 10:07:23 CDT 2007
We do not have such function.
You can create a new matrix C of size m x (n1 + n2),
and do a loop:
for each row:
MatGetRow(A, row,...)
MatSetValues(C,1,&row,...)
MatGetRow(B, )
MatSetValues(C,1,&row,...)
or
create A and B with the size m x (n1 + n2),
and get B=A+B by calling MatAXPY(),
Hong
On Wed, 19 Sep 2007, Alejandro Garzon wrote:
>
> Hi, Is there a function to combine two matrices, sizes m x n1 and m x n2, in a
> single matrix size m x (n1 + n2) or the analog case for rows? Thanks.
>
> Alejandro.
>
>
More information about the petsc-users
mailing list