<div dir="ltr">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. <br></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Mon, Aug 31, 2020 at 10:29 PM Jed Brown <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">Karl Lin <<a href="mailto:karl.linkui@gmail.com" target="_blank">karl.linkui@gmail.com</a>> writes:<br>
<br>
> If I have two matrix A and B with the same number of columns, same<br>
> distribution pattern (column ownership pattern) among processes but<br>
> different number of rows, is there a function to append B to A to make a<br>
> new matrix C = [A; B]? Thanks.<br>
<br>
Sort of; you can create a MatNest with the two matrices and (optionally) convert to AIJ format.<br>
<br>
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.<br>
</blockquote></div>