I guess another way to look at this is if I already build matrix A and
MatAssembly has been called. Can I populate more rows to matrix A later on?
With the number of columns and column ownership pattern not changed of
course. Thank you.

On Mon, Aug 31, 2020 at 10:29 PM Jed Brown <[email protected]> wrote:

> Karl Lin <[email protected]> writes:
>
> > If I have two matrix A and B with the same number of columns, same
> > distribution pattern (column ownership pattern) among processes but
> > different number of rows, is there a function to append B to A to make a
> > new matrix C = [A; B]? Thanks.
>
> Sort of; you can create a MatNest with the two matrices and (optionally)
> convert to AIJ format.
>
> Better, you can take the code that builds A and B, but call it on "local"
> submatrices; see MatGetLocalSubMatrix() or an example like
> src/snes/tutorials/ex28.c.
>

Reply via email to